> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Runtime limits

> Look up the caps that stop a workflow run so you can size loops, files, and node outputs before you publish.

Workflows stop at hard caps, not only at spend. Check these numbers when you loop a long list, accept a large webhook, or pass a wide API response into a Code node. Spend and monthly USD caps live on [Cost Management](/en/using-langdock/workflows/guides/cost-management) and [Workflow limits](/en/admin/manage-workflows/spend-limits) for admins.

Some values are fixed. Others are set on the node, in workflow **Settings**, or on the workspace.

## Run size

| Limit                 | Value                                                 | Where                 | When it trips                                                                                                                     | What to do                                                                                  |
| --------------------- | ----------------------------------------------------- | --------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Steps per run         | 2,000 (workspace default)                             | Every run             | The run fails with `Steps-per-run limit reached`.                                                                                 | Split the job, shrink the loop, or drop extra Delay nodes. Your workspace value can differ. |
| **Max runs per hour** | Default 100, maximum 5,000                            | Workflow **Settings** | No new run starts while this many runs exist in the last 60 minutes. A new run can start once older runs fall out of that window. | Raise **Max runs per hour**, or slow the trigger.                                           |
| Monthly run cap       | Depends on the Workflows plan. Cloud default is 2,500 | Workspace             | New runs stop. Scheduled and polling workflows turn off when they try to run.                                                     | Ask an admin to change the plan. Dedicated deployments do not apply this count cap.         |

Each node execution counts as a step, including iterations inside a Loop and Delay nodes. Agent **Max Steps** is a separate cap on tool calls inside one Agent node. It does not replace the step limit for the whole run.

## Loops, agents, and delays

| Limit               | Value                      | Where                                     | When it trips                                                                                           | What to do                                                                                                            |
| ------------------- | -------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **Max iterations**  | Default 200, maximum 2,000 | Loop node                                 | The Loop fails if the array is longer than the configured value, and it always fails above 2,000 items. | Raise **Max iterations**, page the list, or split across runs.                                                        |
| **Collect outputs** | 25 MB combined             | Loop node, when **Collect outputs** is on | The loop end fails. The oversized result is not stored.                                                 | Turn **Collect outputs** off, or collect summaries instead of every iteration's full output.                          |
| **Max Steps**       | Default 25, maximum 100    | Agent node                                | The agent stops taking further tool steps.                                                              | Raise **Max Steps** for research-heavy agents. Lower it for short, predictable tasks.                                 |
| Delay duration      | Maximum 1 day              | Delay node                                | You cannot save a longer delay.                                                                         | Use a [Scheduled Trigger](/en/using-langdock/workflows/nodes/triggers/scheduled-trigger) for waits longer than a day. |

## Files and payloads

| Limit                       | Value                                                 | Where                                                                          | When it trips                                                                            | What to do                                                                                                                                             |
| --------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Node output                 | 25 MB                                                 | Every node                                                                     | The node fails with `Node output exceeded the maximum size of 25 MB`. Nothing is stored. | Filter or paginate. Return files as files, not as inline JSON.                                                                                         |
| Code node input             | 5 MiB of loaded upstream outputs                      | [Code node](/en/using-langdock/workflows/nodes/code-node#limits)               | The node fails before your code runs.                                                    | Reference only the slugs you need. Avoid `data`. Shrink upstream output or turn **Collect outputs** off.                                               |
| JavaScript sandbox response | 150 MB                                                | Code node (JavaScript)                                                         | Code execution fails. The stored workflow output is still capped at 25 MB.               | Return less, or write files instead of a huge return value. See [Sandbox Utility Functions](/en/using-langdock/guides/integrations/sandbox-utilities). |
| Webhook body                | 25 MB. 12 MB when **Preserve raw request body** is on | [Webhook Trigger](/en/using-langdock/workflows/nodes/triggers/webhook-trigger) | HTTP 413                                                                                 | Turn off **Preserve raw request body**, or send file references instead of huge Base64.                                                                |
| Form files                  | 20 files, 100 MB total                                | [Form Trigger](/en/using-langdock/workflows/nodes/triggers/form-trigger)       | The submission is rejected.                                                              | Upload fewer or smaller files.                                                                                                                         |
| Form fields                 | 10 fields                                             | Form Trigger                                                                   | The builder blocks adding more fields.                                                   | Split into two forms, or collect extra data later in the run.                                                                                          |
| Action files                | 20 files                                              | Action results and form uploads                                                | The form rejects the submit. Some actions fail instead of keeping extra files.           | Limit attachments in the action.                                                                                                                       |

Files you return from a Code node in a `files` array, or create in the Python working directory, are uploaded before the 25 MB output measurement. Their bytes do not count toward that cap.

## Cost caps

USD and EUR spend caps are separate from the table above. Set **Monthly cap**, **Per-run cap**, and **Max runs per hour** in the workflow **Settings** panel. Workspace admins set the workspace spend cap and the maximum monthly cap per workflow.

When a workflow hits its monthly spend cap, new runs cannot start. Scheduled and polling workflows are deactivated when they try to run after that. Details: [Cost Management](/en/using-langdock/workflows/guides/cost-management).

## Workarounds that usually help

* Filter or summarize before an Agent or Code node. Do not loop 2,000 raw records through a large model.
* Page large lists into several runs instead of one Loop at the 2,000-item ceiling.
* Keep **Collect outputs** off unless a later node needs the full array.
* In Code nodes, name the upstream slugs you read. `data` loads every predecessor into the 5 MiB budget.
* Prefer file references over Base64 in webhooks and node outputs.

## FAQ

<AccordionGroup>
  <Accordion title="Why did my run fail after it already processed many loop items?">
    The step limit for the run counts every node execution, including each loop iteration. Hitting 2,000 steps fails the run even if **Max iterations** still has room.
  </Accordion>

  <Accordion title="Why is my Code node failing before the script starts?">
    The 5 MiB input cap is measured on the upstream outputs your code loads. A Loop with **Collect outputs** on is a common cause. Reference fewer slugs, or collect less.
  </Accordion>

  <Accordion title="Can I raise the 2,000-step limit myself?">
    No. Steps per run is a workspace setting, default 2,000. Ask your admin or Langdock contact if your workspace needs a different value.
  </Accordion>
</AccordionGroup>
