# Automation Error Messages and Fixes

> Common Type.com automation error messages from deploys, runs, fixtures, and requests, with the cause and the fix for each.

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

Type.com automation errors come from deploys, runs, fixtures, and requests. Each entry gives the message, the cause, and the fix. The text in your error can have more detail after the message. `<stage>`, `<key>`, and similar words stand for your own names.

Some deploy errors come inside a list. For example, `Invalid automation graph: [...]` and `Invalid automation definition: [...]` contain one or more issues. Each issue has a `message` and a `path`. This page lists the `message`.

## Deploy: project and files

| Message | Cause | Fix |
| --- | --- | --- |
| `The automation folder needs a type.json file` | No `type.json` in the folder. | Add `type.json`. |
| `type.json must be a regular file smaller than 64 KiB` | `type.json` is a link, a folder, or too large. | Use a normal file. |
| `Invalid type.json: ...` | A field is missing, wrong, or unknown. | See [Project Files](https://docs.type.com/automations/reference/project-files/index.md#typejson). |
| `Ignore file must be a regular file smaller than 64 KiB: <name>` | A `.gitignore` or `.typeignore` is a link, a folder, or too large. | Use a normal file. |
| `fixtures.json must contain valid JSON` | `fixtures.json` cannot be parsed. | Fix the JSON. |
| `Automation source must fit in 256 files and 1 MiB` | The project is too large. | Remove files, or add them to `.typeignore`. |
| `Code package must fit in 1 MiB` | The source files, as JSON, are larger than 1 MiB. | Remove files or make them smaller. |
| `Exactly one TypeScript or JavaScript entrypoint is required` | The entrypoint is missing or has a wrong extension. | Set `entrypoint` to a `.ts`, `.js`, `.mts`, or `.mjs` file. |
| `type.json entrypoint does not match the uploaded entrypoint` | The entrypoint file was skipped or ignored. | Check ignore files and skip rules. |
| `Use a safe relative file path` | A path is absolute, has `.` or `..` parts, a backslash, or a control character. | Rename the file. |
| `Package install paths are reserved` | A path uses `node_modules`, `.type-installed`, or `.type-contract`. | Rename the path. |
| `Invalid .type/project.json. Restore the folder's original project ID before deploying.` | The project file is damaged. | Restore it from version control. |

## Deploy: code and graph

| Message | Cause | Fix |
| --- | --- | --- |
| `Class-based automations are no longer supported. Export automation({ deployment, output, stages })` | The default export is a class, or anything other than `automation(...)`. | Rewrite the code as `automation({ deployment, output, stages })`. |
| `Define deployment inside automation({ deployment, output, stages }); remove the separate deployment export` | The file also has `export const deployment`. | Move the settings into `automation({ deployment })`. |
| `Automation typecheck failed: ...` | TypeScript errors. Type checks in strict mode, with no Node or Bun types. | Fix the errors. |
| `QuickJS cannot import <module>. ...` | An import that is not allowed. | Use only the [allowed imports](https://docs.type.com/automations/reference/sdk/index.md#allowed-imports-in-automation-code). |
| `QuickJS compilation disables macros and import attributes; ...` | `with { type: ... }` or a `macro:` import. | Remove it. |
| `Declare stages on automation(), not deployment` | `deployment.stages` is set. | Move the stages to `automation({ stages })`. |
| `Automatic code repair is not supported for stage automations` | `failurePolicy` is not `"pause"`, for example `"pause_and_investigate"`. | Remove `failurePolicy`, or set it to `"pause"`. |
| `Declare between 1 and 32 stages` | No stages, or more than 32. | Use 1 to 32 stages. |
| `Use a non-reserved method name for the stage key` | A stage is named `then`, `constructor`, `toString`, or another reserved name. | Rename the stage. |
| `Subscription <key> requires an entry stage` | A subscription has no `entry`, or `entry` is not a valid stage name. | Set `entry` to a stage name. |
| `Unknown entry stage` | `entry` names a stage that is not declared. | Set `entry` to a declared stage. |
| `Unknown destination stage: <stage>` | `transitions` or `onResult` names a stage that is not declared. | Declare the stage, or fix the name. |
| `Duplicate stage transition` | A stage lists the same transition twice. | Remove the copy. |
| `An agent result must resume a code stage` | An agent stage's `onResult` names another agent stage. | Point `onResult` at a code stage. |
| `Code-only automations cannot declare agent stages` | `mode: "code"` with an agent stage. | Remove `mode`. Type sets `code_with_optional_agent` when the graph has an agent stage. |
| `Every subscription must have exactly one entry stage` | The saved graph and the subscriptions do not agree. | Deploy the source again. Do not edit the saved definition by hand. |
| `<name> has a rule in its schema that cannot be saved, at <path> (<reason>). ...` | A schema uses `.refine`, `.superRefine`, `.trim`, `.toLowerCase`, a transform, a pipe, a coercion, regex flags, URL restrictions, or `endsWith`. `<name>` is `Subscription <key>`, `Stage <stage> input`, `Stage <stage> output`, or `Automation output`. | Use a built-in constraint, or check the value in a code stage. |
| `<name> must use a JSON-compatible schema` | The schema cannot become JSON Schema, for example a function or a `Date`. | Use JSON types. |
| `Automation arguments must fit in 64 KiB` | The saved settings are too large: subscriptions, schemas, stage instructions, and webhook adapter definitions together. | Make schemas and instructions shorter. |
| `Invalid deployment export: ...` | A field in `deployment` or in a subscription is wrong or unknown, for example an empty `title`. | See [Deployment API](https://docs.type.com/automations/reference/deployment/index.md). |
| `Invalid string: must match pattern /^[a-z][a-zA-Z0-9_-]{0,63}$/` | A subscription key does not start with a lowercase letter, or is too long. | Use a key such as `onMessage`. |

## Deploy: events, matchers, and schedules

| Message | Cause | Fix |
| --- | --- | --- |
| `Each subscribed event must have exactly one schema variant with a required literal type or matching provider prefix pattern` | The schema and `source.events` do not agree. | Add one variant with `type: z.literal(...)` for each event. |
| `Event schema is too complex to validate; ...` | Too many nested alternatives or references. | Make the schema simpler. |
| `Debounce keys must be required scalar fields in every event variant` | A debounce `key` path is optional, an object, or missing in a variant. | Use a required string, number, or boolean field. |
| `Recurring ticks cannot be debounced` | `debounce` on a recurring source. | Remove `debounce`. |
| `<matcher> requires an integration source with events: <events>. ...` | The matcher does not fit the source or the events. For example, a wildcard such as `github.pull_request.*`. | Use exact events that the matcher supports, or `{ handler: "custom" }`. |
| `Built-in matchers evaluate one event at a time. ...` | A built-in matcher with `delivery: "batch"`. | Use `delivery: "latest"`, or a custom handler. |
| `Use only one of condition, evaluation, or jev` | More than one AI question form. | Keep one. |
| `Use eq OR contains, not both` | Both text filters. | Keep one. |
| `Programmable webhooks use custom entry stages, not native provider matchers` | A built-in matcher on a source with `webhook`. | Remove `match`. |
| `Recurring intervals must be at least 60 seconds and aligned to whole minutes` | `everySeconds` is less than 60 or not a multiple of 60. | Use 60, 120, 900, and so on. |
| `Recurring interval <key> is too large to schedule` | `everySeconds` is too large. | Use a smaller interval. |
| `Recurring cron schedule <key> fires more than once a minute; ...` | A seconds field that runs more often. | Remove the seconds field, or use a fixed second. |
| `Invalid recurring cron schedule: ...` | The expression or time zone is not valid. | Check the expression and the IANA time zone. |
| `Recurring cron schedule <key> has no future run` | The cron expression never runs again. | Change the expression. |
| `No signed webhook ingress is available for ...` | The connection cannot send events to code automations. | Use a [recurring source](https://docs.type.com/automations/scheduled-automations/index.md) or a [webhook adapter](https://docs.type.com/automations/webhooks/index.md). |
| `Webhook setup requires a saved credential account on this connection` | The connection has no credential account. | Reconnect the service. |

## Deploy: process

| Message | Cause | Fix |
| --- | --- | --- |
| `Folder deployment requires the "code-first-automations" feature switch` | Code automations are not on for the workspace. | Contact Type to ask for access. |
| `This folder already has a running deployment. Follow it before deploying again.` | Another deploy is in progress. | Run `type-cli automations deployment <id> --space <space> --follow`. |
| `Deployment ID already belongs to a different upload. Use a new deployment ID.` | A reused deployment ID with different files. | Deploy again. The CLI makes a new ID. |
| `An automation named "<name>" already exists in this Space: ...` | Another automation in the Space has the same `name`. | Change `name` in `type.json`, or update that automation. |
| `Deploy this folder using the automation creator's account ...` | You did not create this automation. | Ask the creator to deploy, or make a new project. |
| `A member must resolve this automation's request for human intervention before redeploying` | Type.com paused the automation after repeated failures or for an account to reconnect, or an agent asked for a person's help. | A member enables the automation in Type. To fix the code first, test the corrected code with `test_automation_code`, save it while the automation stays paused, and then enable it. |
| `Automation fixtures failed: <names>` | One or more fixtures failed. | Read the fixture messages above it. |
| `Deployment stopped before it finished. Deploy again.` | The deploy stopped, for example after 10 minutes. | Deploy again. |

## Fixtures

| Message | Cause | Fix |
| --- | --- | --- |
| `Fixture output did not match expectedOutput` | The output is different. | Compare the output with `expectedOutput`. |
| `Expected an error containing "<text>", but the fixture succeeded` | The fixture has `expectedError`, but the stage did not fail. | Fix the code or the fixture. |
| `Fixture subscriptionId is not declared by this automation` | `subscriptionId` is not a subscription key. | Use a key from `deployment.subscriptions`. |
| `Unexpected fixture tool call: <service>/<name>` | The code made a tool call with no matching response. | Add the response, with the exact request. |
| `Unexpected fixture integration request: ...` | The code made an integration request with no matching response. | Add it to `integrationResponses`. |
| `Unused fixture tool response: <service>/<name>` | A response that the code did not use. | Remove it, or check why the code did not call it. |
| `Unused fixture responses: the subscription matcher skipped this event` | The matcher skipped the event, but the fixture has responses. | Remove the responses. |
| `Semantic matcher fixtures require arguments.matcher.decision: "match" or "skip". ...` | A `condition` or `evaluation` matcher with no `matcher.decision`. | Add `"matcher": { "decision": "match" }`. |
| `Full Jev fixtures require arguments.matcher.jev with explicit simulated answers` | A `jev` matcher with no `matcher.jev`. | Add the answers. See [Test matchers](https://docs.type.com/automations/reference/matchers/index.md#test-matchers). |
| `A fixture cannot expect both an error and an output` | Both `expectedError` and `expectedOutput`. | Keep one. |
| `Deployment fixture names must be unique` | Two fixtures have the same name. | Rename one. |
| `Fixture batch deadline expired` | Fixtures took more than 4 minutes together. | Make the fixtures faster, or use fewer. |

## Runs: stages

| Message | Cause | Fix |
| --- | --- | --- |
| `Invalid subscription event: ...` | The event does not match the subscription schema. | Make the schema accept the real data. |
| `Invalid stage <stage> input: ...` | The stage input does not match the stage's `input` schema. | Fix the schema or the value that you pass. |
| `Code stage <stage> must return next(), complete(), or blocked(): ...` | `run` returned another value, a value that is not JSON, or a `blocked` reason over 2,000 characters. | Return `next()`, `complete()`, or `blocked()`. |
| `Stage <stage> cannot transition to <stage>` | `next()` names a stage that is not in `transitions`. | Add the stage to `transitions`. |
| `Invalid input for destination stage <stage>: ...` | The `next()` input does not match the destination's `input` schema. | Pass a value that matches. |
| `Invalid automation output: ...` | The `complete()` or `blocked()` value does not match `output`. | Return a value that matches `output`. |
| `nextCheckpoint must be JSON`, `visualization must be JSON` | A value that is not JSON, for example a `Date` or `undefined`. | Convert values to JSON. |
| `summary must be one sentence of 1 to 300 characters` | `ctx.setSummary()` text is empty or too long. | Write a shorter summary. |
| `Automation reached its limit of 64 stage invocations` | The run started more than 64 stages, for example a loop of `next()` calls. | End the loop with `complete()` or `blocked()`. |
| `Automation reached its stage invocation limit` | An agent stage would start after the stage limit. | Use fewer stages in a run. |

A stage that returns `err(...)` fails with the error's own message.

## Runs: limits and requests

| Message | Cause | Fix |
| --- | --- | --- |
| `QuickJS execution failed: ...` | An error in the VM: a throw, or too much memory. | Read the detail. Return `err(...)`. Do not throw. |
| `QuickJS execution exceeded its deadline; reconcile effects before retrying` | The stage ran past its deadline. See [Limits](https://docs.type.com/automations/reference/limits/index.md#time). | Do less in each stage. Check for partial writes. |
| `QuickJS API request budget exceeded` | More than 128 requests, more than 8 at the same time, or more than 200 action log requests. | Make fewer calls. |
| `Type API response exceeds the QuickJS 2 MiB limit; paginate the request` | A response was too large. | Ask for smaller pages. |
| `Invalid QuickJS API request` | A request body over 1 MiB or a URL over 8,192 characters. | Send less data in each request. |
| `QuickJS result exceeds the 2 MiB combined limit for checkpoint, output, visualization and receipts (... bytes). ...` | The output, checkpoint, report, and action logs are larger than 2 MiB together. | Return less data. Store large datasets in another place and return a short view. |
| `Not supported: fetch has been disabled ...` | The code called `fetch`. | Use `ctx.read` and `ctx.write`. |
| `Action logs must fit in 8 KiB` | An action log is too large. | Make the log smaller. |
| `Action completed, but its outcome log was not saved. Do not repeat the action: ...` | The action ran, but Type could not save its log. | Do not repeat the action. Check the destination. |
| `Sandbox commands require a live automation invocation` | A sandbox call in a fixture or test. | Give the result in `toolResponses`. |
| `automationEffectKey is invalid` | The key has a wrong character or is too long. | Use letters, digits, and `._:/-`, at most 200 characters. Start with a letter or digit. |
| `A previous automation run was interrupted; its side effects were not replayed` | A run stopped in the middle, and Type cannot tell what it did. | Check for partial writes before you enable the automation again. |

## Runs: matchers and connections

| Message | Cause | Fix |
| --- | --- | --- |
| `Automation creator no longer has access to this subscription's connection. ...` | The creator lost access to the connection in the Space. | Restore access to the connection. |
| `This subscription's integration is disconnected. ...` | The connection is not connected. | Reconnect the integration. |
| `Slack bot identity is unavailable. Reconnect the integration ...` | Type.com cannot tell which Slack messages are its own. | Reconnect Slack. |
| `Jev matcher is uncertain. ...` | An `evaluation` or `condition` answer was below `minimumConfidence`. | Make the question clearer, or lower `minimumConfidence`. |
| `Jev matcher unavailable (HTTP <status>). ...` | The model call failed or timed out. | Type retries when the service is busy or down. Check the run in history. |
| `Jev matcher evidence exceeds 64 KiB. ...` | The event and the questions are too large. | Use `{ handler: "custom" }` and check the event in code. |
| `Jev webhook request exceeds 64 KiB; select smaller event evidence` | The event and the `jev` questions are too large. | Ask fewer questions, or use a custom handler. |
| `Jev returned missing or malformed answers for this automation` | The model's `jev` answers did not fit the questions. | Check each question's `type` and `criteria`. |
| `<matcher> requires normalized GitHub webhook fields; use the managed GitHub connection` | The GitHub event does not have the fields that the matcher reads. | Use the managed GitHub connection, or a custom handler. |

## `TypeApiError` codes

Every SDK error has a `code`. See [SDK Reference](https://docs.type.com/automations/reference/sdk/index.md#typeapierror).
