Skip to content

Commit 188c3d4

Browse files
committed
docs: Document Claude Code Provider CLAUDE.md injection behavior
- 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 parent 8513263 commit 188c3d4

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,18 @@ Make Roo Code work your way with:
122122

123123
---
124124

125+
## Known Issues
126+
127+
### Claude Code Provider - CLAUDE.md Injection
128+
129+
When using the Claude Code Provider, the Claude CLI tool (as of version 1.0.62) automatically injects content from `CLAUDE.md` files if they exist in your repository root. This is a behavior of the Claude CLI tool itself, not Roo Code.
130+
131+
**Important:** If you have a `CLAUDE.md` file in your repository and are using the Claude Code Provider, its contents will be automatically included in the context sent to Claude, even without explicitly reading the file.
132+
133+
For more details, see [docs/claude-code-provider-notes.md](docs/claude-code-provider-notes.md).
134+
135+
---
136+
125137
## Local Setup & Development
126138

127139
1. **Clone** the repo:

docs/claude-code-provider-notes.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Claude Code Provider - CLAUDE.md Injection Notice
2+
3+
## Overview
4+
5+
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.
6+
7+
## How It Works
8+
9+
1. Roo-Code integrates with the Claude CLI tool by executing it as a subprocess
10+
2. The system prompt is passed to the Claude CLI via:
11+
- `--system-prompt` flag on non-Windows systems
12+
- stdin on Windows systems (to avoid command length limitations)
13+
3. The Claude CLI tool independently checks for and injects `CLAUDE.md` content
14+
15+
## Important Notes
16+
17+
- This injection happens at the Claude CLI level, before Roo-Code receives any response
18+
- Roo-Code does not read or inject `CLAUDE.md` files - this is entirely handled by the Claude CLI
19+
- The behavior may change in future versions of the Claude CLI tool
20+
21+
## Implications
22+
23+
If you have a `CLAUDE.md` file in your repository root and are using the Claude Code Provider:
24+
25+
- The contents will be automatically included in the context sent to Claude
26+
- This happens transparently without explicit indication in the Roo-Code interface
27+
- The AI will be aware of the `CLAUDE.md` contents even without using file reading tools
28+
29+
## Recommendations
30+
31+
- Be aware that `CLAUDE.md` files are automatically injected when using Claude Code Provider
32+
- If you don't want this behavior, avoid naming files `CLAUDE.md` in your repository root
33+
- This behavior is specific to the Claude Code Provider and does not affect other API providers
34+
35+
## Reference
36+
37+
This behavior was reported in [Issue #6604](https://github.com/RooCodeInc/Roo-Code/issues/6604).

0 commit comments

Comments
 (0)