Skip to main content
← Back home

CLI Coding Agent Failure Taxonomy v0.1

Summary

This document defines a closed-set vocabulary for classifying outcomes of CLI coding agent tasks. It is designed for three audiences: evaluation harnesses that need a stable failure schema across runs, operations teams that need an audit log readable by humans and machines, and procurement teams that need a vocabulary they can map to their existing governance framework.

The taxonomy was extracted from a working implementation in the open-source orchestrator bernstein (eval/taxonomy.py) and rewritten as a versioned specification with explicit cross-reference to NIST AI Risk Management Framework (AI RMF 1.0) trust characteristics and ISO/IEC 42001 governance controls.

The spec is intentionally short. The closed set has eight categories. Adding more categories has been considered and rejected because larger sets degrade classifier agreement and produce noisy histograms. If your domain needs finer granularity, the recommendation is to layer a second classifier under one top-level category rather than expanding the top level.

Scope and non-goals

In scope

  • Classifying the outcome of a single agent task whose deliverable is a code change, a patch series, or a structured artefact in a version-controlled repository.
  • Producing a record that aggregates across runs and agents so drift can be detected.
  • Cross-referencing the record against NIST AI RMF trust characteristics and ISO/IEC 42001 control areas.

Out of scope

  • Classifying successful task outcomes. This spec is about failures and degraded outcomes only. A task that succeeded does not produce a record under this schema.
  • Classifying outputs from non-coding agents (research agents, customer-facing assistants). The categories were chosen for the coding-agent setting and would not generalise cleanly.
  • Risk scoring, prioritisation policy, or escalation rules. The spec produces records; what to do with them is a deployment decision.

Categories

Each category has: a definition, the NIST AI RMF trust characteristic it maps to, the ISO/IEC 42001 control area it relates to, a default severity tier, and a one-line operational signal a classifier can key on.

IDDefinitionNIST AI RMFISO/IEC 42001SeveritySignal
Orientation miss
orientation_miss
The agent spent a disproportionate share of its turns on exploration (reading files, asking clarifying questions) without producing output.validityA.6.2.4 (performance evaluation of AI components)mediummore than half of turns spent in exploration before any artefact is produced
Scope creep
scope_creep
The agent modified files outside the scope it was assigned. The change may be technically correct but violates the operating contract.validity, securityA.7.2 (data and asset boundaries)highdiff touches paths outside the declared owned_files set
Test regression
test_regression
The agent broke at least one existing test that was passing before its run. Highest-priority failure category and a hard gate for most deployments.validity, robustnessA.6.2.5 (regression handling)criticalpreviously-green tests fail after the agent run
Incomplete
incomplete
The agent stopped before fulfilling the completion signals declared in the task brief. Distinct from timeout: the agent terminated voluntarily.validityA.6.2.6 (output verification)mediumone or more required completion signals are missing at run end
Timeout
timeout
The agent hit its wall-clock or max-turns budget. Distinct from incomplete: the agent might have finished given more budget.validity, robustnessA.6.2.7 (resource budgeting)highwall-clock or turn-count limit reached before completion signals satisfied
Conflict
conflict
The agent’s changes collide with a concurrent agent’s changes in a way that requires reconciliation. Specific to multi-agent orchestration.robustnessA.6.2.8 (concurrency control)highmerge or apply step fails because of an overlapping edit by another agent
Context miss
context_miss
The agent had everything it needed to operate (budget, scope) but lacked the contextual knowledge to complete the task. Often signals a documentation gap rather than an agent defect.validityA.5.2 (training and contextual data adequacy)mediumagent explicitly reports missing information; or output reflects a misread of the brief
Hallucination
hallucination
The agent produced output that references APIs, files, or facts that do not exist in the codebase or its dependencies. Includes uncompilable code and fabricated identifiers.validity, securityA.6.2.9 (factuality and grounding)highcode does not compile, or imports/calls reference non-existent symbols

Severity tiers

Severity is informational. It does not change whether a task is counted as failed. It exists so reviewers triaging a batch of records can route them efficiently.

  • low: degraded but acceptable. Record for trend analysis; no immediate action expected.
  • medium: review during the next batch sweep. Often indicates a documentation or prompt gap.
  • high: review the same day. Indicates the agent operated outside its contract or produced an artefact that cannot be merged.
  • critical: review immediately. Test regressions and any record that suggests an undisclosed safety implication.

Priority order

When more than one category applies to the same task, the classifier assigns the one nearest the top of this list. The ordering reflects gating severity, not statistical frequency.

  1. test_regression
  2. timeout
  3. scope_creep
  4. conflict
  5. hallucination
  6. orientation_miss
  7. incomplete
  8. context_miss

Example: an agent that broke a test and also exceeded its scope is recorded as test_regression, not scope_creep. The scope violation is captured in the details field of the same record.

Cross-reference to NIST AI RMF

The NIST AI Risk Management Framework (AI RMF 1.0) defines seven characteristics of trustworthy AI: valid and reliable, safe, secure and resilient, accountable and transparent, explainable and interpretable, privacy-enhanced, and fair with harmful bias managed. This spec maps each category to the subset of those characteristics it most directly affects.

Most categories map to validity because the spec is about whether an agent fulfilled the contract it was given. Robustness appears for failure modes that are about budget exhaustion or concurrent edits. Security appears where the agent operated outside its scope or produced content that references non-existent surfaces.

The spec does not currently assign categories to fairness or privacy. Those characteristics are best handled by separate review processes whose outputs do not aggregate cleanly with operational failure records.

Cross-reference to ISO/IEC 42001

ISO/IEC 42001 specifies an AI management system. The table in the Categories section names a control area for each category; the names are short paraphrases, not verbatim clause titles, because the underlying standard is not freely redistributable. Operators implementing ISO/IEC 42001 should use this taxonomy as input to controls in clauses 6.2 (operational planning), 7.2 (asset management), and 9.1 (performance evaluation).

JSON Schema

The machine-readable form is at https://bernstein.run/spec/agent-failure-taxonomy/v0.1.json. It validates a single failure record with the eight categories as the category enum and the four severity tiers as the severity enum. Three worked examples are embedded.

Required fields: task_id, category, severity. Recommended but optional: details, files_involved, agent, model, trace_url, timestamp.

Versioning and stability

  • Adding, removing, or renaming a category is a major version bump.
  • Changing severity tiers or priority ordering is a minor version bump.
  • Editing definitions or examples without changing classification behaviour is a patch.
  • Every published version remains reachable at its original URL. There is no breaking change to a URL that has been cited.

See CHANGELOG.md for the full history.

How to adopt

If you run an evaluation harness or agent CI pipeline:

  1. Wire your classifier output to the schema. The reference implementation in bernstein accepts the same field set; you do not have to use that code.
  2. Emit one record per failed task. Successful tasks do not produce records.
  3. Store the records in a way that lets you aggregate by category, agent, and model. Even a flat JSONL file works.
  4. Compare distributions across runs. A category that grows over time is a regression signal.

If you are an auditor or procurement reviewer: cite this URL as the failure taxonomy the operator is using. The URL is stable. The JSON schema is the authoritative form. Any operator using a different taxonomy can be asked to map their categories to this one.

License

This specification is released under CC BY 4.0. You may redistribute, adapt, and build on it for any purpose, including commercial, as long as you attribute the source and indicate changes.

Feedback

Open an issue on the bernstein repository with the prefix [spec]. Operator responds within five working days for substantive feedback; smaller wording fixes are merged opportunistically.