Error codes
Every error comes in one envelope; branch on the stable status slug, never on the message.
On this page
On the CLI an ERR_* error exits 1 (tkt ticket lint: 4) and prints Error [ERR_…] on stderr.
{"error": {"code": 2001, "status": "ERR_NOT_FOUND", "http_status": 404,
"message": "…", "target": "tickets.PAY-999", "details": [],
"request_id": "req_…"}}Error codes#
| slug | code | HTTP | meaning | home |
|---|---|---|---|---|
ERR_AUTH_REQUIRED | 1001 | 401 | No token, or one the server does not know | Projects and tokens |
ERR_AUTH_FORBIDDEN | 1002 | 403 | The token is expired, revoked, of another project, or its role is too low | Projects and tokens |
ERR_NOT_FOUND | 2001 | 404 | No such object (ticket, group, doc, project, route …) | |
ERR_METHOD_NOT_ALLOWED | 2002 | 405 | The route does not take this HTTP method | |
ERR_COORDINATOR_UNREACHABLE | 2003 | 503 | The server in .aitodo/server.yaml cannot be reached, or redirected off its own origin (client side); tkt --offline works locally | Ids and claims from the server |
ERR_PAYLOAD_TOO_LARGE | 2004 | 413 | A request body over the endpoint's limit (e.g. llm:complete) | |
ERR_BAD_REQUEST | 2005 | 400 | A forwarded call with an option the server sets itself, or a file path outside the call's temp dir | A store on the server |
ERR_TIMEOUT | 2006 | 504 | A forwarded call ran longer than the server allows | A store on the server |
ERR_SCHEMA_MISSING_FIELD | 3101 | 422 | A required field is missing | |
ERR_SCHEMA_INVALID_ENUM | 3102 | 422 | A value is not in its vocabulary (status, type, priority, …) | |
ERR_ID_INVALID | 3103 | 422 | An id does not have the expected form | |
ERR_ID_DUPLICATE | 3104 | 409 | Two objects share one id or ULID | After a merge |
ERR_TIMESTAMP_INVALID | 3105 | 422 | A timestamp is not ISO 8601 | |
ERR_BODY_SECTION_MISSING | 3106 | 422 | A named body section does not exist | |
ERR_CONTEXTREF_LOCATION_MISMATCH | 3107 | 422 | A ref's location does not fit its URI | |
ERR_CONTEXTREF_LINERANGE_INVALID | 3108 | 422 | A ref's lineRange is malformed | |
ERR_REL_PARENT_INVALID | 3109 | 422 | A parent that breaks the two-level hierarchy (an epic under an epic, a story as parent) | |
ERR_GROUP_UNKNOWN | 3110 | 422 | The named group does not exist | |
ERR_GROUP_PREFIX_DUPLICATE | 3111 | 409 | Another group already has this prefix | |
ERR_GROUP_PREFIX_LOCKED | 3112 | 409 | The prefix cannot change once tickets carry it | |
ERR_FIELD_READ_ONLY | 3113 | 422 | The field or config key is read-only | Workspace config |
ERR_AC_SELECTOR_INVALID | 3114 | 422 | An acceptance-criteria selector (number, range, text) matches nothing or is malformed | Writing back while working |
ERR_BODY_SECTION_AMBIGUOUS | 3115 | 422 | A section name matches more than one heading | Writing back while working |
ERR_TEXT_NO_MATCH | 3116 | 422 | The --old text is not in the target | Docs and gotchas |
ERR_TEXT_AMBIGUOUS | 3117 | 422 | The --old text occurs more than once | Docs and gotchas |
ERR_GROUP_PRIMARY_LOCKED | 3118 | 409 | The primary group changes only through tkt ticket move | Changing a ticket |
ERR_DEFER_REASON_INVALID | 3119 | 422 | A status reason on an update that does not defer or cancel | Changing a ticket |
ERR_SCHEMA_DUPLICATE | 3120 | 422 | A list repeats an entry that must be unique (e.g. milestone members) | |
ERR_TABLE_INVALID | 3121 | 422 | doc append: no such table, or a row's cell count differs | Docs and gotchas |
ERR_CONFIG_KEY_UNKNOWN | 3122 | 422 | Not a known config.yaml key | Workspace config |
ERR_SCHEMA_INVALID_VALUE | 3123 | 422 | A value out of range (a negative estimate, a multi-line valueRationale, …) | |
ERR_FILE_CONFLICT | 3124 | 422 | A store file holds git conflict markers | After a merge |
ERR_ID_MISMATCH | 3125 | 422 | A file's frontmatter id is not its file name | After a merge |
ERR_CONFIRM_REQUIRED | 3126 | 422 | A deletion without a matching --confirm and no terminal to ask on; nothing deleted | Deleting a project |
ERR_RATE_LIMITED | 3127 | 429 | More calls than the server allows in its window: forwarded calls, reports, registrations | A store on the server |
ERR_STORE_BUSY | 3128 | 409 | The project's store stayed locked past the wait | A store on the server |
ERR_STORE_MOVING | 3129 | 409 | The store is being moved between repo and server; frozen until it lands | Moving a store |
ERR_STORE_LOCATION | 3130 | 409 | The store is not where the call needs it (repo or server) | Moving a store |
ERR_COMMAND_NOT_ALLOWED | 3131 | 403 | A local command sent to a server store's /cli | A store on the server |
ERR_DECOMPOSITION_METHOD_INVALID | 3132 | 422 | A decomposition method folder tkt refuses to read | Decomposition methods |
ERR_DECOMPOSITION_SUBMIT_INVALID | 3133 | 422 | A decomposition step's submission fails validation; a fix step follows | AI decomposition |
ERR_REF_NOT_INHERITED | 3134 | 422 | The ticket does not inherit the ref it excludes (details lists what it does) | Excluding an inherited ref |
ERR_REF_OWN | 3135 | 422 | The ticket names the ref it excludes itself: tkt ticket ref remove it, or edit the body | Excluding an inherited ref |
ERR_EXCLUDE_NOTE_REQUIRED | 3136 | 422 | Excluding a floor item (required reading, critical gotcha, changer) needs --note | Excluding an inherited ref |
ERR_PATH_OUTSIDE_STORE | 3137 | 422 | A store path leads outside the store (.., an absolute path, a symlink out); nothing read or written | A store on the server |
ERR_RUN_MEMORY_LIMIT | 3139 | 507 | A forwarded call needed more memory than the server allows a run; nothing changed | A store on the server |
ERR_SERVER_DISK_FULL | 3140 | 507 | The server is low on disk space: writes are paused for every project, reads go on; not caused by the caller, the operator is notified | A store on the server |
ERR_CONFINEMENT_UNAVAILABLE | 3142 | 503 | The server cannot confine a forwarded run on this host and runs none unconfined; nothing ran | A store on the server |
ERR_SUPERSEDED_BY_INVALID | 3143 | 422 | A successor on a ticket that stays open, or the ticket itself as its own successor | Changing a ticket |
ERR_AFFECTS_INVALID | 3144 | 422 | An affects target that is malformed, of an unknown kind, or names nothing | Decisions |
ERR_STATUS_TRANSITION | 3201 | 409 | The status change is not allowed from the current status | Changing a ticket |
ERR_REL_CYCLE | 3202 | 409 | The relationship would create a cycle | |
ERR_GROUP_NOT_EMPTY | 3203 | 409 | The group still has members | |
ERR_TICKET_MOVE_REFUSED | 3204 | 409 | A closed ticket, or the group it is already in | Changing a ticket |
ERR_REPO_ANCHOR_MISSING | 3205 | 409 | → in_progress without an effective repoAnchor.repo | Hints and lint |
ERR_REORG_CONTEXT_LOSS | 3206 | 409 | A reorg plan would lose a ticket's named or critical context | Store migration |
ERR_ALREADY_CLAIMED | 3207 | 409 | Claimed by someone else (another worktree or token) | |
ERR_SPLIT_REFUSED | 3209 | 409 | resolve-conflict: no markers, two edits of one ticket, or a decision without --split | After a merge |
ERR_NOT_STARTABLE | 3210 | 409 | The ticket cannot be claimed: not todo, an open blocker, a block hint, or assigned | Claiming and giving back |
ERR_LAST_ADMIN | 3211 | 409 | The project would lose its last valid admin token | Projects and tokens |
ERR_WORKTREE_REFUSED | 3212 | 409 | tkt worktree done --remove: changes in it, or the main worktree | Parallel worktrees |
ERR_PLAN_GATE_FAILED | 3213 | 409 | The strict plan gate refuses a plan whose tickets fail its rules | The plan gate |
ERR_DECOMPOSITION_STALE | 3214 | 409 | A source doc or the method changed since plan begin; only discard works | AI decomposition |
ERR_DECOMPOSITION_STEP_MISMATCH | 3216 | 409 | Not the current step, or a command the decomposition's state does not take | AI decomposition |
ERR_DECOMPOSITION_APPROVAL | 3217 | 409 | apply without the preview's digest or the accepted assumptions; begin without --replan | AI decomposition |
ERR_CONTEXT_GUARD_REFUSED | 3218 | 409 | A ticket write would cut its own content (new or bigger); nothing written. --over-budget writes anyway | The context guard on writes |
ERR_RELEASE_CONFLICT | 3219 | 409 | A milestone, ticket or version another release already holds; the message names it and the fix | Planning releases |
ERR_RELEASE_OPEN | 3220 | 409 | tkt release ship: open tickets in the release, each with its path; nothing written. --move-open-to or --drop-open ships the rest | Shipping a release |
ERR_RELEASE_PLANNED | 3221 | 409 | A hand-set ticket release on a ticket an unshipped release holds; tkt release ship writes it | Shipping a release |
ERR_RELEASE_NOTES_EXIST | 3227 | 409 | tkt release notes: the release already has notes (maybe hand edits); --yes replaces them | Value and release reports, release notes |
ERR_REL_DANGLING | 3301 | 422 | A relationship names a ticket that does not exist | |
ERR_REL_INCONSISTENT | 3302 | 422 | The two sides of a relationship disagree | |
ERR_AC_INCOMPLETE | 3303 | 422 | Unchecked acceptance criteria where the check needs them done | |
ERR_CONTEXTREF_UNRESOLVABLE | 3304 | 422 | A context ref cannot be resolved | |
ERR_APPLIES_TO_INVALID | 3305 | 422 | A doc or gotcha appliesTo path is not a usable repo glob (doctor only) | Docs and gotchas |
ERR_ESTIMATE_ROLLUP_MISMATCH | 3306 | 422 | A parent's own estimate differs from its children's sum (doctor only) | |
ERR_TICKET_CONTENT_MISSING | 3310 | 422 | A new ticket without a filled body ## Description, or a feature or bug without a filled acceptance criterion; nothing written | Changing a ticket |
ERR_TICKET_CONTENT_REMOVED | 3311 | 409 | An update would empty the ticket's ## Description or remove a feature's or bug's last acceptance criterion; nothing written | Changing a ticket |
ERR_AI_CONFIG_INVALID | 3312 | 422 | An AI layer's setting (provider, model) is not one it takes, in a flag, env var or config file | AI layers: where the model runs |
ERR_AI_SECRET_IN_CONFIG | 3313 | 422 | A key, token or password in an AI setting or config file; secrets live in env vars or the OS keychain | AI layers: where the model runs |
ERR_AI_ENDPOINT_INSECURE | 3314 | 422 | An AI endpoint URL is plain http to another host; https is required outside this machine | AI layers: where the model runs |
ERR_PLAN_IN_USE | 3315 | 409 | An AI plan that a project or the default still uses cannot be deleted | AI plans and prices |
ERR_STORAGE_READ | 4001 | 500 | A store file cannot be read | |
ERR_STORAGE_WRITE | 4002 | 500 | A store file cannot be written | |
ERR_STORAGE_DELETE | 4003 | 500 | A store file cannot be deleted | |
ERR_INDEX_REBUILD | 4004 | 500 | The index cannot be rebuilt | The index |
ERR_FILE_PARSE | 4005 | 422 | A store file cannot be parsed; fix the file | `tkt doctor` |
ERR_INDEX_DRIFT | 4006 | 422 | An index row disagrees with its file (doctor only) | The index |
ERR_INDEX_CORRUPT | 4007 | 422 | index.db cannot be opened or queried (doctor only) | The index |
ERR_EXPORT_TARGET | 4008 | 422 | tkt export: the target is inside the store, or a non-empty dir that is no earlier export | Export to OKF |
ERR_GIT_FAILED | 4009 | 500 | A git operation failed; carries git's stderr | Parallel worktrees |
ERR_PORT_IN_USE | 4010 | 422 | tkt ui cannot listen on that address and port (in use, another process answers on it, or not this machine's); --port 0 picks a free one | Running tkt ui |
ERR_UI_START | 4011 | 422 | tkt ui --detach: the background UI ended or did not start in time; the message ends with its log | Running tkt ui |
ERR_DB_BUSY | 4012 | 503 | Server busy: another request holds the server's database past the wait; nothing was written, retry (the CLI retries reads, ids and claims by itself) | Ids and claims from the server |
ERR_INTERNAL | 5001 | 500 | An unexpected failure: report it with tkt feedback bug | |
ERR_LLM_PROVIDER | 5002 | 422 | The LLM provider (a local command or the server) failed | Team AI: the server LLM |
ERR_LLM_QUOTA | 5003 | 429 | The project's server AI budget (its plan's daily or monthly credits) is used up or not granted | Team AI: the server LLM |
ERR_LLM_UPSTREAM | 5004 | 502 | The server LLM's upstream API failed | Team AI: the server LLM |
ERR_LLM_NOT_CONFIGURED | 5005 | 503 | The server has no LLM key or no price for the model, or the project has not enabled it | Team AI: the server LLM |
ERR_FEATURE_POSTPONED | 5006 | 501 | A feature that is built but switched off for now (the project admin's AI caps) | AI plans and prices |
ERR_EMBED_PROVIDER | 5010 | 422 | The embedding provider (the local model or the tkt server) failed; the search went on without it | AI layers: where the model runs |