# Hibakódok

Minden hiba ugyanabban a borítékban jön; a stabil `status` slugra ágazz el, ne az üzenetre.

A CLI-ben egy `ERR_*` hiba 1-es kóddal lép ki (a `tkt ticket lint` 4-gyel), és a stderr-re `Error [ERR_…]` sort ír.

```json
{"error": {"code": 2001, "status": "ERR_NOT_FOUND", "http_status": 404,
           "message": "…", "target": "tickets.PAY-999", "details": [],
           "request_id": "req_…"}}
```

## Hibakódok

| slug | kód | HTTP | jelentés | bővebben |
|---|---|---|---|---|
| `ERR_AUTH_REQUIRED` | 1001 | 401 | No token, or one the server does not know | [Projektek és tokenek](/docs/guides/team/projects.md#team-projects) |
| `ERR_AUTH_FORBIDDEN` | 1002 | 403 | The token is expired, revoked, of another project, or its role is too low | [Projektek és tokenek](/docs/guides/team/projects.md#team-projects) |
| `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 | [Azonosítók és claimek a szerverről](/docs/guides/team/coordinator.md#team-coordinator) |
| `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 | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `ERR_TIMEOUT` | 2006 | 504 | A forwarded call ran longer than the server allows | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `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 | [Merge után](/docs/guides/team/git.md#maint-merge-damage) |
| `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-beállítások](/docs/reference/config.md#maint-config) |
| `ERR_AC_SELECTOR_INVALID` | 3114 | 422 | An acceptance-criteria selector (number, range, text) matches nothing or is malformed | [Visszaírás munka közben](/docs/guides/loop/record.md#loop-record) |
| `ERR_BODY_SECTION_AMBIGUOUS` | 3115 | 422 | A section name matches more than one heading | [Visszaírás munka közben](/docs/guides/loop/record.md#loop-record) |
| `ERR_TEXT_NO_MATCH` | 3116 | 422 | The `--old` text is not in the target | [Docok és gotchák](/docs/concepts/docs-gotchas.md#context-docs) |
| `ERR_TEXT_AMBIGUOUS` | 3117 | 422 | The `--old` text occurs more than once | [Docok és gotchák](/docs/concepts/docs-gotchas.md#context-docs) |
| `ERR_GROUP_PRIMARY_LOCKED` | 3118 | 409 | The primary group changes only through `tkt ticket move` | [Ticket módosítása](/docs/guides/loop/edit.md#loop-edit) |
| `ERR_DEFER_REASON_INVALID` | 3119 | 422 | A status reason on an update that does not defer or cancel | [Ticket módosítása](/docs/guides/loop/edit.md#loop-edit) |
| `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 | [Docok és gotchák](/docs/concepts/docs-gotchas.md#context-docs) |
| `ERR_CONFIG_KEY_UNKNOWN` | 3122 | 422 | Not a known `config.yaml` key | [Workspace-beállítások](/docs/reference/config.md#maint-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 | [Merge után](/docs/guides/team/git.md#maint-merge-damage) |
| `ERR_ID_MISMATCH` | 3125 | 422 | A file's frontmatter `id` is not its file name | [Merge után](/docs/guides/team/git.md#maint-merge-damage) |
| `ERR_CONFIRM_REQUIRED` | 3126 | 422 | A deletion without a matching `--confirm` and no terminal to ask on; nothing deleted | [Projekt törlése](/docs/guides/team/projects.md#team-project-delete) |
| `ERR_RATE_LIMITED` | 3127 | 429 | More calls than the server allows in its window: forwarded calls, reports, registrations | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `ERR_STORE_BUSY` | 3128 | 409 | The project's store stayed locked past the wait | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `ERR_STORE_MOVING` | 3129 | 409 | The store is being moved between repo and server; frozen until it lands | [Store költöztetése](/docs/guides/maintenance/store-move.md#maint-store-move) |
| `ERR_STORE_LOCATION` | 3130 | 409 | The store is not where the call needs it (repo or server) | [Store költöztetése](/docs/guides/maintenance/store-move.md#maint-store-move) |
| `ERR_COMMAND_NOT_ALLOWED` | 3131 | 403 | A local command sent to a server store's `/cli` | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `ERR_DECOMPOSITION_METHOD_INVALID` | 3132 | 422 | A decomposition method folder tkt refuses to read | [Bontási módszerek](/docs/guides/plan/methods.md#plan-methods) |
| `ERR_DECOMPOSITION_SUBMIT_INVALID` | 3133 | 422 | A decomposition step's submission fails validation; a `fix` step follows | [AI-dekompozíció](/docs/guides/plan/decompose.md#plan-decompose) |
| `ERR_REF_NOT_INHERITED` | 3134 | 422 | The ticket does not inherit the ref it excludes (`details` lists what it does) | [Örökölt hivatkozás kizárása](/docs/concepts/budget.md#context-exclude) |
| `ERR_REF_OWN` | 3135 | 422 | The ticket names the ref it excludes itself: `tkt ticket ref remove` it, or edit the body | [Örökölt hivatkozás kizárása](/docs/concepts/budget.md#context-exclude) |
| `ERR_EXCLUDE_NOTE_REQUIRED` | 3136 | 422 | Excluding a floor item (required reading, critical gotcha, changer) needs `--note` | [Örökölt hivatkozás kizárása](/docs/concepts/budget.md#context-exclude) |
| `ERR_PATH_OUTSIDE_STORE` | 3137 | 422 | A store path leads outside the store (`..`, an absolute path, a symlink out); nothing read or written | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `ERR_RUN_MEMORY_LIMIT` | 3139 | 507 | A forwarded call needed more memory than the server allows a run; nothing changed | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `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 | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `ERR_CONFINEMENT_UNAVAILABLE` | 3142 | 503 | The server cannot confine a forwarded run on this host and runs none unconfined; nothing ran | [Store a szerveren](/docs/guides/team/server-store.md#team-server-store) |
| `ERR_SUPERSEDED_BY_INVALID` | 3143 | 422 | A successor on a ticket that stays open, or the ticket itself as its own successor | [Ticket módosítása](/docs/guides/loop/edit.md#loop-edit) |
| `ERR_AFFECTS_INVALID` | 3144 | 422 | An `affects` target that is malformed, of an unknown kind, or names nothing | [Döntések](/docs/concepts/decisions.md#context-decisions) |
| `ERR_STATUS_TRANSITION` | 3201 | 409 | The status change is not allowed from the current status | [Ticket módosítása](/docs/guides/loop/edit.md#loop-edit) |
| `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 | [Ticket módosítása](/docs/guides/loop/edit.md#loop-edit) |
| `ERR_REPO_ANCHOR_MISSING` | 3205 | 409 | `→ in_progress` without an effective `repoAnchor.repo` | [Hintek és lint](/docs/concepts/guard.md#context-guard) |
| `ERR_REORG_CONTEXT_LOSS` | 3206 | 409 | A reorg plan would lose a ticket's named or critical context | [A store migrálása](/docs/guides/maintenance/reorg.md#maint-reorg) |
| `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` | [Merge után](/docs/guides/team/git.md#maint-merge-damage) |
| `ERR_NOT_STARTABLE` | 3210 | 409 | The ticket cannot be claimed: not todo, an open blocker, a block hint, or assigned | [Elvállalás és visszaadás](/docs/guides/loop/claim.md#loop-claim) |
| `ERR_LAST_ADMIN` | 3211 | 409 | The project would lose its last valid admin token | [Projektek és tokenek](/docs/guides/team/projects.md#team-projects) |
| `ERR_WORKTREE_REFUSED` | 3212 | 409 | `tkt worktree done --remove`: changes in it, or the main worktree | [Párhuzamos worktree-k](/docs/guides/team/worktrees.md#team-worktrees) |
| `ERR_PLAN_GATE_FAILED` | 3213 | 409 | The strict plan gate refuses a plan whose tickets fail its rules | [A tervkapu](/docs/concepts/plan-gate.md#plan-gate) |
| `ERR_DECOMPOSITION_STALE` | 3214 | 409 | A source doc or the method changed since `plan begin`; only discard works | [AI-dekompozíció](/docs/guides/plan/decompose.md#plan-decompose) |
| `ERR_DECOMPOSITION_STEP_MISMATCH` | 3216 | 409 | Not the current step, or a command the decomposition's state does not take | [AI-dekompozíció](/docs/guides/plan/decompose.md#plan-decompose) |
| `ERR_DECOMPOSITION_APPROVAL` | 3217 | 409 | `apply` without the preview's digest or the accepted assumptions; `begin` without `--replan` | [AI-dekompozíció](/docs/guides/plan/decompose.md#plan-decompose) |
| `ERR_CONTEXT_GUARD_REFUSED` | 3218 | 409 | A ticket write would cut its own content (new or bigger); nothing written. `--over-budget` writes anyway | [A context guard íráskor](/docs/concepts/budget.md#context-write-guard) |
| `ERR_RELEASE_CONFLICT` | 3219 | 409 | A milestone, ticket or version another release already holds; the message names it and the fix | [Release-ek tervezése](/docs/guides/plan/releases.md#plan-release-planning) |
| `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 | [Release kiszállítása](/docs/guides/plan/releases.md#plan-release-ship) |
| `ERR_RELEASE_PLANNED` | 3221 | 409 | A hand-set ticket `release` on a ticket an unshipped release holds; `tkt release ship` writes it | [Release kiszállítása](/docs/guides/plan/releases.md#plan-release-ship) |
| `ERR_RELEASE_NOTES_EXIST` | 3227 | 409 | `tkt release notes`: the release already has notes (maybe hand edits); `--yes` replaces them | [Érték- és release-riportok, release notes](/docs/guides/plan/reports.md#plan-reports) |
| `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) | [Docok és gotchák](/docs/concepts/docs-gotchas.md#context-docs) |
| `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 | [Ticket módosítása](/docs/guides/loop/edit.md#loop-edit) |
| `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 | [Ticket módosítása](/docs/guides/loop/edit.md#loop-edit) |
| `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-rétegek: hol fut a modell](/docs/guides/team/ai-layers.md#team-ai-layers) |
| `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-rétegek: hol fut a modell](/docs/guides/team/ai-layers.md#team-ai-layers) |
| `ERR_AI_ENDPOINT_INSECURE` | 3314 | 422 | An AI endpoint URL is plain http to another host; https is required outside this machine | [AI-rétegek: hol fut a modell](/docs/guides/team/ai-layers.md#team-ai-layers) |
| `ERR_PLAN_IN_USE` | 3315 | 409 | An AI plan that a project or the default still uses cannot be deleted | [AI-csomagok és árak](/docs/guides/team/ai-plans.md#team-ai-plans) |
| `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 | [Az index](/docs/guides/maintenance/doctor.md#maint-index) |
| `ERR_FILE_PARSE` | 4005 | 422 | A store file cannot be parsed; fix the file | [\`tkt doctor\`](/docs/guides/maintenance/doctor.md#maint-doctor) |
| `ERR_INDEX_DRIFT` | 4006 | 422 | An index row disagrees with its file (doctor only) | [Az index](/docs/guides/maintenance/doctor.md#maint-index) |
| `ERR_INDEX_CORRUPT` | 4007 | 422 | `index.db` cannot be opened or queried (doctor only) | [Az index](/docs/guides/maintenance/doctor.md#maint-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 OKF-be](/docs/guides/maintenance/export.md#maint-export) |
| `ERR_GIT_FAILED` | 4009 | 500 | A git operation failed; carries git's stderr | [Párhuzamos worktree-k](/docs/guides/team/worktrees.md#team-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 | [A tkt ui futtatása](/docs/guides/loop/ui-run.md#loop-ui-run) |
| `ERR_UI_START` | 4011 | 422 | `tkt ui --detach`: the background UI ended or did not start in time; the message ends with its log | [A tkt ui futtatása](/docs/guides/loop/ui-run.md#loop-ui-run) |
| `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) | [Azonosítók és claimek a szerverről](/docs/guides/team/coordinator.md#team-coordinator) |
| `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 | [Csapat-AI: a szerver LLM-je](/docs/guides/team/team-ai.md#team-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 | [Csapat-AI: a szerver LLM-je](/docs/guides/team/team-ai.md#team-llm) |
| `ERR_LLM_UPSTREAM` | 5004 | 502 | The server LLM's upstream API failed | [Csapat-AI: a szerver LLM-je](/docs/guides/team/team-ai.md#team-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 | [Csapat-AI: a szerver LLM-je](/docs/guides/team/team-ai.md#team-llm) |
| `ERR_FEATURE_POSTPONED` | 5006 | 501 | A feature that is built but switched off for now (the project admin's AI caps) | [AI-csomagok és árak](/docs/guides/team/ai-plans.md#team-ai-plans) |
| `ERR_EMBED_PROVIDER` | 5010 | 422 | The embedding provider (the local model or the tkt server) failed; the search went on without it | [AI-rétegek: hol fut a modell](/docs/guides/team/ai-layers.md#team-ai-layers) |
