Requester identity
POST /agent-runs requires one of:
requested_by-user:<id>orservice:<name>user_id- legacy user id, normalized asuser:<id>
requested_by_email must be a valid email address. If both
requested_by and user_id are sent, they must identify the same user.
User requesters are capped at 10 active queued or running agent runs and
receive 429 when the limit is reached.
List agent runs
error_group_id- optional error group UUID for fix-run historyintent- optionalfixortriagelimit- optional result limit, default50, max200thread_id- optional shared conversation thread id
Create an agent run
thread_id to link the run to an existing project conversation. The same
run then remains discoverable from the web, Slack, API, and CLI investigation
record without copying model output between surfaces.
For intent=fix or intent=triage, include error_group_id. Fix runs also
require the project to have a linked GitHub repository:
201- agent run created and queued400- invalid intent, missing identity, malformedrequested_by, malformedrequested_by_email, or missing error group context404- project or error group not found429- the user already has 10 active agent runs502- the API created the run but could not start execution
Get an agent run
lifecycleOutcomes, an oldest-first record of customer-visible outcomes. The
timeline can include safe refusal, pull request open/update/merge/close,
deployment, and post-deploy recurrence.
Completed fix runs may include these validation fields in artifact:
testsPassed-trueorfalsewhen the isolated sandbox independently reran test commands;nullwhen no executable command was availabletestOutput- bounded regression-test evidence, commands, exit codes, and outputciPassed- whether every registered GitHub check on the latest pull request commit passedciOutput- bounded check names, conclusions, summaries, and details linksciRepairAttempts- the number of failed-CI repair iterations, up to threeverificationPassed- whether the separate root-cause and diff verification accepted the fixverificationRiskLevelandverificationSummary- reviewer-facing verification contextverificationProviderandverificationModelId- the independently recorded verifier identityproposalUrl- the resulting pull request URL, present only after validation and verification permit a PR
Follow run events
sequence. Persist the returned nextAfter cursor and
send it as after on the next request. terminal becomes true when the run
is completed, failed, or cancelled.
The journal contains lifecycle state, attempt count, linked thread id, and the
names of produced artifact fields. It intentionally excludes raw prompts,
reasoning, logs, diffs, test output, and artifact values. Fetch those through
the authorized run-detail workflow when needed.
Stages progress through setup, context, execute, verify, pr,
finalize, and done. A run may finish early or skip a stage when no safe
fix is available.
Cancel an agent run
HTTP usage
CLI usage
List runs for a project, optionally filtering by intent or error group:--reason to use the default cancellation reason, user_cancelled.
Agent handoff
Agents should treat run creation and cancellation as write actions:search("agentRuns") and execute for the same operations when an MCP client is connected.