[BUG] Claude Code does not consistently follow CLAUDE.md formatting instructions when creating new files
Resolved 💬 2 comments Opened Jul 8, 2025 by blalor Closed Jul 9, 2025
Environment
- Platform (select one):
- [X] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version:
1.0.40 (Claude Code) - Operating System: macOS 15.5
- Terminal: Wezterm
Bug Description
Claude Code has access to user's CLAUDE.md file with specific formatting rules (like YAML 4-space indentation) but doesn't consistently apply them when creating new files.
Steps to Reproduce
- Add specific formatting rules to CLAUDE.md
- Request creation of new file matching those rules
- Observe that default formatting is used instead of CLAUDE.md rules
Expected BehaviorBefore creating any new file, Claude Code should:
- Check if CLAUDE.md contains relevant formatting rules
- Apply those rules to the new file
- Explicitly confirm rule application in output
Actual Behavior
New file was created using 2 spaces for indentation, not 4.
Additional Context
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗