Submit Code Run
POST /code-runsRun the binding’s reviewer agent over a bound repository, read-only, and return the run.
For a system that wants a code investigation without a change proposal, a support desk
triaging a ticket being the first. The repository must already be bound in the caller’s
workspace with a reviewer agent; otherwise 404. The capability is always review,
the installation and the budgets come from the binding, and none of them can be named in
the body. Poll GET /runs/{id}: the findings are output.findings once the run is
succeeded. Nothing is posted to the repository host.
Request body — CodeRunSubmit
Section titled “Request body — CodeRunSubmit”| Field | Type | Notes | |
|---|---|---|---|
repo_full_name | string | required | min length 3 max length 300 |
task | string | required | min length 1 max length 20000 |
ref | string | null | optional | max length 255 |
callback_url | string | null | optional | max length 2000 |
idempotency_key | string | null | optional | min length 1 max length 200 |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
202 | Successful Response | RunView |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.
curl -X POST https://your-deployment.example.com/code-runs \ -H "Authorization: Bearer $COBRE_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "repo_full_name": "string", "task": "string" }'Response — RunView
Section titled “Response — RunView”| Field | Type | Notes | |
|---|---|---|---|
client_tools | end | suspend | optional | Default "end". |
client_tool_timeout_s | integer | null | optional | — |
id | string (uuid) | required | — |
status | queued | running | suspended | succeeded | failed | timed_out | cancelled | required | — |
agent_id | string (uuid) | required | — |
agent_revision_id | string (uuid) | required | — |
persona_id | string (uuid) | null | optional | — |
session_id | string (uuid) | null | required, nullable | — |
parent_run_id | string (uuid) | null | required, nullable | — |
root_run_id | string (uuid) | null | required, nullable | — |
delegation_depth | integer | required | — |
lane | string | required | — |
priority | integer | required | — |
trigger_kind | api | schedule | event | channel | delegation | retry | replay | maintenance | system | required | — |
response_mode | async | sync | callback | ack | required | — |
input | object | required | — |
output | object | null | required, nullable | — |
error_message | string | null | required, nullable | — |
failure_class | transient | provider | tool | guardrail | budget | policy | timeout | recursion | cancelled | fatal | null | required, nullable | — |
failure_detail | string | null | required, nullable | — |
attempt_count | integer | required | — |
max_attempts | integer | required | — |
queued_at | string (date-time) | required | — |
first_started_at | string (date-time) | null | required, nullable | — |
completed_at | string (date-time) | null | required, nullable | — |
deadline_at | string (date-time) | null | required, nullable | — |
next_attempt_at | string (date-time) | null | required, nullable | — |
duration_ms | integer | null | required, nullable | — |
active_ms | integer | required | — |
queue_ms | integer | null | required, nullable | — |
phase_timings | object | required | — |
usage | RunUsageView | optional | — |
correlation_id | string (uuid) | null | optional | — |
actor_credential_fingerprint | string | null | optional | — |
actor_credential_expires_at | string (date-time) | null | optional | — |
consolidation_run_id | string (uuid) | null | optional | — |
persona_name | string | null | optional | — |