Skip to content

Submit Code Run

POST /code-runs

Run 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.

FieldTypeNotes
repo_full_namestringrequiredmin length 3 max length 300
taskstringrequiredmin length 1 max length 20000
refstring | nulloptionalmax length 255
callback_urlstring | nulloptionalmax length 2000
idempotency_keystring | nulloptionalmin length 1 max length 200
StatusDescriptionBody
202Successful ResponseRunView
422Validation ErrorHTTPValidationError

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.

Terminal window
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"
}'
FieldTypeNotes
client_toolsend | suspendoptionalDefault "end".
client_tool_timeout_sinteger | nulloptional—
idstring (uuid)required—
statusqueued | running | suspended | succeeded | failed | timed_out | cancelledrequired—
agent_idstring (uuid)required—
agent_revision_idstring (uuid)required—
persona_idstring (uuid) | nulloptional—
session_idstring (uuid) | nullrequired, nullable—
parent_run_idstring (uuid) | nullrequired, nullable—
root_run_idstring (uuid) | nullrequired, nullable—
delegation_depthintegerrequired—
lanestringrequired—
priorityintegerrequired—
trigger_kindapi | schedule | event | channel | delegation | retry | replay | maintenance | systemrequired—
response_modeasync | sync | callback | ackrequired—
inputobjectrequired—
outputobject | nullrequired, nullable—
error_messagestring | nullrequired, nullable—
failure_classtransient | provider | tool | guardrail | budget | policy | timeout | recursion | cancelled | fatal | nullrequired, nullable—
failure_detailstring | nullrequired, nullable—
attempt_countintegerrequired—
max_attemptsintegerrequired—
queued_atstring (date-time)required—
first_started_atstring (date-time) | nullrequired, nullable—
completed_atstring (date-time) | nullrequired, nullable—
deadline_atstring (date-time) | nullrequired, nullable—
next_attempt_atstring (date-time) | nullrequired, nullable—
duration_msinteger | nullrequired, nullable—
active_msintegerrequired—
queue_msinteger | nullrequired, nullable—
phase_timingsobjectrequired—
usageRunUsageViewoptional—
correlation_idstring (uuid) | nulloptional—
actor_credential_fingerprintstring | nulloptional—
actor_credential_expires_atstring (date-time) | nulloptional—
consolidation_run_idstring (uuid) | nulloptional—
persona_namestring | nulloptional—