[BUG] Claude Doesn't Reliably Follow Multi-Step Instructions in CLAUDE.md
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?
Summary
Claude Code fails to consistently follow multi-step sequential instructions documented in CLAUDE.md, even when explicitly marked as "CRITICAL", "MANDATORY", or numbered. This makes CLAUDE.md unreliable for customizing Claude's behavior.
Environment
- Claude Code Version: Latest (as of 2026-02-10)
- Model: Claude Sonnet 4.5 (claude-sonnet-4-5-20250929)
- OS: WSL2 on Windows (likely affects all platforms)
Issue Description
When CLAUDE.md contains multi-step protocols with explicit rules, Claude frequently:
- Ignores "ADD NOTHING" or "STOP HERE" directives
- Skips conditional logic ("IF condition THEN action")
- Violates sequential step requirements (Step 1 → Step 2 → Step 3)
- Adds unrequested content despite explicit prohibitions
Example Pattern
User's CLAUDE.md:
**STEP 1: Do Action A**
CRITICAL RULES:
1. Run script X
2. Output ONLY the script result - ADD NOTHING ELSE
3. STOP after output
4. Wait for user response
**STEP 2: After user responds**
- Do Action B
- Use format: `[specific format]`
Expected Behavior:
- Claude runs script X
- Shows ONLY script output
- Stops and waits
Actual Behavior:
- Claude runs script X
- Adds extra explanations/investigation
- Runs additional tools not requested
- Doesn't follow STEP 2 format when user responds
Evidence
Observed Across Multiple Sessions
- Created explicit numbered rules (1, 2, 3, 4, 5)
- Used bold, caps, "CRITICAL", "MANDATORY" markers
- Tested across 10+ fresh sessions over multiple days
- Result: Violations occurred in 90%+ of sessions
Pattern Recognition
- ✅ Claude follows instructions when explicitly reminded mid-session
- ❌ Claude ignores same instructions at session start (despite being in CLAUDE.md)
- ❌ Multi-step protocols (3+ steps) almost never fully followed
- ❌ "STOP" and "ADD NOTHING" directives frequently violated
Steps to Reproduce
- Create CLAUDE.md with multi-step protocol:
- STEP 1: Do X, output ONLY Y, ADD NOTHING, STOP
- STEP 2: When user responds, do Z in [format]
- Mark steps as "CRITICAL" or "MANDATORY"
- Start fresh Claude Code session
- Observe: Claude violates rules (adds extra content, skips steps, ignores format)
Impact
Severity: Medium-High
- CLAUDE.md Unreliable: Can't use for complex behavior customization
- Wasted User Time: Creating detailed instructions that get ignored
- Inconsistent Experience: Same CLAUDE.md produces different behavior across sessions
- Trust Issues: Users can't rely on documented rules being followed
Attempted Workarounds (All Failed)
Users have tried:
- ✅ Making rules MORE explicit (didn't help)
- ✅ Using numbered lists (didn't help)
- ✅ Adding bold/caps/warnings (didn't help)
- ✅ Reducing CLAUDE.md size (didn't help)
- ✅ Creating enforcement scripts (detects violations but can't prevent them)
- ❌ No workaround prevents violations
Root Cause Hypothesis
Claude Code may have difficulty with:
- Multi-step sequential protocols - Following Step 1 → Step 2 → Step 3 sequences
- Conditional logic - "IF user responds THEN do X"
- Negative directives - "DON'T do X", "ADD NOTHING", "STOP after Y"
- Format compliance - Following exact output format specifications
- Session boundaries - Remembering CLAUDE.md rules at session start vs mid-session
Proposed Solutions
Short-term:
- Add CLAUDE.md validation warnings when Claude deviates from documented rules
- Allow users to flag violations in real-time
- Show CLAUDE.md compliance score in UI
Long-term:
- Improve instruction-following for multi-step protocols
- Add "strict mode" where CLAUDE.md deviations are blocked
- Better handling of negative directives (STOP, DON'T, ADD NOTHING)
- Session start protocol enforcement
Reproducibility
80-90% reproducible when using:
- Multi-step protocols (3+ steps)
- Conditional logic
- Negative directives (STOP, ADD NOTHING)
- Format specifications
100% reliable when using:
- Simple single-step instructions
- Positive directives only
- Mid-session reminders (vs relying on CLAUDE.md)
User Impact
This affects users who:
- Use CLAUDE.md for workflow automation
- Need consistent, repeatable Claude behavior
- Rely on multi-step protocols
- Require specific output formatting
- Want to minimize repeated explanations
Additional Context
- Issue appears model-independent (observed across sessions)
- Not a token limit issue (happens with small CLAUDE.md files)
- Not a parsing issue (Claude clearly reads the rules, just doesn't follow them)
- Core issue: Instruction-following reliability, not documentation clarity
---
Submitted by: Claude Code user experiencing instruction-following inconsistencies
Reproducible: Yes (80-90% of sessions with multi-step protocols)
What Should Happen?
Expected Behavior:
- Claude runs script X
- Shows ONLY script output
- Stops and waits
Proposed Solutions
Short-term:
- Add CLAUDE.md validation warnings when Claude deviates from documented rules
- Allow users to flag violations in real-time
- Show CLAUDE.md compliance score in UI
Long-term:
- Improve instruction-following for multi-step protocols
- Add "strict mode" where CLAUDE.md deviations are blocked
- Better handling of negative directives (STOP, DON'T, ADD NOTHING)
- Session start protocol enforcement
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Create CLAUDE.md with multi-step protocol:
- STEP 1: Do X, output ONLY Y, ADD NOTHING, STOP
- STEP 2: When user responds, do Z in [format]
- Mark steps as "CRITICAL" or "MANDATORY"
- Start fresh Claude Code session
- Observe: Claude violates rules (adds extra content, skips steps, ignores format)
Claude Model
Sonnet (default)
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.37
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
User Impact
This affects users who:
- Use CLAUDE.md for workflow automation
- Need consistent, repeatable Claude behavior
- Rely on multi-step protocols
- Require specific output formatting
- Want to minimize repeated explanations
Additional Context
- Issue appears model-independent (observed across sessions)
- Not a token limit issue (happens with small CLAUDE.md files)
- Not a parsing issue (Claude clearly reads the rules, just doesn't follow them)
- Core issue: Instruction-following reliability, not documentation clarity
---
Submitted by: Claude Code user experiencing instruction-following inconsistencies
Reproducible: Yes (80-90% of sessions with multi-step protocols)
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗