[BUG] Global ~/.claude/CLAUDE.md not loaded after context compaction (Windows)

Resolved 💬 3 comments Opened Jan 1, 2026 by jvilburn Closed Jan 5, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

The user-level CLAUDE.md file at ~/.claude/CLAUDE.md is not being included in context after conversation compaction on Windows.
After compaction, only the project-level CLAUDE.md is visible in context. The global CLAUDE.md content is missing.
Environment:
Windows 10/11
Claude Code (VS Code extension)

What Should Happen?

According to documentation, all memory files should be "automatically loaded into Claude Code's context when launched" with a four-tier hierarchy including user memory at ~/.claude/CLAUDE.md.

Error Messages/Logs

Thinking v
Interesting. The documentation says that ~/.claude/CLAUDE.md should be automatically loaded. But it clearly wasn't in my case - I didn't see the global CLAUDE.md content in my context, only the project-level one. This could be:
A bug in Claude Code
A Windows path issue (the docs show Unix-style ~/.claude/CLAUDE.md but user is on Windows)
Something about how context compaction works that loses the global CLAUDE.md
The user's file is at c:\Users\<user>\.claude\CLAUDE.md which should be the Windows equivalent of ~/.claude/CLAUDE.md. I should let the user know that according to the documentation, it SHOULD be working automatically, but clearly it isn't. This might be a bug worth reporting.

Steps to Reproduce

Create ~/.claude/CLAUDE.md (on Windows: C:\Users\<user>\.claude\CLAUDE.md)
Start a Claude Code conversation that runs long enough to trigger context compaction
After compaction, Claude does not have access to the global CLAUDE.md content

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.75

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

This should be an easy fix. It is certainly a major pain point.
By the way, claude wrote most of the text for this bug report, except the following:
Whenever claude is in the middle of updating files, and I see something to discuss, I stop claude to discuss the issue. If claude hits a compact, I have to be ready to hit escape fast right after the compact. Otherwise claude launches in to implementation again. I asked claude for potential fixes for that behavior. The result was that claude added the following to the global claude.md, which didn't work.

Global Claude Code Instructions

Post-Compaction Behavior

After context compaction, carefully read the summary to determine the conversation mode:

  • If the summary indicates we were discussing architecture, design decisions, or exploring options - continue the discussion. Do NOT jump to implementing.
  • If the summary indicates we were implementing - continue implementing.
  • When in doubt, ask before writing code.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗