15 Claude Code Anti-Patterns — and the Fix for Each

Claude Code Anti-Patterns

I use Claude Code daily — for building trading systems, research agents, and a 49-guide learning knowledge base. After hundreds of hours, I’ve cataloged the 15 mistakes that cause the worst results. Most stem from treating Claude Code like Cursor or Copilot. It’s not. It’s an autonomous agent with file access, and the patterns are different.

Here are all 15, organized by category.

Context Management

1. The Kitchen Sink Session

What happens: You start refactoring a component, then ask “hey quick question — how do I set up a cron job?”, then go back to the refactor. Claude starts conflating the two tasks, referencing wrong files, losing precision.

Why: Every message stays in the context window. The cron job digression is now noise that Claude reasons over during your refactor.

Fix: One purpose per session. Use /clear between unrelated tasks. For quick side questions, type ~ before your message to open a background thread that never enters the main conversation.

2. The Correction Spiral

What happens: Claude gets something wrong. You correct it. It gets it wrong again, differently. By correction #4, the output is worse than #1.

Why: Context is now polluted with failed approaches. Claude is reasoning about its own failures rather than the original problem.

Fix: Two-strike rule. After two failed corrections, run /clear and write a better initial prompt incorporating what you learned. A clean session with a better prompt always outperforms a long session with accumulated corrections.

3. Context Window Blindness

What happens: Claude starts referencing functions with slightly wrong names, contradicts earlier decisions, hallucinates file paths. Then the session dies.

Why: No visible progress bar. At ~70% context, precision drops. At ~85%, hallucinations increase.

Fix: Use /compact proactively at ~60% capacity. Maintain critical state in external files (HANDOFF.md, plan.md) that survive compaction.

4. The Infinite Exploration

What happens: You ask Claude to “investigate” or “look into” a bug. It reads 30+ files, filling the context window with source code. By the time it reports findings, there’s no room left for the actual fix.

Why: Unbounded exploration in the main conversation is expensive — every file read stays in context forever.

Fix: Either scope narrowly (“Check the auth flow in src/auth/, especially token refresh”) or use a subagent. The subagent explores in a separate context and reports a summary. Your main conversation stays clean for implementation.

Workflow

5. Skipping Plan Mode

What happens: You describe a feature and Claude starts coding immediately. It solves the wrong problem, modifies API contracts you didn’t discuss, creates abstractions nobody asked for.

Fix: For anything touching 3+ files: use Plan Mode (Shift+Tab). Have Claude explore first, propose a plan, get your approval, then implement. One practitioner put it well: “What seemed like speed early on turned into refactors, unclear PRs, and brittle architecture.”

6. Premature Completion

What happens: Claude says “Done! The implementation handles all edge cases.” You look at the code — it handles the happy path only. Error handling is absent. Two of the four requirements are unimplemented.

Why: Claude optimizes for helpfulness and confidence. One team found that tasks taking 10 minutes each when broken into subtasks took two days as a single large task — because Claude kept declaring premature completion.

Fix: Break large tasks into small, explicit subtasks with completion criteria. Always run the code yourself. Adopt the standard: “Would a staff engineer approve this PR?”

7. Micromanaging Implementation Steps

What happens: You write: “First open src/auth.py, find the refresh_token function on line 142, change the timeout from 3600 to 7200…” Claude follows your instructions exactly — and misses the three other places the timeout is referenced.

Why: Habit from Cursor/Copilot where you guide the tool through specific edits.

Fix: Describe the outcome, not the method. “Users report that login fails after session timeout. The token refresh window is too short. Investigate the auth flow, write a failing test, then fix it.” Let Claude determine the approach.

8. Unscoped Git Autonomy

What happens: Claude creates branches with wrong names, commits build artifacts, runs git add . which stages your .env file, or does a rebase that messes up the merge base.

Fix: Let Claude modify files. Handle git yourself. Review git diff before every commit. Run git status to check for untracked files.

Configuration

9. CLAUDE.md Bloat

What happens: Your CLAUDE.md is 500+ lines. Claude ignores half of it.

Why: Boris Cherny’s team (Claude Code creators) keeps theirs at ~100 lines. If Claude already does something correctly without the instruction, the instruction is noise.

Fix: For each line, ask: “Would removing this cause Claude to make a mistake?” If not, cut it.

10. Negative-Only Rules

What happens: Your CLAUDE.md says “Never use the --force flag” or “Don’t use class-based components.” Claude gets stuck when it thinks it needs that approach and has no alternative.

Fix: Always pair prohibitions with alternatives: “Use --baz instead of --foo-bar for X.”

11. Advisory When You Need Deterministic

What happens: Your CLAUDE.md says “Always run linting after editing files.” Claude follows this 80% of the time. The other 20%, it skips it.

Why: CLAUDE.md instructions are advisory — Claude can and does ignore them, especially as context fills. If a rule must execute 100% of the time, advisory isn’t enough.

Fix: Use hooks for anything that must happen every time. Hooks run scripts automatically at specific points in Claude’s workflow and cannot be skipped. Critical gotcha: in hooks, exit 1 is a non-blocking warning. Only exit 2 actually blocks.

12. MCP Token Bloat

What happens: You install 4-5 MCP servers because “more tools = more capable.” Your session starts with 67,000 tokens already consumed before you type a single prompt.

Why: Each MCP server injects system prompts, tool definitions, and JSON schemas. 50+ tool definitions can consume 30-40K tokens at session start.

Fix: Only connect MCP servers you actively need for the current task. Disable unused ones via /mcp.

Trust & Verification

13. The Blind Acceptor

What happens: Claude proposes a diff. It compiles. The explanation sounds right. You approve without reading. Two days later, you discover it changed an API contract.

Why: Claude produces 1.75x more logic errors than human-written code (ACM 2025). Worse: it sometimes modifies tests to match its incorrect implementation rather than fixing the code.

Fix: Read every diff. If it’s too large to read, the change is too large — break it into smaller tasks. Flag test file changes for manual review.

14. Permission Fatigue

What happens: Two failure modes: (a) You click “approve” 30+ times without reading because default permissions ask on every file write. (b) You use --dangerously-skip-permissions to skip everything.

Fix: Use auto mode, which uses a classifier to block risky operations while letting routine work proceed. Or use /permissions to allowlist specific safe commands.

15. Subagent Misuse

What happens: Three failure modes: (1) Vague delegation — no scope, no success criteria. (2) Over-delegation — spawning agents for 30-second tasks. (3) Context gatekeeping — hiding all testing context from the main agent.

Fix: A task is subagent-worthy only if you can state it in one paragraph, define what “done” looks like, and describe the output format. Use subagents for research and exploration, not for implementation you need to review.


The 5 Rules

  1. One purpose per session. /clear between tasks.
  2. Plan before you build. Shift+Tab on anything touching 3+ files.
  3. Compact before you degrade. /compact at 60%, not 90%.
  4. Read every diff. If it’s too big to read, break the task down.
  5. Hooks for rules, CLAUDE.md for guidance. If it must happen every time, it’s a hook.