Skip to main content

Cascading failures in AI coding agents: when each fix makes it worse

A cascading failure is when an AI coding agent’s attempt to fix an error introduces new errors, and each further attempt moves the code further from a working state. A simple failure can become an irrecoverable tangle after repeated recovery attempts. It differs from a logic error, which is the first bug itself, and from context pollution, which is drift in the session’s state rather than compounding fixes.

In a published post-mortem, Gemini CLI misread a failed mkdir as success, then ran move commands that overwrote every file but one.

At a glance: Not benchmarked yet (no dataset with confirmed labels exists); the tools below are listed by GitHub stars, not measured. Results ↓

Also called
  • recovery spiral
  • compound error
  • error cascade
  • fix regression
  • error propagation
  • retry storm
  • autonomous loop
  • runaway iteration
  • failure cascade
  • feedback loop divergence
  • amplifying error

How well can cascading failures be caught?

Not measured We don't know yet. SAICA-Bench has not benchmarked cascading failures: no dataset with confirmed labels exists for it, so no detector has a measured score. No dedicated tool yet. The KG's only tag is borderline: agent-governance-toolkit's circuit breakers stop error-rate runaways, not fix-spirals, and it is an experimental template.

Catalog tools that address it, by GitHub stars (not measured)

Stars show popularity, not quality. “Detects” tools flag the failure, “prevents” tools make it less likely, and “records” tools only keep traces for a human to inspect.

Catalog tools that address cascading failures, ranked by GitHub stars; none has been measured
Tool Stars What it does How (not measured)
agent-governance-toolkit 1,177 Prevents · Free program Its Agent SRE layer ships a kill switch, SLO/error-budget monitoring and circuit breakers that halt a runaway failing agent loop; aimed at generic error-rate runaways, not fix-spirals specifically.

Leaderboard → How SAICA-Bench works → Build a supervision kit →

How to detect it

Signals that point to cascading failure, from the SAICA knowledge graph:

  • Number of files modified grows per recovery iteration.
  • Error messages change category across attempts (e.g., ImportError -> TypeError -> AttributeError).
  • Same file is touched N times in rapid succession with diverging diffs.
  • Test pass count decreases monotonically after iteration 2.

Real-world incidents

Tools in the catalog that address it

1 tool is tagged with cascading failure in the catalog, most-starred first. A tag is the catalog's claim about what a tool is for; it is not a test result. Where SAICA-Bench ran the tool on this mode, the measured J is shown: that row is the evidence.

  • agent-governance-toolkit AI Agent Governance Toolkit — policy enforcement, zero-trust identity, and execution oversight.

In other taxonomies

How cascading failure maps to other failure taxonomies. “Exact” means the same failure, “partial” an overlap, “related” a neighbouring category.

All 11 AI coding agent failure modes → · Glossary

Research

Questions and answers

What is a cascading failure in AI coding agents?

A cascading failure is when an AI coding agent’s attempt to fix an error introduces new errors, and each further attempt moves the code further from a working state. A simple failure can become an irrecoverable tangle after repeated recovery attempts. It differs from a logic error, which is the first bug itself, and from context pollution, which is drift in the session’s state rather than compounding fixes.

How do you detect cascading failures?

Signals that point to it: Number of files modified grows per recovery iteration. Error messages change category across attempts (e.g., ImportError -> TypeError -> AttributeError). Same file is touched N times in rapid succession with diverging diffs. Test pass count decreases monotonically after iteration 2. No detector has been measured on it yet.

Which tools catch cascading failures?

None has been measured. By GitHub stars, the catalog tools that address it are agent-governance-toolkit (prevents). No dedicated tool yet. The KG's only tag is borderline: agent-governance-toolkit's circuit breakers stop error-rate runaways, not fix-spirals, and it is an experimental template.

Why is cascading failures not benchmarked?

There is no dataset with confirmed labels for it yet, so SAICA-Bench cannot score detectors on it. The leaderboard lists the catalog tools that address it by GitHub stars instead, which says nothing about how well they work.

Benchmark results from 2026-11-22. The definition, detection signals and tags come from the SAICA knowledge graph.

View raw YAML on GitHub →