Failed-job analysis

Ask why a job failed

contd analyze creates a bounded, read-only analysis artifact for a failed or timed-out job.

Documentation home ยท AI jobs

Run an analysis

contd analyze \
  --job verify \
  --artifact artifact-id \
  --data-policy local-only \
  <run-id>

--job is required. Repeat --artifact to select artifacts explicitly. Logs for the selected job are included automatically.

Analysis reads saved run data. It does not read or change the source workspace, pipeline configuration, or live run state.

Data policy

local-only is the default. It refuses a provider whose declared locality is not local. redacted-remote permits a configured remote provider after contd redacts sensitive environment values, credential-bearing URLs, and sensitive log output.

Invalid policies produce an unavailable analysis artifact instead of sending data under an unknown policy.

Default limits

LimitDefault
Context128 KiB
Each log32 KiB
Each artifact16 KiB
Selected artifacts4
Provider turns1
Provider tokens1000
Provider duration30 seconds
Provider budgetUnlimited

Override limits with --max-context-bytes, --max-log-bytes, --max-artifact-bytes, --max-artifacts, --max-turns, --max-tokens, --max-budget, and --timeout.

Binary artifacts are marked unavailable rather than decoded as text. Oversize sections are truncated and the artifact records truncated: true. Missing logs and artifacts are listed as unavailable.

Result

The command saves a JSON artifact with kind failed_job_analysis. It contains the run and execution IDs, failure record, summary, likely causes, evidence, next checks, confidence, provider and model, policy, limits, selected inputs, hashes, usage, truncation, and unavailable values.

Possible analysis states are:

succeeded
unavailable
failed
timed_out
cancelled
budget_exceeded

Use contd inspect <run-id> or contd inspect --json <run-id> to read the saved artifact.