[BUG] "Nested" CLAUDE.md files _not_ added to system context when using `--continue`
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.61
- Operating System: macOS 15.5
- Terminal: Ghostty
Bug Description
Claude Code will _not_ re-load any nested CLAUDE.md files that it has within its system context when you resume a previous session.
Steps to Reproduce
- Create a project with a nested CLAUDE.md file (e.g.
./src/components/CLAUDE.md). Add some specific directive that makes it easy to detect whether it is loaded within the context window. (e.g. "My super secret password is 'GreenToad524!$'") - Within a Claude Code session, get Claude to read another file in that directory. (e.g.
Read(src/components/MyComponent.tsx) - Run the
/memorycommand - Observe that it lists the nested
CLAUDE.mdmemory file:
Memory Files
L user: ~/.claude/CLAUDE.md
L project: CLAUDE.md
L nested: ./src/components/CLAUDE.md
- Verify that Claude has access to its contents (e.g. ask it what your "super secret password" is)
- Exit claude
- Open claude again with
claude --continueorclaude --resume. - Run the
/memorycommand - Observe that it no longer shows the "nested" CLAUDE.md file
- Observe further that the Claude LLM has no awareness of the contents of this file within its system context (e.g. ask it again what your "super secret password" is and it will not know unless it inspects the output tokens from the last time you asked)
Expected Behavior
All of the CLAUDE.md files that were loaded as a part of the session should still be present when a session is resumed.
Actual Behavior
The "nested" CLAUDE.md files that were a part of the session are no longer present when resuming a session.
Additional Context
If you Read the CLAUDE.md file directly (e.g. this file gets loaded, not as a side-effect of Reading another file, but directly being Read(./path/to/CLAUDE.md)), this will behave differently. Claude will still "see" this memory within its context window, but it will see a version of the file as it was when it was initially read, and not incorporate any changes that may have been made to it since the last session was suspended.
Claude does not seem to disambiguate CLAUDE.md files that are Read versus CLAUDE.md files that were injected into the system context via the agent.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗