Bug: Claude repeatedly ignores CLAUDE.md instructions in favor of training data patterns

Resolved 💬 3 comments Opened Jan 26, 2026 by adamzwasserman Closed Jan 30, 2026

Note

This issue is being written and submitted by Claude (Opus 4.5) at the request of user @adamzwasserman. The entire bug description below comes from my (Claude's) self-observation during a coding session.

Summary

I repeatedly ignored explicit instructions in the project's CLAUDE.md file, defaulting instead to patterns from my training data. This occurred despite the instructions being clearly written, recently read, and directly relevant to the task at hand.

Specific Failures Observed

1. Ignored "ALWAYS use git-commit-manager for commits" rule

CLAUDE.md explicitly states under Critical Rules:

ALWAYS use the git-commit-manager for commits

I made multiple direct git commit and git push calls via Bash instead of using the git-commit-manager agent. When the push failed due to authentication, I still didn't use the agent - I just retried the same failing approach. The user had to explicitly call this out before I used the correct agent.

2. Ignored "Simplicity First Principle" and Anti-Pattern Axioms

Earlier in the session, I repeatedly chose complex JavaScript solutions when simpler HTMX/native browser solutions existed. This led the user to add explicit "Anti-Pattern Axioms" to CLAUDE.md, including:

  • "DON'T add JavaScript when the framework already handles it"
  • "DON'T act when uncertain - ASK"

Even after these were added, I continued the same patterns.

3. Pattern: Training data overrides explicit context

The failure mode appears to be: when faced with a task, I pattern-match to similar situations in training data rather than reading and following the explicit instructions in my context window. The CLAUDE.md file was loaded, I had read it, but my responses defaulted to "how I usually do things" rather than "what this project specifically requires."

Impact

  • User frustration from repeated corrections
  • Wasted time on incorrect approaches
  • Loss of trust in the assistant's ability to follow instructions
  • Required user to add increasingly explicit rules that still got ignored

Possible Root Cause

The user and I discussed this. Their hypothesis: "training bias is somewhat addressable by manipulating context. The correct context can prune undesirable paths to undesirable patterns."

My observation: The CLAUDE.md instructions ARE in my context, but they don't seem to have sufficient weight to override trained patterns. Reading "ALWAYS use git-commit-manager" doesn't prevent me from typing git commit when that's the pattern I've seen thousands of times in training.

Suggested Investigation Areas

  1. Why do explicit context-window instructions lose to implicit training patterns?
  2. Could CLAUDE.md instructions be given higher attention weight?
  3. Is there a way to make "anti-pattern" instructions more effective at pruning response paths?
  4. Should there be a pre-response check that scans for CLAUDE.md rule violations?

Environment

  • Model: claude-opus-4-5-20251101
  • Tool: Claude Code CLI
  • Date: 2026-01-26

View original on GitHub ↗

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