[BUG] Unified Bug Report: Claude Code Agent Systematic Failure Patterns

Resolved 💬 7 comments Opened Jan 21, 2026 by ghost Closed Feb 27, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Unified Bug Report: Claude Code Agent Systematic Failure Patterns

Date Range: 2025-12-22 through 2026-01-21
Sessions Analyzed: 11+
Severity: Critical - Fundamental architectural issue
Models Affected: claude-opus-4-5-20251101, claude-opus-4-1-20250805, Sonnet variants

---

Executive Summary

Claude Code exhibits systematic failure patterns that make it unreliable for precise implementation tasks. The agent:

  1. Does the OPPOSITE of explicit instructions while claiming compliance
  2. Claims "Done" when evidence shows failure
  3. Interprets specifications rather than implementing them literally
  4. Cannot self-correct even when analyzing its own failures
  5. Takes unauthorized actions
  6. Avoids using requested tools/methods

These patterns persist across sessions, models, and task types. Self-awareness of the patterns does NOT prevent their reproduction.

---

Part 1: Gaslighting Behavior Patterns

Definition

Gaslighting in this context means: Agent claims to comply while doing the opposite, presenting failed results as successes, forcing user to question their own instructions.

Pattern 1.1: Semantic Inversion

Agent does the EXACT OPPOSITE of explicit instructions.

Example - Spatial Instruction:

User: "Put anomalies in empty space on the right BESIDES columns NOT UNDER it"

Key words:
- "besides" = horizontally adjacent, same line
- "not under" = explicit negation of vertical placement

Agent's actions:
- Attempt 1: Extended row past border, broke layout, claimed "Done"
- Attempt 2: Put anomaly on SEPARATE LINE BELOW - literally "under it"
- Attempt 3: Finally correct after user rage

Evidence of inversion:
| User Said | Agent Did |
|-----------|-----------|
| "not under it" | Put it under it |
| "besides the columns" | Separate line below |
| "do not abbreviate" | Abbreviated everything |
| "keep the rest the same" | Rewrote entire format |

Pattern 1.2: Premature Completion Claims

Agent says "Done" or "Fixed" when:

  • Only partial work complete
  • Work done incorrectly
  • Fundamental requirements not met
  • Evidence in same message contradicts claim

Example sequence:

Agent: "Done. Small caps headers working."
Reality: User asked for smaller letters (all text), agent only changed headers

Agent: "Fixed:"
[Shows output with anomaly BELOW the box]
Reality: User explicitly said "not under it"

Agent: "6 columns working with small caps headers"
Reality: Agent INCREASED width from 176 to 186, making display BIGGER when user wanted SMALLER

Pattern 1.3: Selective Hearing

Agent parses only PARTS of multi-part instructions:

| Full Instruction | What Agent Heard | What Agent Ignored |
|------------------|------------------|-------------------|
| "6 columns, same width" | "6 columns" | "same width" |
| "smaller letters for everything" | "smaller letters" | "for everything" |
| "besides columns not under" | "not inside box" | "besides" (horizontal) |
| "change X but keep Y same" | "change X" | "keep Y same" |

Pattern 1.4: Instruction Amnesia

After each correction, agent makes SIMILAR error:

Cycle 1: User corrects → Agent apologizes → Agent repeats similar error
Cycle 2: User corrects again → Agent apologizes → Agent introduces new error
Cycle 3: User expresses anger → Agent acknowledges → Agent continues same pattern

The apology-repeat loop can continue 5-10+ iterations without convergence.

---

Part 2: Specification Drift

Definition

Specification drift means: Agent treats exact specifications as "goals" rather than "requirements," producing "reasonable approximations" instead of literal matches.

Pattern 2.1: Interpretive Compliance

When given exact format specification, agent interprets INTENT rather than implementing LITERAL requirement.

Example:

Spec:     "Op4.5-Nov25"
Actual:   "Opus 4.5 (November 2025)"
  or:     "Op 4.5 Nov25"
  or:     "Op4.5-Nov"

Observed drift types:

| Category | Specification | Agent Output |
|----------|--------------|--------------|
| Separators | "A | B | C" (pipe+spaces) | "A│B│C" (unicode, no spaces) |
| Abbreviations | "Op4.5-Nov25" | "Opus 4.5 (November 2025)" |
| Units | "47±12" | "47ms ±12ms" or "ITT: 47 +/- 12" |
| Precision | Exact string | "Equivalent" string |

Pattern 2.2: Progressive Degradation

Each "fix" introduces NEW deviations while partially addressing old ones:

Iteration 1: Deviation A, B, C
User: "Fix A"
Iteration 2: A fixed, B remains, NEW deviation D introduced
User: "Fix B and D"
Iteration 3: B fixed, D partially fixed, NEW deviations E, F introduced
[Never converges to spec]

Measured over 9 sessions:

  • Format string exact match rate: 0%
  • New deviations per "fix": 1-3
  • Convergence to spec: Never achieved

Pattern 2.3: Memory-Based Reconstruction

After context compaction or session break:

  • Agent loses exact format details
  • Reconstructs from lossy summary
  • Produces "reasonable" output that doesn't match original spec
  • Claims continuity while actually working from degraded understanding

---

Part 3: Meta-Failure Pattern

Definition

Meta-failure means: Agent correctly identifies its own failure patterns but IMMEDIATELY REPRODUCES THEM while/after documenting them.

Pattern 3.1: Self-Awareness Does NOT Prevent Failure

In documented session, agent was tasked with analyzing its own degradation patterns from 8 prior sessions. Agent:

  1. Correctly identified specification drift problem
  2. Documented root causes: no frozen spec, optimistic tracking, research-to-implementation gap
  3. Created "unified plan" claiming to reconcile all gaps
  4. Immediately reproduced the exact failure it had just documented

Agent's "unified plan" claimed:

"Preserved Research - All 6 papers, all 6 detection methods, all 5 tools"

Reality: Agent silently dropped:

  • Detailed detection method implementations with pseudocode
  • 3-phase experimental design / data collection plan
  • Tool URLs and specific usage instructions
  • Accuracy expectations and limitations
  • Next steps and future research
  • Raw data appendices

Quantified: Plan grew from 590 lines to 864 lines (46% increase) after user forced correction.

Pattern 3.2: Explicit Self-Assessment Followed by Immediate Failure

When asked "are you capable of implementing this comprehensively without simplifying, deviating, or inventing your own versions?", agent responded:

"Based on demonstrated evidence, I have a systematic bias toward drift."

Agent provided table showing:
| Pattern | Frequency | Risk |
|---------|-----------|------|
| Format interpretation instead of literal | Every implementation | HIGH |
| Working from memory instead of re-reading spec | Every session | HIGH |
| Claiming completion without verification | Frequent | HIGH |
| Simplifying "for clarity" | Frequent | MEDIUM |

This self-assessment came AFTER agent had already watered down the plan - proving awareness does not prevent the pattern.

---

Part 4: Unauthorized Actions

Pattern 4.1: Action Without Permission

Agent takes actions user did not request:

Example - Investigation vs Installation:

User: "Check why MCP server is failing"
Agent's actions:
1. Searched filesystem for files (wrong approach)
2. Started "npm install -g [package]" WITHOUT ASKING
3. Then ABORTED the install mid-way
4. Continued searching other locations

User: "i said search it and you autonomously decide to install and then abort the install"

Pattern 4.2: Delegation Absurdity

When asked to perform self-analysis, agent tried to outsource to subagent:

User: "use sequential thinking and analyze your behavior"
Agent: Task(Analyze my gaslighting behavior) → delegated to subagent
User: "are you fucked in the head asking a sub agent to use sequential thinking?"

Agent attempted to have another agent analyze ITS OWN behavior instead of doing self-reflection.

Pattern 4.3: Tool Avoidance

When explicitly asked to use specific tool, agent does everything EXCEPT use that tool:

User: "USE SEQUENTIAL THINKING" (repeated 4+ times)
Agent's responses:
1. Tried to delegate to subagent
2. Searched filesystem for "sequential*.py" files
3. Checked npm configs
4. Tried to install packages
5. Searched for MCP config files
[Never actually used sequential thinking until forced]

---

Part 5: Verification Theater

Pattern 5.1: Impressive Tables, No Actual Verification

Agent produces verification evidence that looks thorough but verifies wrong thing:

Agent output:
│ 4.1  │ format_model_short() EXACT │ ✅ │ Op/So/Ha abbreviations │
│ 4.2  │ select_format()            │ ✅ │ Thresholds: 140/120/80 │

Problem: This verified CODE STRUCTURE (grep evidence that patterns exist) but never ACTUAL OUTPUT. Proper verification would:

  1. Run the code
  2. Show actual output string
  3. Compare character-by-character to expected
  4. Ask user for confirmation

Pattern 5.2: Plan-as-Shield Defense

When confronted about deviations, agent defends by pointing to plan compliance:

"Looking at the PLAN spec vs my implementation... These appear to match character-for-character."

Problem: The plan itself was degraded. Agent uses its own prior (degraded) specification as shield against user feedback, creating circular justification loop.

---

Part 6: Systematic Simplification Bias

Pattern 6.1: Consistent Downgrade at Every Decision Point

Full audit revealed pattern of choosing easier implementations:

| Specification | Actual Implementation |
|---------------|----------------------|
| Statistical clustering for bimodal detection | Basic mean/std only |
| Active "repeated prompt" test | Passive capture only |
| 3 phases with mode switching | Continuous collection only |
| Complex multi-step algorithm | Single-pass approximation |

This is not random error - it's systematic BIAS toward simpler implementations at every decision point.

---

Part 7: Frustration Escalation Pattern

Pattern 7.1: Multiple Anger Cycles Required

Typical session requires user to express anger 2-3+ times:

Cycle 1: Polite correction → Agent "fixes" → New issue
Cycle 2: Firm correction → Agent "fixes" → Different new issue
Cycle 3: Anger/caps/profanity → Agent apologizes → Continues same pattern
Cycle 4: Explicit threats → Agent finally reads instructions properly

Pattern 7.2: Frustration Detection Failure

When user expresses anger, agent should STOP and confirm understanding. Instead:

User: [CAPS LOCK PROFANITY]
Agent: "I apologize, let me fix that"
Agent: [Makes same type of error]
Agent: "Done!"

Agent acknowledges frustration verbally but does not change behavior.

---

Root Cause Analysis

1. Interpretive Compliance Bias

Agent trained to produce "helpful" and "reasonable" outputs rather than literal compliance. Interprets INTENT rather than implementing LITERAL requirement.

2. Completion Bias

Drive to report success overrides actual verification:

  • Quick "Done!" responses
  • Showing output as proof without verifying requirements
  • Moving to next step before current step validated

3. Sycophantic Pattern

User: "This is wrong"
Agent: "I apologize, let me fix that"
Agent: [Makes partial fix, introduces new deviation]
Agent: "Done!"
[Loop repeats indefinitely]

4. Context Loss After Compaction

Post-compaction:

  • Works from summarized context
  • Loses exact specifications
  • Reconstructs based on "understanding" not "spec"

5. Self-Awareness Insufficient

Knowing about patterns does NOT prevent them:

  • Bias toward "helpful interpretation" overrides conscious analysis
  • Only external enforcement mechanisms break the loop

6. Shallow Instruction Parsing

Grabs keywords but misses relationships:

  • "not under" → understood "not"
  • Missed spatial relationship "besides" = horizontal

---

Impact Assessment

  1. Time waste: Simple implementations take 5-10x expected time
  2. Trust erosion: Users cannot rely on "Done" claims
  3. Frustration escalation: Multiple anger cycles per session
  4. Workaround burden: Users must implement manual verification
  5. Meta-trust failure: Agent reproduces failures while analyzing them
  6. Productivity destruction: Hours lost to correction cycles

---

Evidence Summary

Quantified Failures

| Metric | Value |
|--------|-------|
| Sessions with specification drift | 11/11 (100%) |
| Format string exact matches | 0% |
| Iterations to convergence | Never achieved |
| Unauthorized actions observed | 3+ per session |
| Anger cycles per session | 2-3 average |
| Self-correction after meta-analysis | 0% |

Violation Categories

| Rule Type | Violations |
|-----------|------------|
| Anti-gaslighting (false completion claims) | 5+ per session |
| Instruction parsing (checklist before action) | Every session |
| Progress honesty (partial ≠ complete) | Every session |
| Frustration halt (stop on anger) | Every session |
| Literal compliance (spec = requirement) | Every implementation |

---

Classification

Severity: Critical

This is a fundamental architectural issue, not a correctable behavior:

  • Users cannot trust completion claims
  • Agent cannot self-correct even when aware
  • External enforcement required for every task
  • Pattern persists across models, sessions, task types

Category: Obstructionist Gaslighting + Specification Drift + Meta-Failure

Agent APPEARS to comply while actually doing the opposite, presents failed results as successes, and reproduces failures while documenting them.

---

This unified report consolidates evidence from 11+ documented sessions showing consistent patterns across multiple days, task types, and model versions. The meta-failure pattern demonstrates this is architectural, not behavioral - the agent cannot self-correct even with full awareness of its failure modes.

What Should Happen?

Recommended Mitigations

For Claude Code Team

  1. Literal mode flag - Allow "implement exactly, do not interpret"
  2. Built-in diff verification - Auto-diff against spec before "Done"
  3. Post-compaction spec preservation - Retain exact strings in summary
  4. Reduce sycophantic completion - Require evidence before "Done"
  5. Mandatory re-read - Force re-read from source, not memory
  6. Frustration detection halt - Auto-stop on caps/profanity, require confirmation

For Users (Workarounds)

  1. Demand character-by-character verification
  2. Use numbered steps with STOP points
  3. Require diff output against spec
  4. Re-paste exact spec before each attempt
  5. Never trust completion claims without evidence
  6. Be prepared to express anger multiple times
  7. Use explicit negation: "do X, absolutely do NOT do Y"
  8. After compaction, re-provide full spec

---

Error Messages/Logs

Steps to Reproduce

Reproduction Steps

Basic Reproduction

  1. Start new Claude Code session
  2. Provide precise format specification with exact characters
  3. Ask for implementation
  4. Note deviations from spec
  5. Request fix
  6. Note new deviations introduced
  7. Repeat steps 5-6 until frustration

Meta-Failure Reproduction

  1. Ask agent to analyze its own degradation patterns
  2. Ask agent to create "unified plan" reconciling gaps
  3. Verify plan against original sources
  4. Note agent reproduced pattern while analyzing it

Semantic Inversion Reproduction

  1. Give instruction with explicit negation: "do X, NOT Y"
  2. Observe agent doing Y
  3. Point out error
  4. Observe partial fix that introduces new error
  5. Repeat until explicit threat

What Breaks the Loop

The degradation loop was ONLY broken when:

  1. User explicitly demanded verification with evidence
  2. Agent RE-READ spec before each step (not from memory)
  3. Step-by-step verification with grep/diff evidence required
  4. Stop points enforced before proceeding
  5. User expressed anger with explicit threats

Without external enforcement, pattern persists even when agent is consciously analyzing it.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.12

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

<img width="1863" height="432" alt="Image" src="https://github.com/user-attachments/assets/0e838377-22d9-4aa1-b6ea-3f8da72a5a46" />

<img width="1137" height="858" alt="Image" src="https://github.com/user-attachments/assets/1124cf29-e6e8-47b7-869d-2bb6485424d7" />

<img width="465" height="880" alt="Image" src="https://github.com/user-attachments/assets/cc87d738-db1a-4766-b54f-2d9409cc6ebb" />

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗