Skip to content

Error codes ​

Every failure has a stable machine-readable code, a one-line message, and a reason that says what to do. The CLI prints them (with --json, as {"error": {...}}) and exits with a code; the web API returns them with an HTTP status. The codes are defined in src/error.rs.

For causes and fixes of the common ones, see Troubleshooting.

Tasks and states ​

CodeWhenExitHTTP
task_not_foundThe task ID does not exist in the project.3404
task_archivedA write targets an archived task.1409
task_not_archivedA delete or restore targets a task that is not archived.1409
task_is_draftAn AI write (edit, mv, state, history add) targets a draft.1409
task_not_draftA web edit targets a task that is not a draft.1409
task_is_doneAn AI change targets a Done task.1409
acceptance_unmetAn AI moves a task to Done while a condition is unmet or the frontmatter is invalid.2n/a
invalid_state_for_columnThe run state is not valid in that lane (for example Running in Todo).1422
invalid_state_for_assigneeA human task is given a run state other than Idle.2422
invalid_state_for_draftA running task is made a draft.1409
archive_targets_changedA bulk archive target moved or was deleted since the confirmation opened.1409

Decision requests ​

CodeWhenExitHTTP
request_changedThe answer names a request that is no longer current, or a waiting request was withdrawn by a task move.1409
task_status_changedA move named the status it started from (fromStatus), and the task is no longer in it. Nothing is written; the body adds currentStatus.1409
request_choice_unknownThe answer names a choice that is not in the request.2422

Projects, epics, and attachments ​

CodeWhenExitHTTP
project_not_foundNo project matches the name or ID.4404
project_name_existsA project with the same name exists.2409
folder_unboundThe working folder is not bound to a project.4n/a
bound_project_missingThe project bound to the folder no longer exists.4n/a
folder_bound_elsewhereThe folder already belongs to another project.2n/a
epic_not_foundThe EPIC-ID does not exist.1404
epic_id_takenAn epic with the same EPIC-ID exists.1409
epic_in_useA task still refers to the epic.1409
attachment_not_foundThe image ID does not exist.1404
attachment_limit_exceededAn image is too large, or the owner has too many images.1422

Input and files ​

CodeWhenExitHTTP
invalid_argumentA command argument is missing or malformed; for example, --no-wait with an integer timeoutSeconds.2422
invalid_valueA value breaks a rule (length, format, and so on).2422
confirmation_requiredA deletion needs a human y/N in a terminal.1n/a
file_invalidA shared file is malformed or breaks the format.1422
format_unsupportedA shared file has a formatVersion other than 1.1500
file_unreadableA shared file cannot be read.1500
file_errorA shared file cannot be written, or a journal cannot be recovered.1500
database_busyThe project write lock was not free within 5 seconds.1503
database_errorAn unexpected failure while reading or writing.1500

Server and waiting ​

CodeWhenExitHTTP
already_servingAnother serve already runs on this data area.1n/a
port_in_useThe port is taken.1n/a
board_unavailableA waiting Pending request, wait, or the hook cannot reach the server. A Pending request checks the server before saving, so an unavailable server leaves no question.1n/a
cursor_invalidThe cursor is malformed or belongs to another project.1n/a
wait_timeoutChange mode (wait --after) reached its optional --timeout with no change, or a Pending request reached its integer wait.timeoutSeconds. It is not an answer; the question stays Pending.1n/a
forbiddenA web write failed the guard (Host, Origin, Sec-Fetch-Site, or token).n/a403
invalid_sectionsThe sections query of a Detail route is not document, history, or document,history. See Web API.n/a400
not_implementedThe Summary or Detail route exists but its handler is not written yet.n/a501

Mobile connection ​

These are returned by the /api/monitor-connections routes (see Web API) and carry no secret value.

CodeWhenExitHTTP
revision_conflictThe settings changed since the page read them.n/a409
save_failedThe settings could not be saved. Nothing changed and nothing started.n/a500
token_requiredA start found no token in the request, the environment, or the secure storage.n/a422
keychain_unavailableSaving or deleting the token was asked for but the PC's secure storage cannot do it. Nothing was saved or changed.n/a409
settings_unreadableA start while the saved settings file cannot be read. Save the settings again first.n/a409
start_failedThe connection could not be started for an internal reason.n/a500
invalid_valueThe token or the body breaks a rule (for example save without a token, or an unknown field).n/a422

On the command line, serve --monitor ngrok with a missing or invalid option exits 2 with invalid_argument; a connection that cannot start exits 1. The failure codes in the state object (failure) are listed in Web API.

On the monitor entry, a request that fails the Host check gets a 403 forbidden with the reason not available, a missing or expired session gets 401 session_required, and a write without the public Origin, same-origin metadata, or CSRF token gets 403 forbidden. POST /monitor/api/unlock answers a wrong passcode with 403 unlock_failed and, after five wrong ones in a row, every attempt with 429 unlock_locked; neither says how many tries are left.

Project docs ​

These are returned by the /api/projects/{projectId}/docs/… routes (see Web API). They are not CLI errors, so they have no exit code.

CodeWhenExitHTTP
docs_path_invalidThe path is empty, absolute, too long (1,024 bytes, or 255 bytes in one part), nested more than 17 parts deep, or has an empty part, a part that starts with a dot (such as ..), a backslash, or a control character; or a file or folder on the way is a symbolic link. The reason says which.n/a400
docs_not_foundNo such file under docs/, or the path names a folder.n/a404
docs_not_markdownThe file routes were given a name that does not end in .md or .mdx.n/a415
docs_asset_typeThe image route was given a file that is not PNG, JPEG, WebP, GIF, AVIF, or SVG.n/a415
docs_open_failedThe open route could not open docs/ or the file: the folder does not exist, or the program could not be started. The reason says which.n/a500
docs_too_largeA file over 2 MiB, or an image over 10 MiB.n/a413
docs_not_utf8The file is not valid UTF-8 text. It is not changed.n/a422

Display preferences ​

These are returned by the /api/preferences and /monitor/api/preferences routes (see Web API). They are not CLI errors, so they have no exit code. A preferences file that cannot be read is not an error: the defaults are used.

CodeWhenExitHTTP
invalid_preferencesThe body has an unknown field, a value that is not allowed, or neither locale nor theme. Nothing is saved.n/a422
preferences_unavailableThe preferences file could not be written. The saved value is unchanged.n/a500

First-run guide ​

  • onboarding_conflict (409): the guide changed since the tab read it, another tab holds the lease, or the run is not the active one. Read the state again and repeat the step with the current revision.
  • onboarding_invalid (422): the step does not follow from the current phase, such as resuming before the answer is saved.

Exit codes ​

ExitMeaning
0Success.
1The operation is not allowed in the current state, or something failed.
2The input is wrong.
3The task was not found.
4The project was not found or the folder is not bound.

Other web statuses: 400 for malformed JSON and 413 for a body over 1 MiB. Guards run before the target is looked up, so a refused request never reveals what exists.

Task mode (wait --until task --idle-timeout <seconds>) has a different successful ending: when no eligible task arrives before its idle deadline, it prints a kind: "idle_timeout" JSON result and exits 0. An eligible task also exits 0. Invalid arguments exit 2. A missing project exits 4. A stopped/mismatched server, invalid board data, or a stream failure returns board_unavailable and exits 1; these are errors, not idle completion. The idle timeout is 1 to 86,400 seconds and is required.