---
title: "Returns a failure diagnosis for a run, workflow, job, or attempt."
method: POST
path: "/depot.ci.v1.CIService/GetFailureDiagnosis"
tags: ["CIService"]
---

# Returns a failure diagnosis for a run, workflow, job, or attempt.

`POST /depot.ci.v1.CIService/GetFailureDiagnosis`

## Request

- Base URL: `https://api.depot.dev`
- URL: `https://api.depot.dev/depot.ci.v1.CIService/GetFailureDiagnosis`
- Auth: HTTP bearer

For run and workflow targets, identical failures are grouped together by error fingerprint. For job and attempt targets, the response is a focused diagnosis of that single job or attempt. When too many jobs failed to diagnose individually, the response is a per-workflow and per-job breakdown instead. When no failure evidence is found, the response is empty. The response is limited to a fixed size and reflects the run's current state. The diagnosis can change while a run is in progress. As more jobs fail, a later call can surface new failures or turn an empty result into a grouped one. As job summaries become available, a later call can also add summary drill-down commands.

## Headers

- `Connect-Protocol-Version` 1, required: Define the version of the Connect protocol
- `Connect-Timeout-Ms` number: Define the timeout, in ms

## Request body

- DepotCiV1GetFailureDiagnosisRequest
  - `targetId` string, required: Unique identifier for the resource to diagnose: a CI run, workflow, job, or attempt. Must match `targetType`.
  - `targetType` 'FAILURE_DIAGNOSIS_TARGET_TYPE_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_RUN' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_WORKFLOW' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_JOB' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_ATTEMPT', required: Resource kind a failure diagnosis can target.

## Response `200`

Success

- DepotCiV1GetFailureDiagnosisResponse
  - `orgId` string: Depot organization that owns the diagnosed resource.
  - `target` DepotCiV1FailureDiagnosisTarget
    - `targetId` string: Unique identifier for the diagnosed resource.
    - `targetType` 'FAILURE_DIAGNOSIS_TARGET_TYPE_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_RUN' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_WORKFLOW' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_JOB' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_ATTEMPT': Resource kind a failure diagnosis can target.
    - `status` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
  - `context` DepotCiV1FailureDiagnosisContext
    - `runId` string: Unique identifier for the parent CI run.
    - `repo` string: GitHub repository in `owner/name` format. For example, "depot/cli".
    - `ref` string: Git ref the run was triggered against. Empty when the trigger carries no ref.
    - `sha` string: Commit SHA the run executes against. Empty for open pull_request runs.
    - `headSha` string: Source commit SHA for pull_request and merge_group triggers. Empty for triggers that don't carry a head SHA.
    - `trigger` string: Event that triggered the run. For example, "push", "pull_request", "pull_request_target", "issue_comment", "merge_group", "schedule", "workflow_run", or "workflow_dispatch".
    - `runStatus` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
    - `workflowId` string: Unique identifier for the parent workflow. Empty when the target is a run.
    - `workflowName` string: Parent workflow name from the YAML `name:` key. Falls back to the file path stem when the workflow doesn't set `name:`. Empty when neither is available.
    - `workflowPath` string: Parent workflow file path. For example, ".depot/workflows/ci.yml". Empty when the workflow YAML was passed via `workflowContent` in the `Run` request, or when the target is a run.
    - `workflowStatus` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
    - `jobId` string: Unique identifier for the parent job. Empty when the target is a run or workflow.
    - `jobKey` string: Parent job key from the workflow. Empty when the target is a run or workflow.
    - `jobDisplayName` string: Human-readable display name for the parent job. Falls back to `jobKey` when no display name is set.
    - `jobStatus` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
    - `jobConclusion` 'FAILURE_DIAGNOSIS_CONCLUSION_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SUCCESS' | 'FAILURE_DIAGNOSIS_CONCLUSION_FAILURE' | 'FAILURE_DIAGNOSIS_CONCLUSION_CANCELLED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SKIPPED' | 'FAILURE_DIAGNOSIS_CONCLUSION_TIMED_OUT': Final outcome of a job or attempt referenced by a diagnosis.
    - `attemptId` string: Unique identifier for the parent attempt. Empty unless the target is an attempt.
    - `attempt` integer: Attempt number for the parent attempt. Zero unless the target is an attempt.
    - `attemptStatus` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
    - `attemptConclusion` 'FAILURE_DIAGNOSIS_CONCLUSION_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SUCCESS' | 'FAILURE_DIAGNOSIS_CONCLUSION_FAILURE' | 'FAILURE_DIAGNOSIS_CONCLUSION_CANCELLED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SKIPPED' | 'FAILURE_DIAGNOSIS_CONCLUSION_TIMED_OUT': Final outcome of a job or attempt referenced by a diagnosis.
    - `truncatedContextFields` string[]: Names of context fields that were truncated to fit the response limits.
  - `state` 'FAILURE_DIAGNOSIS_STATE_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_STATE_EMPTY' | 'FAILURE_DIAGNOSIS_STATE_GROUPED_FAILURES' | 'FAILURE_DIAGNOSIS_STATE_FOCUSED_FAILURE' | 'FAILURE_DIAGNOSIS_STATE_OVER_LIMIT': Overall shape of the failure diagnosis response. - EMPTY: No failure evidence found. `failureGroups` and `representativeAttempts` are empty. - GROUPED_FAILURES: Failures grouped by fingerprint into `failureGroups`. Returned for run and workflow targets. - FOCUSED_FAILURE: Diagnosis focuses on a single job or attempt. Returned for job and attempt targets. - OVER_LIMIT: Too many failed candidates to diagnose individually. `overLimitBreakdown` lists per-workflow and per-job counts instead.
  - `emptyReason` 'FAILURE_DIAGNOSIS_EMPTY_REASON_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_EMPTY_REASON_NO_FAILURE_EVIDENCE': Reason a diagnosis was returned in the EMPTY state.
  - `failureGroups` DepotCiV1FailureGroup[]: Failures grouped by deterministic error fingerprint. Empty when `state` is EMPTY or OVER_LIMIT.
    - `fingerprint` string: Identifier for this failure group, computed from the error text. Two failures share a fingerprint when their errors match after variable details like timestamps, IDs, and file paths are removed, so the same logical error from different attempts falls into the same group.
    - `source` string: Origin of the error text used to form the fingerprint. Can be "attempt_error", "job_error", "workflow_error", or "status".
    - `count` integer: Number of candidate attempts that fell into this group.
    - `errorMessage` string: Representative error message for the group, possibly truncated.
    - `errorMessageTruncated` boolean: True when `errorMessage` was truncated to fit the response limit.
    - `errorMessageOriginalLength` integer: Length of the full `errorMessage`, in characters, before any truncation.
    - `diagnosis` string: AI-generated diagnosis summarizing the failure. Empty when no diagnosis is available.
    - `possibleFix` string: AI-generated suggested fix. Empty when no suggestion is available.
    - `representatives` DepotCiV1RepresentativeAttempt[]: Attempts chosen as samples of the group's failure, up to `bounds.representativesPerGroupLimit` entries. Each job's current attempt is preferred, then more recent attempts.
      - `runId` string: Unique identifier for the parent CI run.
      - `workflowId` string: Unique identifier for the parent workflow.
      - `workflowName` string: Parent workflow name from the YAML `name:` key. Falls back to the file path stem when the workflow doesn't set `name:`. Empty when neither is available.
      - `workflowPath` string: Parent workflow file path. For example, ".depot/workflows/ci.yml". Empty when the workflow YAML was passed via `workflowContent` in the `Run` request.
      - `jobId` string: Unique identifier for the parent job.
      - `jobKey` string: Parent job key from the workflow.
      - `jobDisplayName` string: Human-readable display name for the parent job. Falls back to `jobKey` when no display name is set.
      - `jobStatus` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
      - `jobConclusion` 'FAILURE_DIAGNOSIS_CONCLUSION_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SUCCESS' | 'FAILURE_DIAGNOSIS_CONCLUSION_FAILURE' | 'FAILURE_DIAGNOSIS_CONCLUSION_CANCELLED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SKIPPED' | 'FAILURE_DIAGNOSIS_CONCLUSION_TIMED_OUT': Final outcome of a job or attempt referenced by a diagnosis.
      - `attemptId` string: Unique identifier for this attempt.
      - `attempt` integer: Attempt number, starting at 1 for the first run.
      - `attemptStatus` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
      - `attemptConclusion` 'FAILURE_DIAGNOSIS_CONCLUSION_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SUCCESS' | 'FAILURE_DIAGNOSIS_CONCLUSION_FAILURE' | 'FAILURE_DIAGNOSIS_CONCLUSION_CANCELLED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SKIPPED' | 'FAILURE_DIAGNOSIS_CONCLUSION_TIMED_OUT': Final outcome of a job or attempt referenced by a diagnosis.
      - `errorMessage` string: Error message captured for this attempt, possibly truncated.
      - `errorMessageTruncated` boolean: True when `errorMessage` was truncated to fit the response limit.
      - `errorMessageOriginalLength` integer: Length of the full `errorMessage`, in characters, before any truncation.
      - `diagnosis` string: AI-generated diagnosis for this attempt. Empty when no diagnosis is available.
      - `possibleFix` string: AI-generated suggested fix for this attempt. Empty when no suggestion is available.
      - `relevantLines` DepotCiV1RelevantErrorLine[]: AI-selected log lines correlated with the failure. Empty when no log analysis is available.
        - `stepId` string: Workflow step identifier the line was emitted from. Empty when not associated with a step.
        - `lineNumber` integer: Persisted line number within the emitting stream.
        - `content` string: Log line content, possibly truncated.
        - `contentTruncated` boolean: True when `content` was truncated to fit the per-line limit.
        - `contentOriginalLength` integer: Length of the full `content`, in characters, before any truncation.
      - `nextCommands` DepotCiV1DrillDownCommand[]: Drill-down commands suggested for this attempt. For example, "depot ci logs" or "depot ci summary".
        - `kind` 'DRILL_DOWN_COMMAND_KIND_UNSPECIFIED' | 'DRILL_DOWN_COMMAND_KIND_LOGS' | 'DRILL_DOWN_COMMAND_KIND_SUMMARY' | 'DRILL_DOWN_COMMAND_KIND_DIAGNOSE_WORKFLOW' | 'DRILL_DOWN_COMMAND_KIND_DIAGNOSE_JOB': Kind of drill-down a diagnosis suggests next. Maps to a Depot CLI subcommand in DrillDownCommand.argv. - LOGS: Equivalent to `depot ci logs <attempt_id>`. - SUMMARY: Equivalent to `depot ci summary <attempt_id>`. - DIAGNOSE_WORKFLOW: Equivalent to `depot ci diagnose --workflow <workflow_id>`. - DIAGNOSE_JOB: Equivalent to `depot ci diagnose --job <job_id>`.
        - `argv` string[]: Suggested command and arguments. For example, ["depot", "ci", "logs", "<attempt_id>"].
        - `targetId` string: Unique identifier for the resource the command targets.
        - `label` string: Human-readable label for the command. For example, "Logs" or "Diagnose workflow".
    - `omittedRepresentativeCount` integer: Number of additional candidate attempts omitted from representatives.
  - `representativeAttempts` DepotCiV1RepresentativeAttempt[]: Representative attempts from all failure groups in one list. Contains the same entries as the nested `failureGroups[].representatives` lists. Empty when `state` is EMPTY or OVER_LIMIT.
    - `runId` string: Unique identifier for the parent CI run.
    - `workflowId` string: Unique identifier for the parent workflow.
    - `workflowName` string: Parent workflow name from the YAML `name:` key. Falls back to the file path stem when the workflow doesn't set `name:`. Empty when neither is available.
    - `workflowPath` string: Parent workflow file path. For example, ".depot/workflows/ci.yml". Empty when the workflow YAML was passed via `workflowContent` in the `Run` request.
    - `jobId` string: Unique identifier for the parent job.
    - `jobKey` string: Parent job key from the workflow.
    - `jobDisplayName` string: Human-readable display name for the parent job. Falls back to `jobKey` when no display name is set.
    - `jobStatus` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
    - `jobConclusion` 'FAILURE_DIAGNOSIS_CONCLUSION_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SUCCESS' | 'FAILURE_DIAGNOSIS_CONCLUSION_FAILURE' | 'FAILURE_DIAGNOSIS_CONCLUSION_CANCELLED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SKIPPED' | 'FAILURE_DIAGNOSIS_CONCLUSION_TIMED_OUT': Final outcome of a job or attempt referenced by a diagnosis.
    - `attemptId` string: Unique identifier for this attempt.
    - `attempt` integer: Attempt number, starting at 1 for the first run.
    - `attemptStatus` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
    - `attemptConclusion` 'FAILURE_DIAGNOSIS_CONCLUSION_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SUCCESS' | 'FAILURE_DIAGNOSIS_CONCLUSION_FAILURE' | 'FAILURE_DIAGNOSIS_CONCLUSION_CANCELLED' | 'FAILURE_DIAGNOSIS_CONCLUSION_SKIPPED' | 'FAILURE_DIAGNOSIS_CONCLUSION_TIMED_OUT': Final outcome of a job or attempt referenced by a diagnosis.
    - `errorMessage` string: Error message captured for this attempt, possibly truncated.
    - `errorMessageTruncated` boolean: True when `errorMessage` was truncated to fit the response limit.
    - `errorMessageOriginalLength` integer: Length of the full `errorMessage`, in characters, before any truncation.
    - `diagnosis` string: AI-generated diagnosis for this attempt. Empty when no diagnosis is available.
    - `possibleFix` string: AI-generated suggested fix for this attempt. Empty when no suggestion is available.
    - `relevantLines` DepotCiV1RelevantErrorLine[]: AI-selected log lines correlated with the failure. Empty when no log analysis is available.
      - `stepId` string: Workflow step identifier the line was emitted from. Empty when not associated with a step.
      - `lineNumber` integer: Persisted line number within the emitting stream.
      - `content` string: Log line content, possibly truncated.
      - `contentTruncated` boolean: True when `content` was truncated to fit the per-line limit.
      - `contentOriginalLength` integer: Length of the full `content`, in characters, before any truncation.
    - `nextCommands` DepotCiV1DrillDownCommand[]: Drill-down commands suggested for this attempt. For example, "depot ci logs" or "depot ci summary".
      - `kind` 'DRILL_DOWN_COMMAND_KIND_UNSPECIFIED' | 'DRILL_DOWN_COMMAND_KIND_LOGS' | 'DRILL_DOWN_COMMAND_KIND_SUMMARY' | 'DRILL_DOWN_COMMAND_KIND_DIAGNOSE_WORKFLOW' | 'DRILL_DOWN_COMMAND_KIND_DIAGNOSE_JOB': Kind of drill-down a diagnosis suggests next. Maps to a Depot CLI subcommand in DrillDownCommand.argv. - LOGS: Equivalent to `depot ci logs <attempt_id>`. - SUMMARY: Equivalent to `depot ci summary <attempt_id>`. - DIAGNOSE_WORKFLOW: Equivalent to `depot ci diagnose --workflow <workflow_id>`. - DIAGNOSE_JOB: Equivalent to `depot ci diagnose --job <job_id>`.
      - `argv` string[]: Suggested command and arguments. For example, ["depot", "ci", "logs", "<attempt_id>"].
      - `targetId` string: Unique identifier for the resource the command targets.
      - `label` string: Human-readable label for the command. For example, "Logs" or "Diagnose workflow".
  - `bounds` DepotCiV1FailureDiagnosisBounds
    - `failedProblemCandidateCount` integer: Number of failed problem candidates, the failed and cancelled jobs the diagnosis examined.
    - `failedProblemCandidateCap` integer: Maximum number of failed problem candidates the diagnosis examines. Above this limit the response switches to the over-limit breakdown.
    - `totalProblemJobCount` integer: Total number of jobs identified as problem candidates.
    - `skippedDependentCount` integer: Number of jobs skipped because a failed dependency prevented them from running.
    - `totalFailureGroupCount` integer: Total number of distinct failure groups identified.
    - `omittedFailureGroupCount` integer: Number of omitted failure groups.
    - `failureGroupLimit` integer: Maximum number of failure groups returned in a single response. 0 means no group limit.
    - `representativesPerGroupLimit` integer: Maximum number of representative attempts returned per failure group.
    - `recentAttemptLimit` integer: Maximum number of recent attempts considered for focused diagnoses.
    - `totalAttemptCount` integer: Total number of attempts examined for the target. Populated for focused job diagnoses.
    - `omittedAttemptCount` integer: Number of attempts omitted because the response exceeded the recent attempt limit.
    - `relevantLineLimit` integer: Maximum number of relevant log lines returned per representative attempt.
    - `errorLineBodyCharLimit` integer: Character cap applied to each relevant log line body.
    - `errorMessageCharLimit` integer: Character cap applied to errorMessage values in the response.
    - `contextLabelCharLimit` integer: Character cap applied to context label strings such as repo, ref, and workflowName.
    - `overLimitWorkflowBreakdownLimit` integer: Maximum number of workflow breakdown rows returned in an over-limit response.
    - `overLimitJobBreakdownLimit` integer: Maximum number of job breakdown rows returned in an over-limit response.
    - `omittedWorkflowBreakdownCount` integer: Number of workflow breakdown rows omitted because they exceeded the limit.
    - `omittedJobBreakdownCount` integer: Number of job breakdown rows omitted because they exceeded the limit.
    - `truncated` boolean: True when any part of the response was truncated to fit the limits above.
  - `nextCommands` DepotCiV1DrillDownCommand[]: Drill-down commands from all representative attempts in one list. For example, "depot ci logs" or "depot ci diagnose". Contains the same entries as the nested `representativeAttempts[].nextCommands` lists. In an OVER_LIMIT response, contains the diagnose commands from `overLimitBreakdown[].nextCommands` instead. Empty when `state` is EMPTY.
    - `kind` 'DRILL_DOWN_COMMAND_KIND_UNSPECIFIED' | 'DRILL_DOWN_COMMAND_KIND_LOGS' | 'DRILL_DOWN_COMMAND_KIND_SUMMARY' | 'DRILL_DOWN_COMMAND_KIND_DIAGNOSE_WORKFLOW' | 'DRILL_DOWN_COMMAND_KIND_DIAGNOSE_JOB': Kind of drill-down a diagnosis suggests next. Maps to a Depot CLI subcommand in DrillDownCommand.argv. - LOGS: Equivalent to `depot ci logs <attempt_id>`. - SUMMARY: Equivalent to `depot ci summary <attempt_id>`. - DIAGNOSE_WORKFLOW: Equivalent to `depot ci diagnose --workflow <workflow_id>`. - DIAGNOSE_JOB: Equivalent to `depot ci diagnose --job <job_id>`.
    - `argv` string[]: Suggested command and arguments. For example, ["depot", "ci", "logs", "<attempt_id>"].
    - `targetId` string: Unique identifier for the resource the command targets.
    - `label` string: Human-readable label for the command. For example, "Logs" or "Diagnose workflow".
  - `commandCapabilities` DepotCiV1FailureDiagnosisCommandCapabilities
    - `summaryCommandAvailable` boolean: True when the summary drill-down command is available for this diagnosis.
  - `overLimitBreakdown` DepotCiV1FailureDiagnosisBreakdownRow[]: Failure counts by workflow and by job, returned when failed problem candidates exceed `bounds.failedProblemCandidateCap`. Empty for other states.
    - `targetType` 'FAILURE_DIAGNOSIS_TARGET_TYPE_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_RUN' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_WORKFLOW' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_JOB' | 'FAILURE_DIAGNOSIS_TARGET_TYPE_ATTEMPT': Resource kind a failure diagnosis can target.
    - `targetId` string: Unique identifier for the resource this row describes.
    - `label` string: Human-readable label for the resource. For example, a workflow name or job key.
    - `status` 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_UNSPECIFIED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_QUEUED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_WAITING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_RUNNING' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FINISHED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_FAILED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_CANCELLED' | 'FAILURE_DIAGNOSIS_RESOURCE_STATUS_SKIPPED': Lifecycle state of a run, workflow, job, or attempt referenced by a diagnosis. - QUEUED: Waiting in the queue to be dispatched. - WAITING: Blocked behind another run that holds the same `concurrency:` group slot. Applies to jobs. - RUNNING: Currently executing. - FINISHED: Completed without failure or cancellation. - FAILED: Stopped because of an error. - CANCELLED: Cancelled before it finished, either by a user or by a parent's cancellation. - SKIPPED: Skipped because of an unmet condition or a failed dependency. Applies to jobs.
    - `failedProblemCandidateCount` integer: Number of failed problem candidates attributed to this resource.
    - `nextCommands` DepotCiV1DrillDownCommand[]: Drill-down commands suggested for this resource.
      - `kind` 'DRILL_DOWN_COMMAND_KIND_UNSPECIFIED' | 'DRILL_DOWN_COMMAND_KIND_LOGS' | 'DRILL_DOWN_COMMAND_KIND_SUMMARY' | 'DRILL_DOWN_COMMAND_KIND_DIAGNOSE_WORKFLOW' | 'DRILL_DOWN_COMMAND_KIND_DIAGNOSE_JOB': Kind of drill-down a diagnosis suggests next. Maps to a Depot CLI subcommand in DrillDownCommand.argv. - LOGS: Equivalent to `depot ci logs <attempt_id>`. - SUMMARY: Equivalent to `depot ci summary <attempt_id>`. - DIAGNOSE_WORKFLOW: Equivalent to `depot ci diagnose --workflow <workflow_id>`. - DIAGNOSE_JOB: Equivalent to `depot ci diagnose --job <job_id>`.
      - `argv` string[]: Suggested command and arguments. For example, ["depot", "ci", "logs", "<attempt_id>"].
      - `targetId` string: Unique identifier for the resource the command targets.
      - `label` string: Human-readable label for the command. For example, "Logs" or "Diagnose workflow".

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/depot/apis/depot-ci-api.md) - [All operations](https://skmtc.dev/depot/apis/depot-ci-api/llms.txt) - [OpenAPI document](https://skmtc.dev/depot/apis/depot-ci-api/revisions/6cf759b535b4?raw)
