[BUG] Claude Doesn't Reliably Follow Multi-Step Instructions in CLAUDE.md

Resolved 💬 4 comments Opened Feb 10, 2026 by tlelekas-cloud Closed Mar 11, 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?

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:

  1. Ignores "ADD NOTHING" or "STOP HERE" directives
  2. Skips conditional logic ("IF condition THEN action")
  3. Violates sequential step requirements (Step 1 → Step 2 → Step 3)
  4. 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

  1. 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]
  1. Mark steps as "CRITICAL" or "MANDATORY"
  2. Start fresh Claude Code session
  3. Observe: Claude violates rules (adds extra content, skips steps, ignores format)

Impact

Severity: Medium-High

  1. CLAUDE.md Unreliable: Can't use for complex behavior customization
  2. Wasted User Time: Creating detailed instructions that get ignored
  3. Inconsistent Experience: Same CLAUDE.md produces different behavior across sessions
  4. Trust Issues: Users can't rely on documented rules being followed

Attempted Workarounds (All Failed)

Users have tried:

  1. ✅ Making rules MORE explicit (didn't help)
  2. ✅ Using numbered lists (didn't help)
  3. ✅ Adding bold/caps/warnings (didn't help)
  4. ✅ Reducing CLAUDE.md size (didn't help)
  5. ✅ Creating enforcement scripts (detects violations but can't prevent them)
  6. No workaround prevents violations

Root Cause Hypothesis

Claude Code may have difficulty with:

  1. Multi-step sequential protocols - Following Step 1 → Step 2 → Step 3 sequences
  2. Conditional logic - "IF user responds THEN do X"
  3. Negative directives - "DON'T do X", "ADD NOTHING", "STOP after Y"
  4. Format compliance - Following exact output format specifications
  5. Session boundaries - Remembering CLAUDE.md rules at session start vs mid-session

Proposed Solutions

Short-term:

  1. Add CLAUDE.md validation warnings when Claude deviates from documented rules
  2. Allow users to flag violations in real-time
  3. Show CLAUDE.md compliance score in UI

Long-term:

  1. Improve instruction-following for multi-step protocols
  2. Add "strict mode" where CLAUDE.md deviations are blocked
  3. Better handling of negative directives (STOP, DON'T, ADD NOTHING)
  4. 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:

  1. Add CLAUDE.md validation warnings when Claude deviates from documented rules
  2. Allow users to flag violations in real-time
  3. Show CLAUDE.md compliance score in UI

Long-term:

  1. Improve instruction-following for multi-step protocols
  2. Add "strict mode" where CLAUDE.md deviations are blocked
  3. Better handling of negative directives (STOP, DON'T, ADD NOTHING)
  4. Session start protocol enforcement

Error Messages/Logs

Steps to Reproduce

Steps to Reproduce

  1. 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]
  1. Mark steps as "CRITICAL" or "MANDATORY"
  2. Start fresh Claude Code session
  3. 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)

View original on GitHub ↗

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