API error codes
Troubleshooting
Issue, dispatch, job and run
This page uses four words for four different things:- Issue — the ticket in Linear or Jira that you flag.
- Dispatch — the orchestrator starting a workflow for that issue.
- Job — the orchestrator’s record of one dispatch, and what carries a status.
- Run — the workflow execution itself, and what produces a failure message.
run_not_found case below.
Issue lifecycle
AI-Implement moves each issue through a fixed set of stages. The diagram shows the stages and what moves an issue between them.Ticket comments
AI-Implement comments on the issue it is working so you can follow a run from your issue tracker, without watching the admin UI or the GitHub Actions logs.- Progress comments — posted at each stage of a session run.
- Outcome comments — posted when a run opens a pull request or fails.
- Run stats — a per-pass breakdown, posted when the review approved the work.
- Run autopsy — the same breakdown when it did not.
Progress comments
When a run executes in a session (Fly Machines or local Docker), AI-Implement posts a comment at each stage:Outcome comments
These report how a run finished:- A pull-request link, posted when the run opens a PR.
- A failure notice when a run errors out:
⚠️ Planning failed: {reason}or⚠️ Implementation failed: {reason}. - A log excerpt, posted on a terminal failure or timeout and labeled with the context below.
- An explanation of the outcome, posted whenever a run did not finish cleanly.
{reason} is the underlying failure message from the run.See Run failure messages for what these messages contain and how to resolve them.Run stats and autopsy
An implementation run closes with a table of its passes, one row each:- The iteration number
- What the implement pass did
- How many turns it took
- What it cost
- Whether review approved it
- Run stats, when review approved the work. Adds the total cost across passes, and compares the files the plan declared against the files the run actually changed.
- Run autopsy, when it did not. Names the reason the run stopped, quotes the reviewer’s final feedback, and links the draft pull request holding the work — or says none could be opened, when the run produced no changes at all.
Blocker reasons
The orchestrator checks for eligible issues on a schedule. When it skips one, the Blockers view in the admin UI shows why. Most reasons clear on their own once the condition changes — a slot frees up, or the issue’s dedup entry is cleared — butno-mapping needs you to add a project mapping.
Job status values
Each job moves through these statuses, shown in the dispatch log and the issue list. Non-terminal statuses describe a run still in flight; terminal statuses are the final outcome and do not change afterward.timed_out status carries one of these reasons:
Overdue run recovery
A run does not hang forever when it stops reporting back. The orchestrator checks every job on its poll cycle and recovers the ones that have gone quiet. A run is overdue once it has stayed non-terminal for its project’s configured Job Timeout (min) plus a short grace period, counted from the moment its job was dispatched. The run hit the time limit covers where that timeout is set and how to raise it. Recovering one, the orchestrator:- Cancels the workflow run, when one was ever linked to the job.
- Clears the issue’s in-progress marker and its dedup entry, which together are what make it eligible again.
- Leaves the next poll to dispatch a fresh job against the same issue.
run_not_found as its last run status.- Posts an AI Implementation Stuck — Needs Human comment on the ticket, naming the attempt count and the last run.
- Sends a notification, when a webhook is configured to receive one.
- Leaves the dedup entry in place, so no poll picks the issue up again.
Run failure messages
When a planning or implementation run fails, AI-Implement posts the reason on the issue as⚠️ Planning failed: {reason} or ⚠️ Implementation failed: {reason}. The {reason} pairs a short note about which step failed with the underlying error from the tool involved (Claude, git, or the package manager).
The most common failures are listed below.
Reached max turns
The run stopped at the per-run turn limit before finishing
Reached max turns
The run stopped at the per-run turn limit before finishing
The Claude run failed
Claude ended with an error before finishing
The Claude run failed
Claude ended with an error before finishing
Implementation failed: LLM invocation failed with exit code 1: …Claude’s run ended with an error rather than completing — for example an API error or a loss of context. The exit code and the end of the message point to the underlying cause.No changes were produced
Claude finished without editing any files
No changes were produced
Claude finished without editing any files
Implementation failed: Nothing to commit: Claude left no file changes in the working treeClaude finished without changing any files, so there was nothing to open a pull request with. The issue may already be addressed, or may need more detail before a re-run.Pushing the branch or opening the PR failed
The push or pull-request creation was rejected
Pushing the branch or opening the PR failed
The push or pull-request creation was rejected
Implementation failed: PR creation failed with HTTP 422: …AI-Implement could not push the branch or open the pull request — commonly branch protection rules, missing repository permissions, or a pull request already open for the branch.Cloning the repository failed
The target repository could not be checked out
Cloning the repository failed
The target repository could not be checked out
Implementation failed: git clone failed (exit 128): …The runner could not clone or check out the target repository — commonly repository access or permissions, or a missing branch.Blocked by a security guardrail
A staged change looked like a secret, so the push was blocked
Blocked by a security guardrail
A staged change looked like a secret, so the push was blocked
🔒 Blocked by security guardrail, followed by Push blocked: N sensitive file(s) would be committed: and then each offending file with the reason it was flagged.A file is flagged when it falls into one of these categories, with a few examples of each:- Environment and config files —
.env,secrets.yml, or acredentials.yml.enc. - Private keys and certificates —
.pemand.keyfiles, or an SSH key likeid_rsa. - Cloud credentials — an AWS
credentialsfile, a GCP service-account JSON, or a.tfstate. - Database credentials — a
.pgpassfile or adatabase.yml. - Tokens and auth files —
.npmrc,.netrc, or akubeconfig.
.gitignore so it’s never staged, then re-run the issue.