# Code Automation Limits

> Every time, size, and count limit that Type.com applies to code automations, and what happens when you go over each one.

Canonical page: https://docs.type.com/automations/reference/limits/

Type.com applies time, size, and count limits to code automations. The tables list each limit and what happens when you go over it. Limits can change. If a limit stops your work, tell us.

## Time

| Item | Limit | If you go over it |
| --- | --- | --- |
| One code stage in a live run | The run's recovery window: 30 minutes by default and at most. Retries of the same stage share the window. | Type.com stops the stage with "QuickJS execution exceeded its deadline; reconcile effects before retrying". |
| One code stage in a fixture or `test-code` | 4 minutes | The same error. |
| All fixtures in a deploy | 4 minutes together. Type runs 4 at a time. | "Fixture batch deadline expired". |
| Typecheck and graph validation | 60 seconds each | The deploy fails. |
| Deploy | 10 minutes | Type stops the deploy. |
| One sandbox tool call | 170 seconds | The call fails. |
| Matcher model call | 15 seconds | The run fails before your code runs. |

There is no separate time limit for a whole run. Each stage has its own deadline.

## Runs

| Item | Limit | If you go over it |
| --- | --- | --- |
| Code stages at the same time | 1 for each automation, for all its subscriptions | Other events wait in a queue. |
| Stage invocations in one run | 64, including the entry stage | The run fails with "Automation reached its limit of 64 stage invocations". |
| Automatic retries of a failed stage | 3 by default. The run configuration allows 0 to 10. Type retries only when it can prove that the stage's code did not start. | Recovery records that retries ran out. See [Automatic retries and recovery details](https://docs.type.com/automations/test-troubleshoot/index.md#automatic-retries-and-recovery-details). |
| Recovery window | 30 minutes by default and at most, including retries and the wait for a repair agent | No further automatic attempt for the event. |

## QuickJS VM

| Item | Limit | If you go over it |
| --- | --- | --- |
| Memory | 1 GiB | The stage fails with "QuickJS execution failed". |
| Stack | 1 MiB | The stage fails with "QuickJS execution failed". |
| `setTimeout` timers running at the same time | 256 | The call throws. |
| `setInterval` timers running at the same time | 10 | The call throws. |
| Network and files | No `fetch` and no file system | `fetch` fails with "Not supported: fetch has been disabled ...". |

> **Caution:** `console.log` and the other `console` methods do nothing in automation code. Type does not keep logs. To see values in run history, use `complete()`, `ctx.setSummary()`, or [action logs](https://docs.type.com/automations/reference/context/index.md#ctxaction-and-ctxmutativeaction).

## Requests from code

These apply to every Type API request from a code stage, for example `ctx.tools`, `ctx.read`, `ctx.write`, and `replyInSlackThread`.

| Item | Limit | If you go over it |
| --- | --- | --- |
| Requests in one stage | 128 | Later requests fail with "QuickJS API request budget exceeded". |
| Requests in progress at the same time | 8 | The extra request fails, and it still counts toward the 128. |
| Action log requests in one stage | 200 (100 actions), separate from the 128 | The action fails. |
| Request body | 1 MiB (1,048,576 characters) | The request fails with "Invalid QuickJS API request". |
| Request URL | 8,192 characters | The request fails with "Invalid QuickJS API request". |
| Response body | 2 MiB | The request fails with "paginate the request". |
| Request timeout | The rest of the stage's time | The request fails. |
| Effect key | 1 to 200 characters. Letters, digits, and `._:/-`. Starts with a letter or digit. | The request fails with "automationEffectKey is invalid". |

In fixtures and `test-code`, Type.com answers requests from the recorded responses. The request and concurrency limits are not checked.

## Stage result

| Item | Limit |
| --- | --- |
| Output, checkpoint, report, summary, action logs, and transition data together | 2 MiB of UTF-8 JSON |
| `complete()` and `blocked()` value | JSON that matches `output`. Shares the 2 MiB. |
| `blocked()` reason | 1 to 2,000 characters |
| `ctx.saveCheckpoint()` value | JSON. Shares the 2 MiB. |
| `ctx.setVisualization()` value | JSON. Shares the 2 MiB. |
| `ctx.setSummary()` value | 1 to 300 characters, after spaces are trimmed |

If the result is larger, the stage fails with "QuickJS result exceeds the 2 MiB combined limit for checkpoint, output, visualization and receipts (... bytes)". Type does not cut the result.

## Stages and graph

| Item | Limit |
| --- | --- |
| Stages | 1 to 32 |
| Stage name | Starts with a lowercase letter, then letters, digits, or `_`. At most 64 characters. Not `constructor`, `prototype`, `then`, `toString`, `valueOf`, `hasOwnProperty`, `isPrototypeOf`, `propertyIsEnumerable`, or `toLocaleString`. |
| `transitions` on one code stage | At most 32, no duplicates |
| Entry stages | One for each subscription |
| Saved settings: subscriptions, event and stage schemas, stage instructions, and webhook adapter definitions together | 64 KiB of JSON |
| Typecheck errors shown | 6,000 characters |

## Agent stages

| Item | Limit |
| --- | --- |
| `instructions` | 1 to 10,000 characters |
| `tools` | At most 16. Their schemas together must fit in 64 KiB. |
| Rejected results | 5. After that, the agent cannot submit again, and the task needs attention. |
| Reminders when the agent ends without a result | 2 |
| Time without progress | 24 hours. Then the task needs attention. |

## Action logs

| Item | Limit |
| --- | --- |
| Actions in one stage | 100 |
| Action ID | 1 to 200 characters |
| Message | 1 to 2,000 characters |
| Log (message and data) | 8 KiB |

## Reports

| Item | Limit |
| --- | --- |
| Saved report | 200 elements, 256,000 characters of JSON, 32 levels deep |
| Report elements, after repeats expand | 200 |
| Chart points | 500 |
| Chart series | 12 |
| Email report images | 12 chart images, 10 MiB together |

## Expiration

| Item | Limit |
| --- | --- |
| `afterSeconds` | 1 to 315,576,000 (10 years) |
| `maxRuns` | 1 to 2,147,483,647 |
| `at` | An ISO timestamp with `Z` or an offset |

## Project and deploy

| Item | Limit |
| --- | --- |
| Files | 256 |
| Total size | 1 MiB, including `fixtures.json` |
| One file | 1 MiB |
| File path | 1 to 255 characters |
| `type.json` | 64 KiB |
| `.gitignore`, `.typeignore` | 64 KiB each |
| `name` | 1 to 200 characters, unique in the Space |
| `description` | 2,000 characters |
| Webhook adapters in a project | 20 |
| Deploys in progress for each folder | 1 |

## Fixtures

| Item | Limit |
| --- | --- |
| Fixtures in `fixtures.json` | 20 |
| Fixture name | 1 to 120 characters, unique in the file |
| `expectedError` | 1 to 2,000 characters |
| `toolResponses` | 128 for each fixture |
| `integrationResponses` | 128 for each fixture |

## Subscriptions and schedules

| Item | Limit |
| --- | --- |
| Subscriptions | At least 1. All saved settings must fit in 64 KiB. |
| Subscription key | Starts with a lowercase letter, then letters, digits, `_`, or `-`. At most 64 characters. |
| `title` | 1 to 200 characters |
| `description` | At most 2,000 characters |
| Events for each subscription | 1 to 100, no duplicates |
| Event name | 1 to 200 characters |
| Interval | At least 60 seconds, a multiple of 60 |
| Stepped schedule | 2 to 32 steps. Each `everySeconds` and `forSeconds` is 60 to 315,576,000, a multiple of 60. |
| Cron | At most one run each minute |
| Due scheduled runs started in one scheduler pass | 100 for all of Type |

## Events and debounce

| Item | Limit |
| --- | --- |
| One event | 1 MiB |
| Debounce group | 100 events or 1 MiB. Type then delivers the group early. |
| Debounce `key` | 1 to 8 unique paths, 16 parts each |
| `quietPeriodMs`, `maxWaitMs` | 1 ms to 24 hours. `maxWaitMs` is at least `quietPeriodMs`. |
| Batch delivered to an entry stage | 1 to 100 events |
| Event schema validation | 32 levels deep |

## Matchers

| Item | Limit |
| --- | --- |
| Slack `eq`, `contains` | 1 to 40,000 characters |
| Slack `subtypes` | 1 to 50 |
| Slack `reactions` | 1 to 100 names, 1 to 100 characters each |
| GitHub text filters | 1 to 65,536 characters |
| GitHub lists | 1 to 100 items, 1 to 500 characters each |
| `evaluation` questions | 1 to 8 |
| `condition`, question, and criteria text | 1 to 2,000 characters |
| `jev` questions | 1 to 32 |
| Model call evidence | 64 KiB |
| Model call timeout | 15 seconds |
| Reuse of an `evaluation` result | 5 minutes |

## Custom webhooks

| Item | Limit |
| --- | --- |
| Incoming body | 1 MiB |
| Incoming rate | 120 requests each minute for each workspace |
| `receive` call | 5 seconds, 32 MiB memory |
| `setup`, `renew`, `remove` call | 60 seconds, 32 provider requests |
| Events for each request | 100 |
| Fixtures for each adapter | 2 to 20 |

See [Webhook Adapter API](https://docs.type.com/automations/reference/webhook-adapters/index.md#limits).

## Sandbox

| Item | Limit |
| --- | --- |
| One sandbox tool call | 170 seconds |
| `exec_command` output in one result | 32 KiB: the first 8 KiB and the last 24 KiB. The result names a log file with the full output. |
| `run_integration_command` output | 16 KiB. Type cuts longer output and says how many bytes it removed. |
| Sandbox readiness check | 60 seconds |
| Sandboxes | 1 for each run |

## Repair

| Item | Limit |
| --- | --- |
| Automatic repair sessions | At most 1 for an eligible code failure. The automation stays paused until a member checks the repair result and enables it. |
| Time Type waits for a repair | The time left in the recovery window, at most 30 minutes |
