Skip to main content

Documentation Index

Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt

Use this file to discover all available pages before exploring further.

The 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:read

Path parameters

id
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

data
object
required
CI status record for the task’s latest submission.
availableActions
string[]
required
Top-level available actions.
meta
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

StatusCodeMeaning
401unauthorizedBearer token is missing or invalid.
403insufficient_scopeKey does not have ci:read.
404not_foundTask not found, or no live CI adapter matches the task.
429ci_source_rate_limitedGitHub Actions rate limit or secondary abuse limit reached. Retry after the Retry-After header value.
502ci_source_auth_failedCI 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.