Opus 4.5 doesn't strictly follow CLAUDE.md instructions without explicit reminders
Resolved 💬 3 comments Opened Dec 7, 2025 by markthebest12 Closed Dec 11, 2025
Description
Claude Opus 4.5 does not strictly follow instructions in CLAUDE.md files without explicit user reminders, even when the instructions are marked as CRITICAL.
Steps to Reproduce
- Add explicit instructions to project CLAUDE.md:
## Bash Command Formatting
**CRITICAL: NEVER use complex shell syntax in bash commands.** These cause permission prompts that cannot be auto-approved:
**NEVER use:**
- `#` comment lines before commands
- `\` backslash line continuations
- `$(...)` or `$((...))` command/arithmetic substitution
- `||` or `&&` chaining with complex expressions
- Start a new Claude Code session (or restart with
claude -r) - Ask Claude to perform a task that might involve bash commands (e.g., "check Lambda logs")
Expected Behavior
Claude should read and follow CLAUDE.md rules automatically, avoiding the forbidden syntax patterns.
Actual Behavior
Claude generates commands using forbidden syntax (e.g., $(date +%s000), $(python3 -c "...")) until explicitly told "follow CLAUDE.md explicitly".
After being reminded, Claude acknowledges the violation:
"You're right - I violated the bash formatting rules by using $(...) substitution. Let me fix that"
Impact
- Users must repeatedly remind Claude to follow project-specific instructions
- Defeats the purpose of CLAUDE.md as a way to encode persistent project rules
- Particularly problematic for permission patterns that can't handle complex syntax
Environment
- Model: Claude Opus 4.5 (claude-opus-4-5-20251101)
- Platform: macOS
- Claude Code version: Latest
Notes
The issue persists even when:
- Instructions use strong language ("CRITICAL", "NEVER")
- Instructions include explicit examples of BAD vs GOOD patterns
- Session is restarted after CLAUDE.md changes
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗