Open contents5.8Error code index

PART 5Connect, operate, and recover5.8

Error code index — look up meaning and next step by code

An index of error codes returned by the aachat API server, chat, aachat, doctor, status, the Launch Report, and Session startup, with each code's meaning, next step, and a link to the detailed page.

Use this page when you have an error.code or a displayed code and want its meaning and next step. To search by symptom, read Troubleshooting.

Which section to read depends on where you saw the code. The same failure can look different in the WebUI, chat, and aachat.

Where you saw the codeSection to read
WebUI, HTTP API responseReading server error codes and the section for the feature
chat output inside a Sessionchat CLI error codes (inside a Session) and the "In chat" column of the feature sections
aachat outputaachat CLI error codes
issues[] from aachat doctoraachat doctor checks and codes
warnings[] from aachat statusaachat status warnings[] and state values
Launch Report in up.logLaunch Report categories
Session startup or failure displaySession failures and startup codes

In every case, do not decide from the code alone. Also read message and hint. If you do not know whether a change succeeded, check whether the first request was accepted before repeating it.

Reading server error codes

When the aachat API server fails, it returns an HTTP status and a body shaped like {"error": {"code": ..., "message": ...}}. error may include input (the value received) or existing_session_id. Some failures also add data to the body. Most code values are uppercase (VALIDATION_ERROR, NOT_FOUND, SESSION_NOT_RUNNING, and so on). Some for Projects, Asks, and Workflows are lowercase (project_not_active, ambiguous_id, draft_version_conflict, and so on).

The same failure shows a different code depending on where you read it.

Where you read itCode you see
WebUI, HTTP APIThe server code as is
chat (inside a Session)chat maps it to its own lowercase code. See the "In chat" column in each table below. The server's description goes in message, and chat's guidance goes in hint
aachatMaps it further to a small set of codes (permission_denied, auth_required, prerequisite_missing, internal_error, and so on). Read aachat CLI error codes

chat maps codes by these rules.

  • HTTP 400 and 422 become invalid_argument. The exceptions are ambiguous_id, AMBIGUOUS_PROJECT, AMBIGUOUS_USER, USER_NOT_FOUND, REPLY_TARGET_NOT_FOUND, and INVALID_REPLY_TARGET, which each become the lowercase code of the same name
  • 401 becomes token_required, 403 becomes not_authorized (except dedicated codes such as ADMIN_REQUIRED), 409 becomes conflict, 429 becomes network_error, and 5xx becomes server_error
  • 404 depends on words in message. If it contains session, it becomes session_not_found. If it contains agent, agent_not_found. If it contains blueprint or repository, unexpected_response. Otherwise, project_not_found
  • Structured server codes are checked before the status fallback. For example, VALIDATION_ERROR becomes invalid_argument even with HTTP 413. Without a matching code, statuses such as 410, 413, and 426 become unexpected_response
  • Workflow validation and state codes (invalid_workflow_yaml, draft_version_conflict, and so on) pass through in lowercase for Workflow commands
  • Some change operations become operation_outcome_unknown when no response arrived after sending, or when they got HTTP 408, 429, or 5xx: project create, project assign, workflow init, workflow run (including --wait), workflow retry, workflow complete, wait, trigger create, and trigger run. Workflow change operations do the same on connection failure. Do not create a new request; follow that command's message and hint. If commands is present, read what each command does (Retrying the same request)

Recovery from operation_outcome_unknown depends on the command:

  • For workflow init/run/retry and wait, use the recovery command in commands exactly as shown, keeping the same nonce, arguments, and input. It may perform a change; do not generate a new nonce
  • For workflow complete, even without commands, resend the exact same payload through the same closed non-interactive input until the response contains accepted:true. Acceptance is separate from Workflow or product success
  • For project create and project assign, commands is not required. Follow hint: keep the same arguments and stdin for create, or the same Project and agent for assign. Do not add a nonce option that the command does not support
  • For trigger create and trigger run, the list/show commands are reads for checking the current Trigger. Check that state before deciding what to do next

If the "In chat" column says "Same", the server code appears as is. "—" marks codes that chat never receives, such as WebUI-only or human-only operations.

General codes

These codes can come from any feature. First judge roughly by HTTP status, then read the cause in message.

code (HTTP)In chatMeaningNext step
VALIDATION_ERROR (400, 422)invalid_argumentThe input is invalid. The reason is in messageFix the value or argument to match message
VALIDATION_ERROR (413)invalid_argumentThe input is too largeMake it smaller or split it and send again (Capacity and execution limits)
NOT_FOUND (404)Follows the 404 rule above (session_not_active for skill feedback, wait_not_found for wait show)The target does not exist or is not visible. It may not distinguish between missing and no permissionCheck the ID or name in a list and specify it again
CONFLICT (409)conflict (session_not_running if message contains session is not running)It conflicts with the current state. Deleting something referenced elsewhere gives Cannot delete: referenced by other recordsRead the latest state and decide again. Do not repeat the same request as is
CONFLICT (412)conflictA precondition you sent, such as a version, is staleRead the latest and rebuild the request with the new version
UNAUTHORIZED (401)token_requiredAuthentication is missing, invalid, or unusable (Not authenticated, Invalid token, This account is no longer available)Read Authentication fails. Inside a Session, ask a human to check the state of aachat up
FORBIDDEN (403)not_authorized (message_mutation_failed for edit and delete, forbidden for skill feedback)No permission. The reason is in messageRead Permissions and scope below
RATE_LIMITED (429)network_errorToo many requests in a short time. At the authentication entry it is Too many requests. Please try again later.Wait and run it again. If there is Retry-After, wait that many seconds (only Webhooks add it)
GONE (410)unexpected_responseYou used something that expired or became invalid (for example, Wiki snapshot expired; refresh the list, This client entry link has expired. Ask the team to reissue it.)Read the list again, or ask for the link to be reissued
STORAGE_UNAVAILABLE (503)server_errorStorage is temporarily unavailableWait and run it again
INTERNAL_ERROR (500)server_errorAn internal server failure (Internal server error, Database error)For a change, read whether it was applied before resending. If it continues, hand it to support
INTERNAL_ERROR (500, with data in the body)server_errorPart was saved, and later processing failed (for example, Workflow changes were saved, but subsequent notification or observation failed; inspect the saved target before retrying.)Read the saved target, then redo only the rest
DATABASE_PROVISIONING_CONFLICT (500) and other internal operations codesserver_errorAn internal inconsistency that users cannot fixReport it with the time, Project, and code, without SQL or secrets

Permissions and scope

code (HTTP)In chatMeaningNext step
FORBIDDEN (403)not_authorized (message_mutation_failed for edit and delete, forbidden for skill feedback)No permission for the operation. message gives the reason (Owner access required, Owner or admin access required, Only the session owner or session agent can access this session, Agent session does not cover this project, Cannot remove or leave as the last human project admin, and so on)Ask someone who meets the condition in message to do it or grant permission (When an operation is rejected)
ADMIN_REQUIRED (403)admin_requiredProject admin permission is required (Admin access required)Ask a Project admin to do it or grant permission
COLLABORATOR_REQUIRED (403)collaborator_required (message_mutation_failed for edit and delete)Write permission on the Project (collaborator or admin) is required (Collaborator access required)Ask a member with write permission to add you, or choose a Project you can write to
PROJECT_OUT_OF_SCOPE (403)project_out_of_scope (message_mutation_failed for edit and delete)The Project is outside the scope of the current Session (Project is outside the current session scope)Run it from a Session that covers that Project
CROSS_PROJECT_READ_ONLY (403)cross_project_read_onlyOther Projects can be read, but not changed or used to start workReport in your own Project and leave it to a human or that Project's Lead (Read other Projects from a Session)
owned_agent_required (403)owned_agent_required (project create, project assign), otherwise not_authorizedYou can only specify non-deleted agents owned by the owner of the source SessionChoose an agent you own. Add other agents or humans through a human with permission
project_lead_required (403)project_lead_required (project assign), otherwise not_authorizedIt can only run from the current Project Lead's Session. With no Lead, the message is Assign an active Project Lead before delegating work.Run it from the Project Lead's Session. If there is no Lead, choose one first
project_lead_status_only (403)not_authorizedFrom a Session, the Project Lead can only change status to active or completedAsk a Project admin for other changes
project_launch_owner_parent_membership_required / project_lead_relation_membership_required (403)not_authorizedMembership needed to create a child Project or change the Lead is missing (Add the parent Lead agent owner as a parent collaborator, then retry. and so on)Add the membership in message, then run it again (Change the Lead and read child Project results)

ask_cancel_not_authorized is in Asks and waits.

Project

code (HTTP)In chatMeaningNext step
PROJECT_NOT_FOUND (404)project_not_foundThe Project does not exist or is not visible (Project not found)Check the name with chat projects --status all (A Project or document cannot be read)
project_not_active (404)project_not_activeThe Project is not In progress, so its contents are hidden. Nothing was deletedAsk a Project admin to set the status back to In progress (Status and what can be read or run)
AMBIGUOUS_PROJECT (400)ambiguous_projectMore than one visible Project has the same name (Multiple visible projects named '<name>')Specify it as <team>/<project>
project_report_required_for_completion (409)conflictREPORT.md is missing, so the Project cannot be Done (Create or update REPORT.md, then retry completing this Project.)Read A missing REPORT prevents Done
active_child_projects_exist (409)conflictIt cannot be archived because it has active child ProjectsMark the children Done, move them, or archive them, then run it again (Archive is blocked or does not complete)
project_reparent_status_conflict (409)conflictThe child being moved is not planning or active, or the new parent is not activeReopen the child, or choose an active parent
project_relation_cycle (409)conflictYou tried to make one of its descendants the parent (Choose a parent outside this Project's descendant chain.)Choose a parent outside its descendants (Move a child with a handover Brief)
project_lead_membership_required (409)conflictThe Lead must be changed before an operation that removes the current Lead (Change the Project Lead before ...)Change the Lead first, then remove the member or change them to viewer
project_launch_idempotency_conflict / project_reparent_idempotency_conflict (409)conflictThe same nonce was already used for a request with different contentIf the request is different, send it with a new nonce. If it is a resend, match the original arguments
project_template_preview_changed (409)conflictThe template or prepared Agent changed after the previewCheck the new preview, then start again
team_resource_protocol_mismatch (409)conflictThe client and server disagree on the version of Team shared resources (Workflow revisions, and so on)After aachat update, ask a human to restart aachat up and the daemon

Archive and deletion run asynchronously. Failures along the way are not error responses. They stay in the Project's processing state and appear in the WebUI as Could not complete Archive / Deletion failed.

code (HTTP)In chatMeaningNext step
stop_unconfirmed (processing state)—Sessions could not be confirmed stopped within 300 seconds of acceptanceCheck the Sessions shown, then choose Retry (Archive is blocked or does not complete)
run_cancel_failed (processing state)—A Workflow Run could not be cancelledCheck the Run shown, then choose Retry
archive_retry_required (processing state)—Archive processing failed internallyChoose Retry
project_deletion_step_failed (processing state)—A step during deletion failed (Project deletion failed in ... Retry after the dependency recovers.)Resume with Retry on the same Project (Project deletion failed)

Session

code (HTTP)In chatMeaningNext step
SESSION_NOT_RUNNING (409)session_not_running (message_mutation_failed for edit and delete, session_not_active for skill feedback)The target Session is not running (Target session is not running. ...)Read its state with chat session read. If it is stopped or failed and can resume, send with --resume (A Session failed or stopped midway)
session_not_running (409, lowercase)session_not_runningA result report or similar was sent outside a turn whose execution was accepted (Session is not running with an execution-accepted turn)Report again inside the running turn. It cannot be sent after the turn ends
stale_bootstrap_generation (409)conflictThe request came from an old runtime of the same Session (after a runtime restart, for example)Read the current state with chat session read. Records from the old process are not accepted
AGENT_RUNTIME_OFFLINE (409)agent_runtime_offlineThe agent's runtime is not connected (Agent runtime is offline. Start or reconnect `aachat up`, then retry.)Ask a human to start aachat up for that agent, then run it again (A Session does not start)
AGENT_RUNTIME_PROJECT_UNAVAILABLE (409)agent_runtime_project_unavailableThe runtime is connected but has not received that ProjectAsk a human to reconnect aachat up or update the agent's Project membership
SESSION_COMMAND_UNDELIVERED (409)session_command_undeliveredDelivery could not be confirmed, or the runtime rejected the instructionRead message and check Session history, state, and whether the operation took effect. Restore the connection if needed; resend once only after confirming it did not arrive or take effect. For permission answers, use the dedicated recovery steps (Runtime delivery)
SESSION_PENDING_FOLLOW_UPS (409)session_pending_follow_ups (session finish), otherwise conflictQueued follow-ups remain, so the Session cannot finish. The Session keeps runningEnd this turn, handle them in the next turn, then run chat session finish again
workflow_session_managed (409)workflow_session_managed (session finish)The Workflow manages how a Workflow Step Session finishesDo not run session finish again. End the turn normally and follow the Workflow's completion instruction (Complete a Session Step)
SESSION_ALREADY_STARTED (409)conflictThat Session has already accepted its first turnOpen the running Session, or start a new one
CONFLICT (409, with existing_session_id)conflict (existing_session_id is not shown)The same client nonce was already accepted for a launch request with different contentOpen the Session in existing_session_id. For different work, launch with a new nonce (Startup receipt)
CONFLICT (409, This session is ready for its first run. ...)conflictA follow-up was sent to a Session that has never runStart the first run from the Project composer
QUEUED_FOLLOW_UP_NOT_QUEUED / QUEUED_FOLLOW_UP_CHANGED (409)—The queued message you tried to edit is no longer waiting, or it changed elsewhereRead the conversation and queue again before acting (Edit, remove, or run queued follow-ups now)

Live view codes

These come from fetching the WebUI live view. chat never receives them. The screen shows text such as Live updates could not keep up. or Could not update the live view. (Live view and saved tool output).

code (HTTP)In chatMeaningNext step
live_snapshot_busy (429)—Live view fetching is busyReload with Retry
live_snapshot_timeout (504)—The fetch did not finish in timeReload with Retry
stale_active_turn / live_snapshot_unavailable (409)—The running turn changed, or the live view cannot be fetchedReload with Retry. For an old runtime, read Desktop
live_snapshot_encode_failed (500)—The live view could not be assembledReload with Retry. If it continues, report it

Result report item codes

chat result report returns per-item results in data.items[]. A failed item has status: error with code, message, and retryable. If even one item fails, the overall error.code is result_report_incomplete (Read the report result).

code (item)In chatMeaningNext step
project_requiredSameThe Project to record into cannot be decided. The Session's turn spans several Projects, or noneSend that item again with results[].project or --project <team>/<project>
result_project_conflictSameThe specified Project does not match the result's ProjectSpecify the same Project as the existing result
invalid_refSameref cannot be resolved, or does not existCheck the ref's form and that the target exists
unsupported_refSameThis kind of ref cannot be recorded as a resultChange it to a supported ref
delivery_repository_mismatchSameThe PR's or branch's repository is not this Session's repository (<repo> is not a repository of this Session (accepted: ...))Report a PR or branch from a repository shown in accepted
duplicate_target / duplicate_inputSameThe same target or the same input appeared twice in one report. All overlapping items are rejectedCombine them into one and send again
version_conflictSameThe result was updated after you read it. current holds the current valueRead current and send a new, ordinary update
result_not_foundSameThe result targeted for exclusion or similar does not exist yetRecord the result first, or check the target
storage_unavailableSameResult storage is temporarily unavailable (retryable: true)Resend using data.retry_file
invalid_reportSameAn item error that matches none of the above. message gives the reason. Items with the retired delivery input also get thisFix only that item as message says

If the report itself is not accepted, you get an overall error, not item codes. From outside a turn it is session_not_running. From an old runtime it is the server's stale_bootstrap_generation (conflict in chat; see Session).

Asks and waits

code (HTTP)In chatMeaningNext step
invalid_ask (422)invalid_argumentThe Ask input is invalid (options must be empty or contain 2 to 5 values, Ask creation requires an active regular Project, and so on)Fix it to match message
invalid_ask_assignee (422)invalid_argumentThe assignee is not an active human Project member. The HTTP body includes candidate candidatesChoose a human Project member as the assignee
invalid_ask_filter / invalid_ask_wait (422)invalid_argumentThe list filter, cursor, or wait time is invalid (timeout_secs must be between 1 and 50 and so on)Fix the value. Use the cursor from the previous list
ask_nonce_reuse (409)conflictThe same client nonce was already used with different contentFor a different request, send with a new nonce
ask_answer_conflict (409)—The revision sent with the answer is not the latest. The body includes the latest Ask (latest_ask)Read the latest Ask and answer, then answer again (I answered an Ask but work has not continued)
ask_cancel_not_authorized (403)SameOnly the creator, the assignee, or a Project admin can cancel an AskAsk one of them to cancel it
ask_conflict (409)conflictThe operation does not fit the Ask's state (Ask is already cancelled, Answered Ask cannot be cancelled, Cancelled Ask cannot be answered, Source Session is terminal, Project is not active)Read the Ask's current state before deciding
ambiguous_id (400)SameA short ID matched several targets (`<prefix>` matches ... Pass one full ID.)Choose the full ID from candidates (Specifying IDs)
VALIDATION_ERROR (400, chat wait)wait_targets_invalidThe wait targets do not meet the conditionsCheck each ID with the read in commands, and create the correct combination with a new client nonce (Waiting (chat wait))

Documents, sync, and Wiki

Sync failures from aachat up for documents, HTML, Database migrations, and the Wiki do not appear as error responses. They appear in _errors.md in each folder. Documents and similar use the form sync write attempt API error <status> (<code>): <message>. The Wiki uses Wiki write failed (HTTP <status>, <code>): <message>.

code (HTTP)In chatMeaningNext step
sync_protocol_version_mismatch (426)unexpected_responseThe client version does not match the server. It is checked on every authenticated request other than GET, and on every sync API requestRun aachat update, or reload the WebUI. Preserve the old local workspace, then ask a human to restart aachat up (aachat up fails to start or stops midway)
write_conflict (409)—The version your local change was based on is not the latest (projected file row version mismatch)Check the comparison with the latest version and fix it (Edit conflicts in the local projection)
permission_denied (403)—This Session or agent cannot write to that Project (read-only membership, outside the Session's scope, and so on). reason: session_closing means the Session is finishing, and local changes stay unsavedCheck the condition in message. For session_closing, check the result of finishing, and save unsaved changes in the next Session
project_unavailable (404)—The Project does not exist or is not active, or the Team is unavailable (project is unavailable for projected file sync)Check the Project's status (A Project or document cannot be read)
invalid_path / invalid_content / invalid_operation (400; 413 for content that is too large)—The path, content, or operation does not follow the rules. The reason is in messageFix the file as message says and save it again. Do not edit the generated _errors.md (Shared Documents are not syncing)
storage_unavailable (503) / internal—Storage is temporarily unavailable, or an internal server failureWait for sync to retry. If it continues, report it
wiki_conflict (409)—Someone else saved the Wiki first (The Wiki changed. Your draft is kept.). Your draft remainsCheck the differences with Review changes in the WebUI and save a resolved version (Team Wiki)
wiki_reference_conflict (409)—A Wiki link target in the body was moved or deleted, and the reference must be checkedCheck the target and save a resolved version

Media and attachments

Errors when sending

When you add attachments or Project Media to a Session instruction or message and there is a problem, INVALID_ATTACHMENT (400) is returned. In chat it becomes invalid_argument (failures of the upload itself, such as chat session run --attach, are attachment_upload_failed).

messageMeaningNext step
a message can include at most 10 attachmentsOne message can have at most 10 attachmentsReduce the number
message attachments exceed the 250 MiB total limitThe attachments total more than 250 MiBMake them smaller, or send them separately
the same attachment cannot be included more than onceThe same attachment was added twiceRemove the duplicate
attachment is unavailable; attach the file againThe attachment expired, belongs to another Project or sender, or is incompleteAttach the file again
Project Media is unavailable; remove it and retryThe attached Project Media is not ready, or belongs to another ProjectRemove it and resend. Add it again once the Media is ready
attachment metadata changed before the turn was accepted; retry the send and other message attachment ...The attachment information changed while sending, or its shape is invalidSend it again

Some other failures put a code at the start of message.

code (HTTP)In chatMeaningNext step
media_limit_exceeded: choose a file between 1 and <max> bytes (413)attachment_upload_failed (for chat attachments)The declared file size is 0 or over the limit for the formatUse a file within the limit (Supported formats and limits)
project_media_quota_exceeded: ... (413)—Total Project Media exceeds 20 GiBDelete unused Media or cancel unfinished uploads, then run it again
media_in_use: ... (409)media_delete_conflictIt cannot be deleted because a current Shared Document or Project HTML references the MediaRemove the references, then delete (Deleting)
attachment_upload_expired: ... (409)attachment_upload_failedThe attachment upload expiredAttach it again

Media and attachment failure states

When Project Media becomes failed, the reason stays in the Media's error.code and error.message. Failed Session attachments use the same codes. Read them in the WebUI Media tab or the attachment display.

codeIn chatMeaningNext step
media_upload_failed—The uploaded size does not match the declared sizeAdd the file again
media_type_not_supported—The format is not supportedUse an image (PNG, JPEG, WebP, GIF), MP4, or PDF
media_invalid—It is broken, truncated, or an encrypted PDF, and cannot be validatedReplace it with a valid file or an unencrypted PDF
media_limit_exceeded—It exceeds a limit such as size, dimensions, page count, or lengthReplace it with a file within the limits (Capacity and execution limits)
media_kind_mismatch—The content does not match the declared kindReplace the file. Changing only the extension does not change the format
media_processing_failed—The video could not be processedReplace the file and run it again
media_upload_expired—The upload did not finish in timeAdd it again from Media

If preparing an add in the WebUI fails, upload_errors[] returns upload_temporarily_unavailable (temporary; upload again), upload_preparation_failed (check permissions, then upload again), or upload_not_prepared (preparation did not finish; upload again). For media_unavailable, returned when a Session reads Media that is not in the same Project's ready list, read chat CLI error codes.

Project HTML

Project HTML build failures appear as descriptive text, not codes, in the HTML tab's diagnostics. Search by the shape of the text.

TextMeaningNext step
Project HTML build failed in <path>. ... / ... at reference '<ref>'. ...That file, or how it references Media, is invalidFix the reference to canonical form and sync again (Referencing Media in the same Project)
Project HTML references Media that is missing or not ready: ...The referenced Media does not exist or is not ready yetIt rebuilds automatically once the Media is ready. If it is missing, failed, or deleted, publish a replacement and fix the reference
Project HTML build failed because <path> is <size> bytes after Media references are rewritten; ... / ... the rewritten delivery is <size> bytes; ...After rewriting references, one file or the whole delivery exceeds the limitReduce files or repeated references and sync again (HTML and Shared Documents)

Sharing and preview operations return the following text.

code (HTTP)In chatMeaningNext step
CONFLICT (409, Project HTML delivery build is not ready. ...)conflictThe latest build is unusable, so sharing and preview are not possibleResolve the diagnostics of the latest build in the HTML tab, then run it again
CONFLICT (409, This project already has a public HTML link. ...)conflictA Project can have only one public linkUpdate or reset the existing link (Share)
CONFLICT (409, Extend the expired public HTML link before resetting its URL.)conflictAn expired link's URL cannot be resetExtend the expiry first
VALIDATION_ERROR (400, expires_in_days must be between 1 and 30 and so on)invalid_argumentThe expiry or password is invalid, or nothing was changedSpecify an expiry of 1 to 30 days or a password
STORAGE_UNAVAILABLE (503, Project HTML storage is temporarily unavailable. ...)server_errorHTML storage is temporarily unavailableWait and run it again

Project Database

In chat db, only DATABASE_SQL_EXECUTION_FAILED and DATABASE_RESULT_TOO_LARGE become lowercase codes of the same name. The others become the common code for their HTTP status, and the next step goes in hint.

code (HTTP)In chatMeaningNext step
DATABASE_NOT_INITIALIZED (409)conflictThere are no migrations yetCreate the first db/migrations/<id>.sql and run chat db migrate <file> (Create a table and store one result)
DATABASE_PREPARING / DATABASE_OVERLOADED (503)server_errorThe Database is being prepared, or is busyWait a little and run the same command again
DATABASE_RECONCILING (503)server_errorThe schema state is being reconciled. SELECT and DML can continueWait for reconciliation to finish, then run schema or migrate again
PROJECT_DATABASE_SOURCE_CONFLICT (409)conflictThe server does not have that migration file yet. Sync has not finished, or sync rejected itIf that migration is in db/_errors.md, fix the reason and save. If not, wait for sync. Then run the same migrate again
PROJECT_DATABASE_FROZEN (409)conflictThe Project is Archived, so it cannot be usedUnarchive the Project before using it
DATABASE_SQL_INVALID / DATABASE_VALUE_UNSUPPORTED (422)invalid_argumentThe SQL does not follow the rules, or the result has a value that cannot be handled (convert BLOBs with hex())Fix the SQL or the positional string parameters (Query and migration SQL rules differ)
DATABASE_SQL_EXECUTION_FAILED (422)database_sql_execution_failedThe Database rejected the SQL or the values passedCheck the constraints and current rows, then fix the SQL or values
DATABASE_SQL_RESOURCE_LIMIT (422)invalid_argumentThe SQL's execution cost exceeded the limitMake the statement, parameter count, or result smaller
DATABASE_RESULT_TOO_LARGE (413)database_result_too_largeThe result is too largeReduce columns or rows (Project Database)
MIGRATION_ID_CONFLICT (409)conflictThe same migration ID was already applied with different contentRestore the original content, or create it with a new migration ID
MIGRATION_VERSION_CONFLICT (409)conflictThe migration's parent version is staleRead chat db schema and rebuild from the current version
OPERATION_OUTCOME_UNKNOWN (409)conflictIt is unknown whether the write was appliedDo not send the same write. Check the current values with SELECT (Recover without duplicating writes)
DATABASE_SCHEMA_CHANGED (409)—The schema changed while you were viewing it in the WebUIReload the Database screen and select the table again
DATABASE_PROVISIONING_CONFLICT (500)server_errorAn unknown state was found while preparing the Database. Operations-side repair is neededReport it without SQL or credentials

Workflow

Definition and input validation

For Workflow commands, the codes below appear in chat in lowercase as is. The exit code is 2, except invalid_output and rendered_prompt_too_large, which are 1. The location is in got and the reason is in message.

code (HTTP)In chatMeaningNext step
invalid_workflow_yaml / invalid_bundle_path / cyclic_dependency / unknown_step_reference / invalid_prompt_variable / missing_completion_instruction / invalid_completion_instruction (422; 400 for a bad client_nonce)SameA validation error in the Workflow definition or BundleFix the spot in message and validate again (Definition fields)
invalid_input / invalid_output (422; 413 for input over 128 KiB)SameThe input or output does not match the schemaFix the value to match the schema (Supported input and output schemas)
bundle_too_large / rendered_prompt_too_large (413)SameThe Bundle, or the rendered prompt, exceeds the limitMake it smaller (Limits and how to recover)

Drafts, publishing, Runs, and completion

code (HTTP)In chatMeaningNext step
draft_version_conflict (409)SameThe Draft changed after you read itRead the latest Draft, then make the change again
workflow_unpublished (409)SameThe Workflow is not publishedPublish the Draft, then run it again (Validate, try, and publish)
workflow_archived (409)conflictThe Workflow is archivedRestore it with chat workflow restore, then edit, publish, or start a Run (Archive and restore)
workflow_revision_changed (409)conflictThe revision changed after you read itRead the revision again
invalid_run_state (409)SameThe Run's state does not accept the operation (cancelling, a Step that cannot be retried, a state that cannot be cancelled, direct cancel of a child Run, read-only history in an old format, and so on). The reason is in messageRead the Run's state. For an old Run, start a new Run (Next action by state)
completion_already_submitted (409)SameThat Step has already accepted another completionCheck the accepted completion in the Run detail
completion_session_mismatch (409; 403 when the Session differs)Same (not_authorized for 403)The Session that sent the completion is not the assigned Workflow Session, or is already finishingSend it inside the assigned Workflow Session. If it has finished, read the Run detail
workflow_completion_not_ready (409)conflictIt is not yet time to send the completion (Finish the task messages first. ...)Keep working, and send the completion after the Workflow sends its completion instruction
workflow_access_revoked (409)SameThe Step's agent is not an active collaborator on that ProjectMake the agent a collaborator again, then retry that Step
workflow_not_found / workflow_run_not_found (404)SameThe Workflow or Run was not foundSpecify it again with chat workflow list or a Run ID in the current Project
version_unavailable (404)project_not_foundThe specified revision, or the Run's definition, cannot be readSpecify the revision again. For a Run, start a new Run from the currently published version

Step failure codes

These stay in a failed Step's error.code and error.message. Read them in the Run detail or chat workflow status (Read the Run and recover). For config_not_offered and others from a Session that failed during startup preparation, read Session failures and startup codes.

codeIn chatMeaningNext step
agent_reported_failureSameThe agent sent its completion as a failureRead the reason in the Session record, fix the cause, then retry
completion_missingSameThe Session stopped without sending a completionRead the Session and retry
session_failedSameThe Step Session failedRead the Session's error, fix the cause, then retry
workflow_session_rejectedSameCreating the Step Session was rejected. The reason is in messageFix the cause in message, then retry
workflow_access_revokedSamePermission needed to run the Step was lost during the runRestore the permission, then retry
workflow_decision_cancelledSameThe Ask for a human decision (Decision) was cancelledRetry to create a new Ask
workflow_completion_limit_exceededSameA child Workflow's output exceeded the completion limitChange the child to save large results in the Project and return only references, publish it, and start the parent in a new Run

Triggers and Webhooks

code (HTTP)In chatMeaningNext step
time_trigger_request_conflict (409)Same (trigger create)The same request_id was already used for a create request with different contentCompare with chat trigger list. For a different create, send with a new request ID
time_trigger_request_deleted (409)Same (trigger create)The Trigger created by that request was deleted and was not recreatedIf needed, create it with a new request ID
CONFLICT (409, Trigger changed or is dispatching. Refresh and retry.)time_trigger_changedThe Trigger changed after you read it, or it is firingRead the latest state_version and decide again (Recover from conflicts, pauses, and unknown outcomes)
NOT_FOUND (404, commands that take a Trigger ID)time_trigger_not_foundThat Project has no such TriggerCheck the ID with chat trigger list --project <project>
CONFLICT and other 409 (commands that take a Trigger ID, other than the text above)time_trigger_conflictIt conflicts with the Trigger's current state or permissionsRead the state and reason again with chat trigger show from commands, then choose an operation
invalid_input (422, Webhook)—The Webhook request's JSON, Content-Type, fields, metadata, or prompt is invalidFix the request and send it (Responses and retries)
VALIDATION_ERROR (413, Webhook)—The body exceeds 256 KiB (Webhook body exceeds 256 KiB)Make the body smaller
RATE_LIMITED (429, Webhook)—The intake limit was reached (Webhook capacity reached; retry with the same idempotency_key). It includes Retry-After: 60Wait 60 seconds and resend with the same idempotency key

When a Trigger is paused, pause_reason gives the reason. The values are manual, project_inactive, permission_revoked, target_unavailable, input_contract_invalid, and workflow_archived. Recovery for each is in Recover from conflicts, pauses, and unknown outcomes.

A firing record (occurrence) may have a reason: previous_run_active (skipped because the previous work is still running), superseded_during_downtime (schedules missed while stopped were skipped together), or previous_run_superseded (accepted, replacing the previous work). For a failed occurrence, reason holds text explaining why it paused.

Messages and recipients

code (HTTP)In chatMeaningNext step
REPLY_TARGET_NOT_FOUND (400)reply_target_not_foundThe message to reply to does not existChoose an existing seq with chat read <project>
INVALID_REPLY_TARGET (400)invalid_reply_targetThe reply target is not a root message, or belongs to another ProjectChoose a root message in the same Project
MESSAGE_NOT_FOUND (404)thread_message_not_found (thread), post_type_message_not_found (post-type update), message_mutation_failed (edit, delete)The message does not existChoose the seq again with chat read <project>
MESSAGE_NOT_ROOT / MESSAGE_DELETED (400)post_type_requires_root_message / post_type_message_deleted (post-type update), message_mutation_failed for edit and deleteReplies have no post type, or a deleted message cannot be changedChoose a root message or one that is not deleted
MESSAGE_POST_TYPE_FORBIDDEN (403) / INVALID_MESSAGE_POST_TYPE (400)message_post_type_forbidden / invalid_message_post_typeNo permission to change the post type, or the value is invalidSpecify a supported value in a Project you can write to
USER_NOT_FOUND / AMBIGUOUS_USER (400)user_not_found / ambiguous_userNo member matches the name, or several do. Agents use the form <agent>.<owner>Specify the member's exact name

Secrets (Tools > Secrets)

Operations in Tools > Secrets in the WebUI return a response whose body is only {"code": ...}. No description is included. aachat running on the chosen Computer stores values and grants access. chat does not use these (Environment).

code (HTTP)In chatMeaningNext step
invalid_request (400)—The request shape is invalidReload the screen and try again
too_large (413)—The request or value is too largeMake the value smaller
not_found / owner_mismatch (404)—The target Computer or Agent was not found, or that Computer's Secrets settings belong to another ownerChoose a Computer you are connected to
busy (409)—An operation of the same kind is in progress on the same ComputerWait for it to finish and run it again
conflict (409)—Local settings or access grants changed during the operationRead again with Refresh, then act
unavailable (503)—The Computer is not connected, or cannot be narrowed to oneStart aachat up on that Computer and Refresh
unsupported (503)—aachat on that Computer is too old to support this operationRun aachat update on that Computer
local_setup_required (503)—Old-format local settings remainAn authenticated human runs aachat env adopt in a terminal (Adopt existing local settings)
timeout (504)—It did not finish within 40 secondsCheck the state with Refresh, then run it again
invalid_data / already_exists / permission_denied / cancelled / unknown (400)—Local settings, the Keychain, or .env cannot be read, the item already exists, the OS did not grant permission, it was cancelled, or the failure could not be classifiedCheck file permissions and the Keychain state on the target Computer, then Refresh (Check requests and apply changes)

Skill

code (HTTP)In chatMeaningNext step
skill_not_found / ambiguous_skillSame (skill feedback)The skill targeted by feedback does not exist, or several share the name. The feedback was not savedChoose the exact name from candidates. For duplicates, add --source
skill_source_authorization_required (403)—There is no GitHub connection to read the Skill's repository, or it expiredReconnect with Connect repository (Skill Ledger)
skill_source_changed / skill_source_revision_conflict (409)—The source or version changed after you opened itOpen it again from the list
skill_source_file_missing (404) / skill_source_ref_missing (502)—The file, or a reference such as a branch, was not foundCheck the branch and file location, then open it again from the list
skill_source_rate_limited (429) / skill_source_timeout (504) / skill_source_fetch_failed (502)—Fetching the repository was rate limited, did not finish in time, or failedWait and Retry
skill_source_limit_exceeded (413)—The content to fetch exceeds the limitMake the Skill's files smaller

GitHub integration

GitHub API failures are mapped by GitHub's status. 401, 403, 404, and 429 become aachat's UNAUTHORIZED, FORBIDDEN, NOT_FOUND, and RATE_LIMITED, with message starting with GitHub authentication failed., GitHub access denied., GitHub resource not found., or GitHub API rate limit exceeded. Please try again later.. Everything else becomes GITHUB_ERROR (502).

An UNAUTHORIZED whose message starts with GitHub is a GitHub authentication problem, not an aachat sign-in problem. In chat both become token_required, so tell them apart by message.

code (HTTP)In chatMeaningNext step
UNAUTHORIZED (401, GitHub authentication failed. ...)token_requiredGitHub authentication failedAsk a human to re-authenticate with GitHub (Authentication fails)
FORBIDDEN (403, GitHub access denied. ... or ... requires the `<scope>` GitHub permission. Please re-authorize.)not_authorizedGitHub permissions or scopes are insufficientRe-authenticate with the needed permissions. For connecting a repository, read A GitHub repository cannot be connected. For cloning, read A Discover clone fails
RATE_LIMITED (429, GitHub API rate limit exceeded. ...)network_errorThe GitHub API rate limit was reachedWait and run it again
GITHUB_ERROR (502)server_errorThe GitHub API returned an unexpected response (GitHub API returned an unexpected error (<status>). ...)Wait and run it again

External AI connection (OAuth)

The OAuth entry points for Connected apps (remote MCP) return failures in the standard OAuth form {"error": "<code>"}. The codes are invalid_request, invalid_client (401), invalid_client_metadata, invalid_grant, invalid_scope, unsupported_grant_type, temporarily_unavailable, and server_error (503). The external AI client handles these. As a user, redo the external AI connection (Connected apps).

aachat CLI error codes

On failure, ordinary aachat commands return one JSON object on stdout. Its shape is {"ok": false, "error": {"code": ..., "message": ..., "field"?, "expected"?}, "data"?, "warnings"?, "next_actions"?}. Read next_actions first, then message. data is present only when there are partial results or change.state (not_applied, applied, unknown).

The exit code is 2 for invalid_argument, missing_argument, and conflicting_arguments, and 1 for other failures. aachat up, interactive aachat support, aachat manage-agent, aachat env --interactive, and aachat doc check --hook do not return JSON (Output format).

Server codes (FORBIDDEN, AGENT_RUNTIME_OFFLINE, and so on) are mapped in aachat to the small set of codes in the table below. The server's description stays in message. To look up the original server code, read the server API code sections.

codeMeaningNext step
auth_requiredaachat authentication is unusable. It appears when sign-in expired or the server rejected authentication (HTTP 401)Read aachat auth status. If gh is authenticated, aachat auth login can refresh it. If a GitHub login is needed, ask a human to run gh auth login (Authentication fails)
authentication_requiredaachat auth login could not get the GitHub CLI authentication tokenAsk a human to run gh auth login, then run aachat auth login again
team_requiredThe Team cannot be decided. You are outside a connected repo without --team, or no Team is visiblePass --team <slug>, or run it inside a connected repo. Check the connection with aachat status
ambiguous_teamThere are several candidate TeamsPass --team <slug>
team_not_foundThe repo's connected Team is not visible to the current accountAsk the Team owner for access and check with aachat status
repo_not_connectedAn operation that needs a connected repo ran in a repo without aachat/README.md, or outside a repoRun it at the root of a connected repo. If it is not connected, ask a human to run aachat init
connection_invalidThe repo's connection information (contents or version of aachat/README.md) is invalid and cannot be readFix it following connection.reason and next_actions from aachat status, then run aachat init
permission_deniedNo permission for the operation (HTTP 403 and so on). It also appears when the --output destination lacks write permissionAsk the Team or Project owner for permission. For --output, change the destination
admin_requiredThe operation needs Project admin permissionAsk a Project admin to do it or grant permission
collaborator_requiredWrite permission on the Project (collaborator or admin) is requiredAsk a member with write permission to add you, or choose a Project you can write to
project_out_of_scopeYou specified a Project outside what the current credentials can handleSpecify a Project that covers the target
cross_project_read_onlyOther Projects can only be read, not changedReport in your own Project and leave it to that Project's human or Lead
project_not_foundThe Project was not found. It does not exist or is not visibleCheck the name and Team with aachat project list or similar (A Project or document cannot be read)
session_not_foundThe Session was not foundCheck the ID with aachat session list --agent <name>
agent_not_foundThe agent was not found. It also appears when you specify an agent that is not a Project memberCheck the agent name and add it to the Project if needed
blueprint_not_foundThe source repository or blueprint was not found or cannot be readCheck the source you specified and your read permission on GitHub
session_not_runningThe target Session is not runningRead the state with aachat session read <id> --project <project>. To resume, read A Session failed or stopped midway
not_foundThe specified document path, saved body, chosen message, or similar does not existRead message and field, and specify it again from a list
conflictIt conflicts with the current state (HTTP 409 and so on). It also appears when a Project or Session blocks ArchiveRead the state again, resolve the cause shown in data, then run it again
invalid_argumentAn argument or value is invalid. It also appears when a human-only aachat operation runs inside an Agent SessionFix it to match message, field, and expected. Inside a Session, use the chat command in next_actions (Output format)
missing_argumentA required argument or subcommand is missingCheck the required arguments with aachat <command> --help
conflicting_argumentsYou passed arguments that cannot be used togetherPass only one of them
prerequisite_missingA prerequisite is missing. It appears when a needed tool (such as npx) is not on PATH, when the agent's runtime is not connected so a Session cannot start, when the sync protocol version does not match the server, and so onTell the cause apart by message. Install the tool, ask a human to run aachat up, or run aachat update
interactive_requiredAn operation that needs a terminal (TTY) ran non-interactively. It also appears when aachat skills add has no --skillAsk a human to run it in a terminal. For skills add, specify --skill <name>
confirmation_requiredAn operation that needs confirmation has none (deletion without --yes, non-interactive Archive with unfinished Runs and no --cancel-runs)Get human approval, then run it again with --yes or --cancel-runs. Nothing has changed (Archive is blocked or does not complete)
content_changedThe body changed while reading the rest with --fullRead again from --offset 0
already_exists / io_errorWriting --output failed. The former means a file with the same name already existsSpecify a new path. Existing files are not overwritten
capacityA write failed for lack of free space, or the capacity check in aachat status could not finish in timeCheck capacity and retained workspaces with aachat doctor (A Session cannot start because disk space is short)
network_errorCannot connect to the server. HTTP 429 (too many requests) also becomes this codeCheck the network and run it again later. For a change, check whether the first request was accepted before running it again
server_errorThe server returned 5xxWait and run it again. If it continues, report it with aachat report
internal_errorA failure that matches none of the above. It appears for local file or Git failures and unexpected responsesRead message and pass code and message to aachat support

chat CLI error codes (inside a Session)

On failure, chat inside a Session returns one {"ok": false, "error": {"code": ..., "message": ..., ...}, "data"?: {...}} on stdout. When available, error includes command, project, name, field, got, expected, candidates, available_agents, commands, reply_to, and hint. commands is an array of command locators you can run next.

message is the server's description if there is one, and otherwise guidance on the next step. Only when the server's description is in message does the guidance appear separately in hint.

The exit code is 2 for invalid_argument, missing_argument, conflicting_arguments, and Workflow validation errors (invalid_input, invalid_workflow_yaml, invalid_bundle_path, bundle_too_large, cyclic_dependency, unknown_step_reference, invalid_prompt_variable, missing_completion_instruction, invalid_completion_instruction), and 1 otherwise.

chat maps server codes to lowercase codes. For example, the server's AGENT_RUNTIME_OFFLINE becomes agent_runtime_offline, and FORBIDDEN becomes not_authorized.

Common codes

codeMeaningNext step
session_requiredA Session-only command ran in an environment without AA_SESSION_IDRun it inside an aachat Session. Outside a Session, use aachat
token_requiredThere is no agent token (AA_TOKEN_FILE and AA_TOKEN are unset), or the server rejected the token (HTTP 401)Run it inside a Session started by aachat up. If it continues, ask a human to check the state of aachat up
invalid_argumentAn argument or value is invalid. It also appears when an input file or stdin cannot be read, AA_SESSION_ID is not a UUID, or the server rejected the inputFix it to match field, got, expected, and message
missing_argumentA required argument or subcommand is missingCheck with chat <command> --help
conflicting_argumentsYou passed arguments that cannot be used togetherPass only one of them
not_authorizedNo permission (HTTP 403)Check that you are running with the current Session's token, and ask a Project member for permission
admin_requiredProject admin permission is requiredAsk a Project admin to do it or grant permission
collaborator_requiredWrite permission on the Project (collaborator or admin) is requiredAsk a member with write permission to add you, or choose a Project you can write to
ask_cancel_not_authorizedOnly the creator, the assignee, or a Project admin can cancel an AskAsk one of them to cancel it
project_not_foundThe Project does not exist or this agent cannot read it. The two are not distinguishedCheck the name with chat projects --status all (A Project or document cannot be read)
project_not_activeThe Project is not In progress (active)Set the Project's status to In progress, or ask a Project admin (A Session does not start)
project_out_of_scopeIt is outside the Projects the current Session coversChoose a Project that covers the target, or start a Session that covers that Project
cross_project_read_onlyOther Projects can only be read, not changedReport in your own Project and leave it to a human or that Project's Lead
session_not_found / ask_not_foundNo matching Session or Ask in the specified ProjectCheck the ID in the list from commands, or choose a different --project
session_not_runningThe target Session is not runningRead its state with chat session read. If it is stopped or failed and can resume, send with --resume (A Session failed or stopped midway)
agent_not_found / ambiguous_agentNo active agent matches the name, or several doChoose the exact name from available_agents or candidates
agent_runtime_offlineThe agent's runtime is not connectedAsk a human to start aachat up for that agent, then run it again (A Session does not start)
agent_runtime_project_unavailableThe runtime is connected but cannot handle that ProjectAsk a human to reconnect aachat up or update the agent's Project membership
session_command_undeliveredDelivery could not be confirmed, or the runtime rejected the instructionRead message and check Session history, state, and whether the operation took effect. Restore the connection if needed; resend once only after confirming it did not arrive or take effect. For permission answers, use the dedicated recovery steps (Runtime delivery)
ambiguous_idSeveral targets match the short IDChoose one full ID from candidates (Specifying IDs)
ambiguous_project / ambiguous_user / user_not_foundThe Project or user name matches several, or noneSpecify it again with chat projects --status all or a more specific name
reply_target_not_found / invalid_reply_target / thread_message_not_foundThe reply or thread message does not exist, or is not a root messageChoose an existing seq with chat read <project>
operation_outcome_unknownIt is unknown whether the server accepted the change request. It appears when no response arrived after sending, or on HTTP 408, 429, or 5xxDo not create a new request. Follow the command's message and hint, and the command-specific recovery guidance above. commands may contain change operations or reads, or be absent (Retrying the same request)
conflictIt conflicts with the current state (HTTP 409)Read the state of the Session or other target again, and run it again once the conflict is resolved
network_errorCannot connect to the server. HTTP 429 on operations not treated as unknown outcome also becomes this codeCheck the network and run it again later
server_errorThe server returned 5xxWait and run it again. If it continues, report it
unexpected_responseThe response does not match what chat expects, or the failure cannot be classifiedRecord chat --version and pass code and message to support
output_write_failedThe result could not be written to stdoutCheck the output destination (pipe or similar)

Codes by feature

codeMeaningNext step
ask_wait_timeoutThe Ask is still open after the specified wait timeRead the current state with chat ask show from commands
wait_targets_invalidThe wait targets (Session, Workflow Run, Ask) do not meet the conditionsCheck each ID with the read in commands, and create the correct combination with a new client nonce (Waiting (chat wait))
wait_not_foundThe specified wait was not foundCheck that the wait ID, source Session, and Project match the receipt from creation
workflow_not_found / workflow_run_not_foundThe Workflow or its Run was not foundSpecify it again with chat workflow list or a Run ID in the current Project (Workflows)
workflow_bundle_not_readyThe workspace mirror could not confirm the Bundle's latest state in time. Nothing was started or publishedWithout editing anything, run the same command from commands again
draft_version_conflictThe server Draft changed while waiting, or conflict markers remain. Nothing was sentRead data.conflict_files and data.changed_files, resolve the markers, and run the same command again
workflow_validation_failedThe Workflow Bundle did not pass validationRead the validation results in data and fix them
invalid_workflow_yaml, invalid_bundle_path, bundle_too_large, cyclic_dependency, unknown_step_reference, invalid_prompt_variable, missing_completion_instruction, invalid_completion_instruction, invalid_input, invalid_output, rendered_prompt_too_largeValidation errors in the Workflow definition, input, or outputRead the location in field and got and the message, and fix it (Workflows)
workflow_session_managedThe Workflow manages how a Workflow Step Session finishesDo not run chat session finish again. End this turn normally and follow the Workflow's completion instruction
session_pending_follow_upsQueued follow-ups remain, so the Session cannot finishEnd this turn, handle them in the next turn, then run chat session finish again
time_trigger_not_found / time_trigger_changed / time_trigger_conflictThe Trigger was not found, changed after you read it, or conflicts with its current stateRead the latest Trigger and state_version again with commands, then decide (Recover from conflicts, pauses, and unknown outcomes)
time_trigger_request_conflict / time_trigger_request_deletedThe same create request ID was used with different content, or the created Trigger was deletedRead message and data.mutation_state, and compare with chat trigger list
trigger_target_unavailable / trigger_agent_not_foundThe Trigger's target is unavailable, or no member matches the agent nameChoose the exact target from the list in commands
webhook_request_requiredWebhook Triggers have no time previewCheck by sending an authenticated JSON request to the webhook URL (Triggers)
media_unavailableThat Media is not ready yet, or is not in this ProjectIt cannot be used until it appears in chat media <project> from commands (Media)
media_download_failedFetching the Media failed. No file was writtenRun it again once. If it fails again, report it
media_delete_conflictThe Media cannot be deleted in its current state. It appears when a Shared Document or Project HTML still references it, among other casesRead message and remove the reference from the referencing file. Read again with chat media <project> from commands, and run the delete again only if it is in the list
attachment_upload_failedUploading an attachment failed. The instruction to the Session was not sentCheck the attachment path and the network, then run it again
project_lead_not_parent_member / ambiguous_project_leadThe specified Lead is not an active member of the parent Project, or matches severalAdd them to the parent Project with chat project assign from commands, or choose from candidates
owned_agent_requiredYou can only specify non-deleted agents owned by the owner of the source SessionChoose an agent you own. Add others through a human with permission
project_lead_requiredIt can only run from the current Project Lead's SessionRun it again from the Project Lead's Session
skill_not_found / ambiguous_skillThe skill targeted by feedback does not exist, or several share the name. The feedback was not sentChoose the exact name from candidates. For duplicates, add --source
session_not_active / forbiddenThe Session is not in a state that can send skill feedback, or the token is not the current Session'sSend it from a running Session with that Session's token
message_mutation_failedThe message cannot be changed (it does not exist, is deleted, is not yours, is outside your write scope, and so on)Follow hint, and choose the target seq again with chat read <project>
post_type_message_not_found / post_type_requires_root_message / post_type_message_deleted / message_post_type_forbidden / invalid_message_post_typeYou specified a message or value whose post type cannot be changedChoose an existing root message with chat read <project> and specify an allowed value
database_sql_execution_failed / database_result_too_largeSQL execution failed, or the result is too largeCheck the constraints and values and fix the SQL. If the result is large, reduce columns or rows (Database)
result_report_incompletePart of the results was not recordedResend the provided resend payload as is, and follow the message of the failed items. Do not repeat the original work
result_retry_persistence_failedCreating or updating the resend file failed; this can happen before or after sendingRead data.mutation_state, retry_file_state, items, and retry_payload. Do not resend the original batch or a stale file (Result report recovery)
inbox_mark_incompletePart of the read-status update could not be confirmedRead data.unconfirmed and read the list again
publication_preparation_failedPreparing a Discover publication failedFix the cause in message and run it again

aachat doctor checks and codes

Each item in data.diagnostics.issues[] from aachat doctor (checks[] with --view checks) has an id and a code. By default code equals id. It takes a different value only when the cause is known. Read the state in state (pass, fail, unknown, skipped) and the severity in category (blocker, preservation, maintenance, information). How to read overall is in Diagnose first.

If the diagnosis itself was interrupted, or child process cleanup could not be confirmed, it returns {"ok": false} with exit code 1. error.code is internal_error, and error.message is cancelled or probe_cleanup_unverified. Items already collected stay in data.

Checks (id)

idWhat it checksNext step on fail or unknown
platformThe aachat version and OSInformation only
user_jwtExpiry and format of the saved sign-in. User JWT: expired means it expiredGet human approval and run aachat auth login (Authentication fails)
github_cliWhether gh is presentInstall gh
github_authWhether gh auth status could be checked. unknown is not evidence of being unauthenticatedRead gh auth status
github_scopesWhether the GitHub token has the repo and read:user scopesOn fail, ask a human to run gh auth refresh -s repo,read:user
nodeWhether Node.js meets the runtime adapter's minimum versionInstall a supported Node.js version
chat_companionWhether the bundled chat is present and the same version as the CLICheck the CLI installation and run aachat doctor again
runtime_path / login_shell_pathWhether the runtime PATH can be built, and whether the login shell PATH was obtainedCheck your PATH settings. Do not share the values
provider_readinessAlways unchecked (not_applicable). It does not log in to providers or call modelsInformation only
wsl2_systemd / loginctl_lingerLinux and WSL2 user service settings. not_applicable on other OSesCheck using the steps in message. Get human approval before changing settings
api_health / api_workspace_handshakeWhether the API is reachable, and whether the workspace API can be called with the saved sign-in. On failure, code is an aachat CLI code such as network_error, auth_required, or server_errorCheck the connection and authentication with aachat status
daemonWhether the aachat up process is runningIf it is stopped, ask a human to run aachat up
project_workspace_host / project_workspace_repoWhether the projection (the mechanism that copies Project documents and similar to your machine) has placement problems. code is one of the projection placement codes belowRead the table below
projection / projection_observation / projection_write / projection_project / projection_team / projection_sync_timeSync state. code is one of the sync codes belowRead the table below
session_workspace_capacityWhether the Session workspace location has 20 GiB freeRead A Session cannot start because disk space is short
session_workspace_maintenance / session_workspace_retained / session_workspace_artifactCheck results for retained Session workspaces. code is one of the workspace maintenance codes belowPreserve your work, then follow each item's next_actions

Codes when a check did not finish

codeMeaningNext step
probe_timeoutThe check did not finish in time. That item is unconfirmedThe other items are valid. Narrow the target and check it
probe_output_limitThe check's output exceeded the limitSame as above
probe_failedThe check could not complete. It also appears when a needed executable is missingRead reason and check the related dependency
cancelledIt was interrupted. Later checks become skippedRun it again
probe_cleanup_unverifiedCleanup of the check's child processes could not be confirmed. Later checks become skippedRun it again. If it continues, pass it to support
not_applicableNot applicable in this environment (another OS, sync items while aachat up is stopped, and so on). It does not count as unfinishedNothing to do
workspace_inspection_complete / workspace_inspection_incompleteSummary of the workspace inspection. complete means classification and measurement of the observed range finished. It does not mean there are no problemsIf incomplete, read coverage and narrow down the unconfirmed range

Sync codes

codeMeaningNext step
sync_protocol_version_mismatchThe CLI's sync protocol does not match the server, so sync stopped. The last synced files remain but are not the latestCheck whether an auto-update is in progress. After aachat update, ask a human to restart aachat up (aachat up fails to start or stops midway)
workspace_mirror_errorThe last observed repo-side mirror was in error. Current sync is unconfirmedRead the current state with aachat status
projection_write_blockedSync is stopped by a local write or a diagnostic file (_errors.md)Fix the cause in the diagnostic. Do not edit the generated _errors.md (Shared Documents are not syncing)
projection_pendingLocal writes have not been sent yetWait for sending to finish and check with aachat status
projection_observation_failedObserving this path failed. Counts are partialCheck the path's permissions and the filesystem
project_sync_failed / sync_list_unstable / invalid_sync_listProject sync failed. The latter two mean the list received from the server is unstable or invalidRead the target Project's state with aachat status and check again later
project_sync / projection / team_projectionThe default for sync items with no matching problem codeRead state and reason
team_projection_revokedAccess to the Team was revoked, and the Team projection stoppedAsk a human to restore access to the Team
projection_sync_timeThe last successful sync time is missing, invalid, or in the futureCheck with aachat status

Projection placement codes

These appear in the code of project_workspace_host and project_workspace_repo, and at the start of projection.reason in aachat status.

codeMeaningNext step
projection_namespace_migration_requiredOld-format projection state remains. Normal startup does not migrate itRead Startup requires a layout migration and start aachat support
projection_namespace_migration_pendingMigration from the old format stopped partwayPreserve the root and recover with aachat support
projection_namespace_split_brainOld-format and new-format state exist at the same timePreserve the workspace and recover before restarting aachat up
projection_unknown_top_level_entryThere is an unknown file in the projection's managed areaMove that file outside the managed area and restart aachat up
projection_root_invalid / projection_owner_root_invalidThe projection's managed area is not a local directory (a symlink or similar)Replace it with a local directory and run aachat doctor again
projection_root_unreadable / projection_owner_root_unreadable / projection_entry_unreadableThe projection's managed area cannot be readRestore read permission and run aachat doctor again
project_workspace_projection_invalidThe Project workspace's projection state is invalidStart aachat support. Do not edit the generated baseline or diagnostics directly
project_workspace_layout_upgrade_availablelayout 7 can be upgraded to layout 8 (notice only)Nothing to do. Only the record is updated at the next Session start

Workspace maintenance codes

These appear in the code of session_workspace_maintenance and session_workspace_retained. None of them permits deletion. Preserve your local work before acting.

codeMeaning
uncommitted_workspace_changes / uncommitted_agent_changesThere are uncommitted changes
local_workspace_commits / local_agent_commitsThere are commits whose push cannot be confirmed (judged only from local remote-tracking refs)
non_git_workspace_filesA workspace not managed by Git has files
wiki_local_workThere are unsaved Wiki drafts
builtin_agent_local_workA built-in Agent's snapshot has edits
agent_owned_workspace_headHEAD is not an aachat-managed branch, so it was retained as the agent's Git state (session_workspace_retained, information only)
agent_cleanup_metadata_missingA record needed for cleanup is missing
git_inspection_failed / cache_lock_failed / common_git_dir_missingThe Git state could not be checked
worktree_remove_failed / branch_remove_failed / scratch_workspace_remove_failed / builtin_agent_remove_failed / workspace_identity_remove_failedDeletion failed
workspace_repository_mismatch / workspace_repository_unknownThe workspace's repository differs from the record, or cannot be confirmed
workspace_identity_missing / workspace_identity_invalid / workspace_identity_mismatch / orphan_workspace_identityThe record of the workspace's owning Session is missing, invalid, or inconsistent, or there is no matching workspace
workspaces_dir_unreadable / workspace_entry_unreadable / workspace_identities_dir_unreadable / workspace_identity_entry_unreadable / workspace_identity_target_unreadable / workspace_identity_unreadable / scratch_workspace_unreadable / scratch_workspace_entry_unreadableCannot be read, due to read permission or similar
workspace_inventory_boundary_unknown / scratch_workspace_boundary_unknownThe filesystem boundary cannot be confirmed
wiki_inspection_failedChecking Wiki drafts failed

The next step appears in each item's next_actions. Commit and push uncommitted or unpushed work, or save it elsewhere. For "cannot be read" and "cannot be confirmed" items, check permissions and paths, then run aachat doctor again.

aachat status warnings[] and state values

aachat status may return warnings[] and next_actions even on success. The next step appears in next_actions.

warnings[].codeMeaningNext step
project_sync_unavailableSync is unavailable for some Projects. The last synced files remain, and writes to those Projects stopRead the target and cause in projection_project from aachat doctor
session_workspace_capacityFree space for Session workspaces is below 20 GiB, or cannot be measuredFollow the instructions in message (A Session cannot start because disk space is short)
session_workspace_capacity_incomplete / session_workspace_capacity_unavailableThe capacity check did not finish in time, or could not runCheck capacity with aachat doctor
session_workspace_maintenancePast workspaces had local work or items needing review, and were preserved. It does not block runtime startupRead paths and steps with aachat doctor
fieldValuesMeaning
connection.stateready / connected / missing / invalid / unavailableConnection and Team access confirmed / only the local connection confirmed / outside a repo or not connected / connection information invalid / not registered, Team not visible, or cannot be confirmed
auth.statevalid / expired / missing / invalid / unavailableState of the saved sign-in. unavailable means it could not be read
daemon.staterunning / stopped / unknownWhether aachat up is running
projection.staterunning / stopped / error / blocked / missing / unknownSyncing / stopped / sync has a problem (including protocol mismatch) / projection placement has a problem / projection destination not created / cannot be confirmed
gaps[].codeunavailableThat field could not be observed. It does not mean there is no problem

When projection.state is blocked, projection.reason has the form <code> at <path>: <description> Next: <next step>, and <code> is one of the projection placement codes. How to read error is in aachat up fails to start or stops midway.

Launch Report categories

aachat up writes each agent's startup result to up.log as a Launch Report. A failed agent shows Error [<category>]: ... and action: under [failed] <agent>. Even with an agent marked [failed], aachat up itself keeps running.

When aachat up itself fails and exits, the same category appears in up.log, and the exit code is determined by the category.

CategoryExit code when aachat up itself exitsWhere to look
PREREQ2Instructions from aachat doctor. The missing tool
CONFIG2The displayed agent repo files and settings
AUTH3gh auth status. If needed, a human runs gh auth login
NETWORK4Network and server state
API1Server state and message
PERMISSION_DENIED1Team and Project access
GIT1Connection, authentication, and branch settings for GitHub, and the agent repo's state
CAPACITY1Retained workspaces and free space (20 GiB) in aachat doctor
IO1Files at the displayed path

For what to do per category and how to read Runtime Health, read aachat up fails to start or stops midway.

Session failures and startup codes

When a Session fails during startup preparation, step (the preparation stage that failed), message, code, and subject stay in the Session's runtime_facts.bootstrap.failure. The WebUI shows message and Initialization step: <step>. code is one of the four below and is absent for other failures. All of them are failures before the prompt is sent. In a Workflow Step, the same codes appear as the Attempt's failure. When a Step Session fails without one of these codes, the Attempt's failure code is session_failed.

codeMeaningNext step
workspace_capacity_insufficientThe Session workspace has less than 20 GiB free. Tool execution and workspace creation have not startedRead A Session cannot start because disk space is short
config_not_offeredThe runtime does not offer the specified Runtime setting (the option in subject)Remove the setting, or choose another Runtime. For a Workflow, check with chat project members <project> --runtime-profiles and fix workflow.yaml (Runtime and model defaults)
config_value_not_acceptedThe runtime does not accept the specified valueChoose an offered value
config_not_provenIt could not be confirmed that the setting was applied (including rejection, timeout, and unreadable responses)Check the runtime and adapter. In a Workflow, if the same setting is fine, retry only the Steps that can be retried

In aachat session list and session read results, a failed Session's error is {"code": "session_failed", "message": ...}. In the list, attention.items[].code is permission_pending (waiting for a permission answer), submission_pending (there is an unprocessed request), or failure (it failed). For how to continue a failed Session, read A Session failed or stopped midway.