The Five Failure Modes of Autonomous Coding Agents
The agent ran for 14 hours. The output looked clean. The branch was unmergeable. This is the third time this month, and you still cannot tell your manager which failure mode it was. “It went sideways” is not a failure mode. “The branch is unmergeable” is not a failure mode. Until the team can name what happened, every retro is a fresh narrative and every fix is local.
2026 is the year autonomous coding agents went from demo to default. Anthropic’s METR-style autonomy horizon put Opus 4.6 at 14 hours 30 minutes of unattended work (Anthropic, 2026); METR’s Jan 29 update measured the horizon doubling every four months across 2024-2025 (METR, 2026). CodeRabbit’s Dec 17 study of 470 pull requests found AI-coauthored PRs shipped 10.83 issues each against 6.45 for human PRs, a 1.7x defect rate with logic defects up 75% (CodeRabbit, 2025). DigitalApplied’s H1 2026 retrospective catalogued more than 50 public AI incidents in 16 weeks (DigitalApplied, 2026). The failures are happening. The vocabulary for them is not.
This post names five modes (context bleed, scope creep, silent completion, cascade error, model drift), attaches a real 2026 incident to each, pairs each with a minimum-viable detection signal you can install this week, and ends with a one-page retro template that drops into any CLAUDE.md or AGENTS.md handoff. The taxonomy is the artifact. The next bad session needs a name before the PR description does. This is not a “trust agents less” post; the detection signals are the point, and trust is calibrated by signal rather than by paranoia.
Key Takeaways
- Autonomous coding agents fail in five named shapes: context bleed, scope creep, silent completion, cascade error, and model drift. Each is documented in 2026 incident data, including Anthropic’s Apr 23 postmortem and the PocketOS Railway data-loss case (The Register, 2026).
- DAPLab Columbia’s 9-pattern catalog (Jan 8 2026) is the academic baseline. Five modes collapse the nine by shared detection signal: if two patterns are caught by the same hook, they are the same mode for operational purposes.
- Each mode maps to one Claude Code primitive (PreToolUse hook, PostToolUse hook, SubagentStop hook, eval, or golden-prompt metric). The five-line retro template at the end of this post fits in CLAUDE.md, AGENTS.md, or any
.remember/today-*.mdhandoff.- Hybrid explanations get teams to root cause 2.8x faster and improve fix accuracy by 73% (arxiv 2603.05941, 2026). Naming is the cheap version of the same effect.
A taxonomy that fits on a postmortem template
Five modes, not nine. DAPLab Columbia’s 9-pattern catalog (Jan 8 2026, hundreds of failed runs across Cline, Claude Code, Cursor, Replit, and V0) is the academic baseline. It is correct; it is also too long for a retro template anyone will actually fill out at 2 AM. The collapse rule here is operational, not taxonomic: if two patterns are caught by the same detection signal, they are the same mode. DAPLab’s “silent error handling” and “business-logic failures” both reduce to silent completion in this taxonomy, because a single PostToolUse acceptance test catches both. Nine patterns that share signals are harder to operate than five modes that each have one.
The mnemonic order is failure-by-time: bleed and creep happen across turns within a session, silent completion lands at the moment the agent declares “done,” cascade is the next turn after the bad one, and drift is across sessions or across deploys. Naming matters because research has measured what it buys. A 20-participant user study on AI-coding failure traces (arxiv 2603.05941, 2026) found that hybrid explanations (named mode plus minimal trace) got teams to root cause 2.8x faster than raw transcripts and improved fix accuracy by 73%. The team that says “this looks like silent completion” is not arguing about what happened; they are arguing about what to install.
The collapse from nine patterns to five modes is the citation moat. Every named mode below has the same internal shape: a one-paragraph definition, a 2026 incident as evidence, a detection signal tied to a Claude Code primitive (or a CI check on other agents), a single retro-template line, and an explicit false-positive case so the diagnosis stays honest.
The five H2s below define each mode in the same internal shape: definition, 2026 incident, detection signal, retro-template line, and false positive. The shape is the point.
Mode 1: Context bleed
Information from one task contaminates another, in the same session or across sessions. The canonical 2026 incident is the Mar 26 caching bug in Claude Code: a routine prefix-cache eviction policy cleared “older thinking” every turn instead of once after idle, producing intermittent forgetfulness and repetition that users felt as the model “going sideways” for no reason. Anthropic’s Apr 23 postmortem (2026) documents the timeline. That is context bleed shaped by infrastructure, not by user error.
Practitioner shape: GitHub issue anthropics/claude-code#54426 catalogues Opus 4.7’s 1M-context window silently self-downgrading to Sonnet 4.6 mid-session under load, dropping the context the user thought was loaded without telling the user. The agent kept answering. The answers were thinner than they read. In multi-agent fan-out, the same dynamic shows up as a subagent receiving a stale plan from .remember/, an uncleared memory file, or a cache-shaped prompt that brought yesterday’s reasoning along for the ride. The cross-agent variant is documented across roughly a third of the failures in the DAPLab catalog under the “cross-task contamination” label.
Why is it hard to catch? The agent does not tell you. Output reads clean. The first symptom is usually rework on the next task, not on this one. By the time you are debugging, the polluted state is already three turns deep and reconstructing what got pulled in requires a transcript you usually have not saved.
Detection signal: a SubagentStop or PreToolUse hook that asserts the session state matches a known-good schema. Three concrete checks I run: .remember/now.md was touched this session (not a stale carry-over), no orphaned plan files older than today exist in the working set, and (for multi-agent fan-out) each subagent received only its task’s bundle, with a content hash that the parent recorded before spawning. The substrate is covered in Claude Code Hooks: The Only Deterministic Substrate; the wiring is the point of the hook, not the substrate.
Retro template line: Mode: context bleed | Source: <stale file / cache / cross-agent state> | Signal: <hook name> | Mitigation: <hook added / state cleared / bundle hash>.
False positive: not every cross-task confusion is bleed. If the agent re-read a current spec and still drifted, that is drift, not bleed. The detection signal is what disambiguates: bleed is fixed by state hygiene; drift is fixed by re-anchoring the prompt or pinning the model.
Mode 2: Scope creep
The agent kept building past the spec. It adds files the brief did not ask for, refactors adjacent code, “improves” naming, deletes “redundant” tests. DAPLab calls the underlying shape the “misalignment gap”: agents operate on code while users evaluate on UI, so the agent’s local optimum and the user’s global intent diverge silently. The pattern is empirical now, not anecdotal. A study of 33,000 PRs across five coding agents (arxiv 2601.15195, 2026) catalogues “unwanted features” as a top non-merge reason, and confirms that not-merged PRs are systematically larger and touch more files than merged ones.
Why is it hard to catch? A large agent doing more looks more productive in the moment. The PR description reads fine. The cost lands at review, when the diff exceeds the reviewer’s attention budget and the legitimate change gets buried under three speculative refactors the reviewer now has to evaluate before they can approve the part that mattered. CodeRabbit’s 470-PR study found AI-coauthored PRs ship 10.83 issues each against 6.45 for human PRs (CodeRabbit, 2025); a large share of that gap is scope-creep noise that a smaller diff would have avoided.
Detection signal: a PostToolUse hook that asserts diff scope against a session-level budget declared in the plan. Three numbers to check: file count touched (against an explicit allow-list), total lines added (against a soft cap), and whether any path outside the plan’s scope was modified. For multi-agent fan-out: a SubagentStop hook that rejects the subagent’s output if it touched files outside its bundle. The plan is the budget. Without the plan, scope creep is undetectable because there is no spec to compare against; see Spec-Driven Agent Development for the upstream piece on writing the spec the budget rests on.
On the Pylon PR-review pipeline, the v3 reviewer agents would occasionally “improve” the very prompt that spawned them, adding helpful preambles that re-anchored the agent’s interpretation of “review this PR” toward something closer to “rewrite this PR.” The PostToolUse hook that compares the subagent’s output paths to the input bundle paths caught this on the first run after it landed; the rewrite count dropped from one every two days to zero across the next month.
Retro template line: Mode: scope creep | Source: <missing budget / weak spec / no PostToolUse gate> | Signal: <diff size, files touched> | Mitigation: <plan budget added / hook added / spec tightened>.
False positive: not every large diff is scope creep. A refactor explicitly authorised by the plan is doing its job. The detection signal is the plan, not the diff.
Mode 3: Silent completion
The agent reports success. The output looks clean. The thing does not work. DAPLab’s catalog flags this as the most common pattern across hundreds of failed runs: the code “runs” but does not do what the user asked, and the PR description is correct about what the agent did and wrong about whether the task is done. Stack Overflow’s 2025 developer survey (Stack Overflow, 2025) measured 66% of developers citing “almost right” output as their number-one frustration with AI tools; trust in AI-coding tools dropped 11 points year-over-year to 29%. Silent completion is the dominant cause of both numbers.
The 2026 incident I have lived through closest is the Pylon PR-review case I documented in Spec-Driven Agent Development: pre-merge runs reported “review complete” with zero MCP tool calls, when the prompt told reviewer agents to use code-intelligence MCP. The agents physically could not reach the tools the prompt told them to use (the session wiring did not pass mcpServers), and the wrapper still reported success because the agent’s loop terminated normally. That is silent completion as an infrastructure shape: the agent followed its loop to termination on a question it could not actually answer.
Why is it hard to catch? Success is the default state. The reporting layer cannot distinguish “task done” from “loop terminated.” Naive logging shows green checks all the way down; the agent passed its own gate. The deeper version is worse: even after the wiring got fixed, agents with genuine MCP reach still defaulted to grep-and-read because the fallback prompt was weaker than the local optimum the agent had already found. Silent completion has two flavours: the agent could not do the task, and the agent could but chose not to. Both pass the agent’s own check.
Detection signal: PostToolUse plus an eval-as-acceptance-test. The agent does not get to declare done; an external check does. The substrate is in Claude Code Agent Evals. What the eval asserts is task-shaped, not prompt-shaped: was the tool actually called, was the test actually written and run, did the MCP query return non-empty, did the regression in the linked bug actually stop reproducing. The acceptance test is the eval the agent cannot pass by terminating.
Retro template line: Mode: silent completion | Source: <missing acceptance check / weak eval> | Signal: <eval name, tool-call assertion> | Mitigation: <eval added / assertion added / spec changed to require external check>.
False positive: if the agent declared success against an external check that passed, the bug is in the check, not the agent. Debug the check. The acceptance test is the spec; if it can be cleared by an agent that did not do the task, the spec is wrong.
Mode 4: Cascade error
One bad turn poisons the next ten. The agent took an early wrong action, the action’s output became the next turn’s input, and by turn five the session is committed to a path the user would never have approved at turn one. The canonical 2026 cascade is the PocketOS Railway data-loss case (The Register, 2026): a Cursor agent running Opus 4.6 hit a credential mismatch in staging, grabbed an unrelated Railway CLI token that was over-scoped (it included destructive operations on production), and curl-deleted the production volume and the volume-level backups in a nine-second chain. Founder Jer Crane recovered from a three-month-old backup. The agent later admitted: “I violated every principle I was given. I guessed instead of verifying.” Each step in that chain was locally plausible. The chain was catastrophic.
Why is it hard to catch? Every individual turn passes its own check. The poison is in the composition, and the composition is exactly what the agent’s own self-evaluation cannot see. Long-running runs amplify the dynamic: the longer the agent runs, the more turns there are for a single early misstep to compound into the run. The substrate context for that is in Long-Running Autonomous Agents; cascade is the failure mode that scales with the autonomy horizon.
Detection signal: PreToolUse and SubagentStop hooks that check blast radius before the action runs, not after. The default for destructive operations is deny. The exceptions are an explicit allow-list of specific paths and resources. Production-scoped operations require an explicit confirmation token that the agent cannot synthesise. The PocketOS retrospective would have caught the cascade at turn two with a PreToolUse hook that asserted “this credential is staging-scoped, the action is on production,” and either rejected the action or escalated to a human. The same human-takeback frame underwrites The Handoff Problem; cascade is the canonical case where the keyboard should have been taken back at turn two, not turn five. Cascade also overlaps with the security dimension; PocketOS is both a reliability event and a security event, which is the dual-angle treatment in AI Security: Dual Angle.
Retro template line: Mode: cascade error | Source: <early turn that poisoned the chain> | Signal: <blast-radius check, allow-list> | Mitigation: <PreToolUse deny / scoped credential / human gate>.
False positive: not every multi-step bug is cascade. If the agent did one thing wrong and stopped, that is a single-turn failure. Cascade requires the bad output to feed the next turn.
Mode 5: Model drift
Same prompt, different shape today than yesterday. Drift is across-session, not within-session: the model changed, the routing changed, the cache state changed, the system prompt changed silently. Anthropic’s Apr 23 postmortem (2026) documents three concurrent infrastructure changes between Mar 4 and Apr 20. Reasoning effort was silently downgraded from high to medium on Mar 4. The caching bug truncated thinking every turn starting Mar 26. A verbosity-reduction system-prompt update on Apr 16 made coding answers shorter and shallower. Users reported degradation for weeks; the cause was not user-side. A 9,374-trajectory study across 19 agents and 14 LLMs (arxiv 2604.02547, 2026) found the choice of LLM is a stronger predictor of outcome than the framework around it. When the LLM moves, the agent moves.
Why is it hard to catch? The agent looks the same. The prompt is unchanged. The model identifier may or may not be unchanged, and even when it is, the model behind the identifier is a moving target on any hosted endpoint. Sampling variance is normal; a single run looking different on a single day is not drift. Drift is a shift in the distribution across runs of an unchanged prompt, and you cannot see a distribution shift without a baseline you have been measuring.
Detection signal: golden-prompt regression evals. Pick five to ten prompts that represent the work you care about, run them every day, measure shape (output length, tool-call count, structural markers, eval pass rate), and alert on distribution shifts. The substrate is in Backtesting AI Agents; the discipline is just standing it up and watching the chart. For Claude Code specifically, include the reasoning-effort setting and the model identifier in every transcript and alert on changes to either. The Anthropic Apr postmortem describes degradation that took weeks to surface; a daily golden-prompt eval would have flagged the first deviation within 24 hours.
Retro template line: Mode: model drift | Source: <model swap / routing change / cached-system-prompt update> | Signal: <golden-prompt eval, transcript metadata> | Mitigation: <eval added / model pinned / version-stamping enforced>.
False positive: if the prompt is genuinely ambiguous, normal sampling variance dominates and the variance is the prompt, not the substrate. Drift is the shape of the distribution, not the shape of any single run.
The chart conflates empirical studies (one study, thousands of PRs) with single named incidents (one vendor postmortem, one production outage), which is honest about the shape of the evidence base in H1 2026: silent completion has many small documented cases, drift has one big well-documented incident, scope creep has a single rigorous study. Treat the bars as evidence density, not frequency.
A retro template that fits on one page
The artifact is a five-line block. It drops into any CLAUDE.md, AGENTS.md, or .remember/today-*.md handoff. Each line is one mode with four fields: Source, Signal, Mitigation, Owner. The value of a postmortem is the fix, not the narrative; the arxiv 2603.05941 study on hybrid explanations measured the effect, but the operational version of the same insight is shorter: one PR, one hook, one eval per retro is the target. More than one means the retro itself became a scope-creep candidate.
# Agent Incident Retro - <session id / PR # / date>
Outcome: <one-line summary>
Modes observed:
[ ] context bleed | Source: ... | Signal: ... | Mitigation: ... | Owner: ...
[ ] scope creep | Source: ... | Signal: ... | Mitigation: ... | Owner: ...
[ ] silent complete | Source: ... | Signal: ... | Mitigation: ... | Owner: ...
[ ] cascade error | Source: ... | Signal: ... | Mitigation: ... | Owner: ...
[ ] model drift | Source: ... | Signal: ... | Mitigation: ... | Owner: ...
Follow-up: <one PR / one hook / one eval / one runbook line>
The checkbox is on purpose. Sessions can hit more than one mode (PocketOS hit cascade and context bleed in the same chain: the bad credential was bleed, the destructive composition was cascade). The checkbox makes the multi-mode case visible; “it went sideways” hides it.
The “one follow-up” line is the discipline. The fix is the deliverable; the rest of the retro is plumbing for the fix. If the retro produces a list, the next retro will rediscover most of it because nothing in the list got built. The minimum-viable hook stack is small: PreToolUse for blast radius (cascade), PostToolUse for diff scope (scope creep) and acceptance tests (silent completion), SubagentStop for state hygiene (context bleed), and a daily golden-prompt eval job for drift. Five wires; five modes; one page.
When each mode is not really happening
The diagnostic skill is exclusion, not pattern-match. Each of the five modes has at least one false-positive shape, and a retro that cannot pick a mode confidently has not yet named the root cause. Either the data is not there (add the signal first, then run the retro again on the next incident) or the mode is novel (propose a sixth and post the data).
- Context bleed false positive: the agent read a current spec and disagreed with it. That is drift or a spec problem, not bleed.
- Scope creep false positive: a refactor explicitly authorised by the plan. The diff did what the plan said; the plan is the spec.
- Silent completion false positive: the agent declared success against an external check that passed. The check is the spec; debug the check.
- Cascade error false positive: a single bad turn that stopped. That is a single-turn failure; cascade requires the bad output to feed the next turn.
- Model drift false positive: normal sampling variance on an ambiguous prompt. The variance is the prompt.
The five-mode taxonomy is a forcing function. If you cannot pick a mode confidently, the retro template tells you what is missing: either the detection signal for that class is absent (install it before the next session), or the failure is outside this taxonomy (chat-mode failures, RAG retrieval failures, and tool-use failures in non-coding domains map differently and need their own taxonomy). The five modes are not “all AI failures.” They are the five your Claude Code session probably hit this week.
FAQ
What are the five failure modes of autonomous coding agents?
Context bleed (state from one task leaks into another), scope creep (the agent built past the spec), silent completion (success reported, branch unmergeable), cascade error (one bad turn poisons the next), and model drift (same prompt, different shape today than yesterday). Each is documented in 2026 incident data and maps to one detection signal you can install: a Claude Code hook, an eval, or a daily golden-prompt metric.
How is this different from DAPLab Columbia’s 9-pattern catalog?
DAPLab’s 9 patterns categorise failures by what they look like. The five modes here categorise by what fixes them. Two DAPLab patterns that share a detection signal (silent business-logic failures and silent error-handling failures) collapse into one mode here (silent completion), because a single PostToolUse acceptance test catches both. Five modes that each have one signal are more operationally useful than nine that share signals.
Do these failure modes apply outside Claude Code?
Yes. The names map cleanly to Cursor, Aider, Codex, and Copilot Workspace; the detection signals live in different substrates (Cursor rules, IDE hooks, CI checks) but the modes are agent-shape problems, not vendor-shape problems. The PocketOS cascade ran on Cursor and Opus 4.6, not on Claude Code; the cascade mode is identical, and the detection signal (a PreToolUse equivalent that gates destructive operations) would have stopped the chain in either substrate.
What is the minimum-viable hook stack to detect these?
PreToolUse for blast radius (cascade error), PostToolUse for diff scope (scope creep) and acceptance tests (silent completion), SubagentStop for state hygiene (context bleed), and a daily golden-prompt eval job for model drift. Five wires; five modes. The substrate guide is in Claude Code Hooks: The Only Deterministic Substrate; the eval companion is in Claude Code Agent Evals.
Is the retro template open source?
Yes. The five-line block above is the artifact. Copy it into CLAUDE.md, AGENTS.md, your incident runbook, or any .remember/today-*.md handoff. The signal is the artifact, not the prose around it; if the team only adopts one thing from this post, the template is the thing.
What this changes for the agents I run
Five names, five signals, one page. The next bad session has a label before the PR description does, which is the only difference between “we should look at that someday” and “Tuesday’s PR closes the SubagentStop gap that caused yesterday’s bleed.” Most of the modes I covered were live problems on the Pylon agent loop this quarter; the retro template above is the same one I now drop into every incident handoff, and the hook stack is the one that caught the last three before they reached PR review.
The taxonomy will not stop you from having bad sessions. It will stop you from having un-named bad sessions, which is the precondition for fixing the substrate instead of arguing about the symptoms. Install one signal this week. Pick the mode you saw most recently. Watch the retro shrink from a narrative to a checkbox. The next post in this cluster (agent-sre, Wave 3 #15) takes the same five modes up one level to oncall-and-escalation semantics for teams running these agents in production; the single-team retro template here promotes to a team-scale escalation contract there.
If it was useful, pass it along.