mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
- Add detailed documentation explaining CLAUDE.md auto-injection - Update README with Known Issues section - Clarify this is Claude CLI behavior, not Roo-Code - Provide guidance for users about this feature Fixes #6604
1.7 KiB
1.7 KiB
Claude Code Provider - CLAUDE.md Injection Notice
Overview
When using the Claude Code Provider in Roo-Code, users may notice that the Claude CLI tool automatically injects content from CLAUDE.md files if they exist in the repository root. This is a behavior of the Claude CLI tool itself (as of version 1.0.62), not a feature implemented by Roo-Code.
How It Works
- Roo-Code integrates with the Claude CLI tool by executing it as a subprocess
- The system prompt is passed to the Claude CLI via:
--system-promptflag on non-Windows systems- stdin on Windows systems (to avoid command length limitations)
- The Claude CLI tool independently checks for and injects
CLAUDE.mdcontent
Important Notes
- This injection happens at the Claude CLI level, before Roo-Code receives any response
- Roo-Code does not read or inject
CLAUDE.mdfiles - this is entirely handled by the Claude CLI - The behavior may change in future versions of the Claude CLI tool
Implications
If you have a CLAUDE.md file in your repository root and are using the Claude Code Provider:
- The contents will be automatically included in the context sent to Claude
- This happens transparently without explicit indication in the Roo-Code interface
- The AI will be aware of the
CLAUDE.mdcontents even without using file reading tools
Recommendations
- Be aware that
CLAUDE.mdfiles are automatically injected when using Claude Code Provider - If you don't want this behavior, avoid naming files
CLAUDE.mdin your repository root - This behavior is specific to the Claude Code Provider and does not affect other API providers
Reference
This behavior was reported in Issue #6604.