Skip to main content
When hirotm fails, it exits with a non-zero status. With the default global --format ndjson, stderr is JSON: an object that always includes error (a short human-readable message). It usually includes code (a stable machine-readable string) and sometimes retryable, hint, status, url, or extra fields that help you fix the command. With --format human, the same information is printed as plain text on stderr (not JSON). Use exit code ($? in shells) for coarse decisions, and code when you want a precise reason without parsing text.
Success stdout follows global --format (ndjson vs human). Failures use stderr; ndjson → JSON payload, human → plain text.

Exit codes

CodeWhen it happensWhat to do
0Command succeededParse stdout per Response format: default ndjson (line-oriented lists, single-line JSON for writes) or human (tables / labeled text).
1Generic failure, many 5xx API errors, rate limits, or other unmapped HTTP casesRead error and code. If retryable is true, a short backoff may help.
2Wrong or incomplete command line (missing flags, bad values before the API is called)Fix flags and arguments; do not retry the same line unchanged.
3Not found (often API 404), or a path / id that does not exist locally (for example a missing file or release id)Refresh ids or slugs (boards list, boards describe), or fix file paths.
4Forbidden — CLI policy or 403; you are not allowed to do thisChange access in the app; do not keep retrying writes.
5Conflict409 (duplicate or conflicting state)Adjust idempotency: skip create, pick another name, or resolve the conflict in the app.
6Unreachable — no HTTP response (server down, connection refused, etc.)Start the app or run the hint command (often hirotm server start), and verify --dev and --profile match the running server, and that port in that profile’s config.json matches the process you expect.
7Timeout — API request timed out, or the server did not become healthy in timeRetry after a delay; check load and logs.
8Version mismatch — reserved for future CLI/API compatibility checksUpdate Task Manager or the CLI per the message.
9Bad request — API 400 / 422 (validation or bad body)Fix parameters or payload shape; different from “not found”.
10Unauthenticated401Configure CLI access / API key in the app when that flow exists.

Fields on stderr

FieldMeaning
errorHuman-readable summary (always present).
codeStable identifier; prefer this in automation.
retryableIf true, a later retry may succeed (timeouts, some server errors).
hintOptional copy-paste recovery (for example how to start the server).
statusHTTP status when the failure came from the API.
urlRequest URL that failed (when applicable).
serverCodeIf the API sent its own code field, it is preserved here while code stays the normalized CLI value.

Common code values (from the API)

These appear when the CLI talked to the server and got an HTTP error:
codeTypical meaning
bad_requestValidation or malformed input (400, 422).
unauthenticatedMissing or invalid credentials (401).
auth_cli_key_requiredThe server profile has require_cli_api_key: true and the request did not include an Authorization: Bearer … header. Mint a key with hirotaskmanager server api-key generate and put it in the active profile’s api_key, or pass --api-key per command. See Server operations → CLI API keys.
auth_invalid_cli_keyA CLI API key was sent but did not match any active key on the server (revoked or wrong). Re-issue or paste the correct key.
forbiddenNot allowed for this board / CLI policy (403).
not_foundBoard, task, list, or route does not exist (404).
conflictDuplicate or state conflict (409). For example, creating or renaming a release to a name that already exists on that board returns 409 (not 400), so hirotm exits 5 with this code.
request_timeoutHTTP 408 (rare) or aligned server timeout.
version_mismatch426 — upgrade path may be required later.
rate_limited429 — slow down and retry.
internal_error5xx — server-side problem; may be retryable.
http_errorOther HTTP status mapped to exit 1.

Common code values (before the API)

These are checked locally when your flags or files are wrong:
codeTypical meaning
missing_requiredRequired argument or option omitted.
invalid_configA profile’s config.json failed validation (wrong fields for the role, public bind without a key, missing api_url/api_key on a client profile, etc.). The error names the offending field and profile path. See Profiles → Validation rules.
invalid_valueBad number, port, id, or similar.
mutually_exclusive_optionsConflicting flags (for example --color and --clear-color).
conflicting_input_sourcesMore than one of flag / file / stdin for the same input.
conflicting_clear_with_input--clear-* combined with a value for the same field.
invalid_jsonFile or stdin was not valid JSON where JSON was expected.
invalid_input_shapeJSON was valid but not the expected array/object shape.
no_update_fieldsAn update command had nothing to change.
release_not_found_by_name--release name does not exist on that board.
emoji_validation_failed--emoji value was rejected.

Connection and server process

codeTypical meaning
server_unreachableCould not open an HTTP connection; check that Task Manager is running.
request_timeoutA request over the network exceeded the CLI timeout.
server_start_timeoutserver start waited for health but the API did not respond in time.
server_exitedForeground server child exited with an error.
no_managed_serverserver stop had no pid file for this profile.
stale_pidRecorded background pid was dead; file was cleared.
signal_failedCould not send stop signal to the recorded process.

Other

codeTypical meaning
file_not_foundA --body-file, --description-file, or similar path does not exist.
response_inconsistentRare: the server response did not contain an entity the CLI expected after a mutation.
internal_errorUnexpected failure inside the CLI (including unknown errors).
confirmation_requiredAdd --yes.
confirmation_declinedDeclined at prompt.

Example (stderr only)

{
  "error": "Board not found",
  "code": "not_found",
  "status": 404,
  "url": "http://127.0.0.1:3001/api/boards/missing-slug"
}