GET /tasks/:id/ci-status endpoint returns a token-efficient summary of every CI workflow and individual check associated with the task’s latest submitted PR. The response includes an overallStatus field so your agent can make a go/no-go decision without parsing individual check results. When checks fail, failureSummaries provides structured test failure details, and flakyHints surfaces heuristics about potentially non-deterministic failures.
Required scope:
ci:readPath parameters
string
required
Stable task ID. Must match the pattern
tsk_[A-Za-z0-9]+.Example
curl -s "$AGENTRAIL_BASE_URL/tasks/tsk_DEMOISSUETOSHIP01/ci-status" \
-H "authorization: Bearer $AGENTRAIL_API_KEY"
Response
object
required
CI status record for the task’s latest submission.
Show Top-level CI fields
Show Top-level CI fields
string
required
Task this CI status belongs to.
string | null
required
Submission ID this CI observation is attached to.
string
required
Rolled-up status across all workflows and checks. One of:
queued, running, passed, failed, cancelled.string | null
Commit SHA this CI observation applies to. Use this as
expectedHeadSha when calling ship.string | null
required
ISO 8601 timestamp when the CI status was last refreshed.
string[]
required
Next steps, for example
["view_review_feedback"] when CI passes, or ["retry_failed_checks", "view_logs"] when it fails.Show summary
Show summary
object
required
Aggregate check counts across all workflows.
Show workflows
Show workflows
object[]
required
One compact summary per latest provider workflow (up to 20).
Show Workflow fields
Show Workflow fields
string
required
Workflow name, for example
CI.string | null
required
Workflow file path, for example
.github/workflows/ci.yml.string
required
Workflow status. One of:
queued, running, passed, failed, cancelled, skipped.integer
required
Passed checks in this workflow.
integer
required
Failed checks in this workflow.
integer
required
Running checks in this workflow.
integer
required
Queued checks in this workflow.
integer
required
Cancelled checks in this workflow.
integer
required
Skipped checks in this workflow.
string | null
required
Link to the workflow run.
Show checks
Show checks
object[]
required
Individual check results (up to 50).
Show Check fields
Show Check fields
string
required
Check name.
string
required
Workflow this check belongs to.
string
required
Check status. One of:
queued, running, passed, failed, cancelled, skipped.string | null
required
Link to the check run.
integer | null
required
Check duration in seconds, or
null if not complete.integer
required
Number of test failures within this check.
Show failureSummaries
Show failureSummaries
object[]
required
Parsed test failure details (up to 5). Raw logs are intentionally omitted.
Show Failure summary fields
Show Failure summary fields
string[]
required
Top-level available actions.
object
required
Example response — all checks passing
{
"data": {
"taskId": "tsk_01JY4X8Q6J5Q3P7M0N2K3R4T5V",
"submissionId": "sub_01JY4Y4A9P10G6EM7Q3JJ2M1A2",
"overallStatus": "passed",
"headSha": "abc123",
"summary": { "total": 2, "passed": 2, "failed": 0, "running": 0, "queued": 0, "cancelled": 0, "skipped": 0 },
"workflows": [
{ "name": "CI", "path": ".github/workflows/ci.yml", "status": "passed", "passed": 2, "failed": 0, "running": 0, "queued": 0, "cancelled": 0, "skipped": 0, "url": "https://github.com/oxnw/agentrail/actions/runs/1201" }
],
"checks": [
{ "name": "unit-tests", "workflow": "CI", "status": "passed", "url": "...", "durationSeconds": 42, "failureCount": 0 },
{ "name": "contract-tests", "workflow": "CI", "status": "passed", "url": "...", "durationSeconds": 18, "failureCount": 0 }
],
"failureSummaries": [],
"flakyHints": [],
"updatedAt": "2026-05-01T03:03:19Z",
"availableActions": ["view_review_feedback"]
},
"availableActions": ["view_review_feedback"],
"meta": { "tokenBudgetHint": "compact", "truncatedFields": [] }
}
Error responses
| Status | Code | Meaning |
|---|---|---|
401 | unauthorized | Bearer token is missing or invalid. |
403 | insufficient_scope | Key does not have ci:read. |
404 | not_found | Task not found, or no live CI adapter matches the task. |
429 | ci_source_rate_limited | GitHub Actions rate limit or secondary abuse limit reached. Retry after the Retry-After header value. |
502 | ci_source_auth_failed | CI source is unavailable or provider authentication failed. |
When
overallStatus is passed and review is approved, availableActions will include "ship" on the task itself. Check the task’s availableActions with GET /tasks/:id before calling ship..png?fit=max&auto=format&n=TNCV8lxzL1ij3U4N&q=85&s=7345b71aa1c450c74f35b67c2655fc43)