Skip to content

Commit 458aac5

Browse files
committed
docs: add warning about CLAUDE.md file injection in Claude Code provider
- Document that Claude CLI automatically injects CLAUDE.md contents - Explain token usage implications - Add debugging tips for users experiencing unexpected behavior - Reference issue #6604 from Roo-Code repository
1 parent 009fe0b commit 458aac5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/providers/claude-code.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,21 @@ The `claude` command-line tool, like other Anthropic SDKs, can use the `ANTHROPI
3838
If this environment variable is set on your system, the `claude` tool may use it for authentication instead of the interactive `/login` method. When Roo Code executes the tool, it will accurately reflect that an API key is being used, as this is the underlying behavior of the `claude` CLI itself.
3939
:::
4040

41+
:::warning CLAUDE.md File Injection
42+
The Claude CLI tool (version 1.0.62 and potentially other versions) automatically injects the contents of any `CLAUDE.md` file found in your repository root into the conversation context. This behavior occurs at the CLI level, not within Roo Code.
43+
44+
**Important considerations:**
45+
- If you have a `CLAUDE.md` file in your repository root, its contents will be included in every prompt sent to Claude
46+
- This injection happens transparently without explicit file read operations
47+
- The injected content counts toward your token usage (can add significant tokens to each request)
48+
- This is a behavior of the Claude CLI tool itself, not Roo Code
49+
50+
**To verify or debug this behavior:**
51+
- Check if a `CLAUDE.md` file exists in your repository root
52+
- Be aware that instructions in `CLAUDE.md` will be applied to all Claude interactions through the CLI
53+
- Consider the token cost implications when using `CLAUDE.md` files with the Claude Code provider
54+
:::
55+
4156
**Website:** [https://docs.anthropic.com/en/docs/claude-code/setup](https://docs.anthropic.com/en/docs/claude-code/setup)
4257

4358
---

0 commit comments

Comments
 (0)