claude-code - 💡(How to fix) Fix Claude Code ignores loaded CLAUDE.md content when context is under 1/3 capacity [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53040Fetched 2026-04-25 06:14:00
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Timeline (top)
labeled ×2commented ×1

Claude Code does not reliably reference CLAUDE.md content when answering questions, even when the context window is well under capacity (observed at 33% usage). Instead of consulting the documentation already loaded in context, it reasons from scratch and generates incorrect conclusions.

Root Cause

Claude Code does not reliably reference CLAUDE.md content when answering questions, even when the context window is well under capacity (observed at 33% usage). Instead of consulting the documentation already loaded in context, it reasons from scratch and generates incorrect conclusions.

Fix Action

Fix / Workaround

  1. Claimed "we don't have access to the MCP server" — it was configured in appsettings.json, documented in CLAUDE.md
  2. Claimed "MCP needs a different auth flow — this is a real piece of work" — the auth was already implemented in dv-auth.ts, documented in CLAUDE.md
  3. Wrote hardcoded workaround code instead of using existing infrastructure
  4. Required multiple rounds of user correction before consulting the documentation that was already in its context
RAW_BUFFERClick to expand / collapse

Bug: Claude Code ignores loaded CLAUDE.md content when context is under 1/3 capacity

Repo: https://github.com/anthropics/claude-code/issues

Description

Claude Code does not reliably reference CLAUDE.md content when answering questions, even when the context window is well under capacity (observed at 33% usage). Instead of consulting the documentation already loaded in context, it reasons from scratch and generates incorrect conclusions.

Observed Behavior

During a session, CLAUDE.md contained detailed documentation about MCP token flows, gateway URLs, auth chains, and file paths. At 33% context usage (no compaction), Claude Code:

  1. Claimed "we don't have access to the MCP server" — it was configured in appsettings.json, documented in CLAUDE.md
  2. Claimed "MCP needs a different auth flow — this is a real piece of work" — the auth was already implemented in dv-auth.ts, documented in CLAUDE.md
  3. Wrote hardcoded workaround code instead of using existing infrastructure
  4. Required multiple rounds of user correction before consulting the documentation that was already in its context

This wasted ~10 conversation turns before the user pointed Claude to information it already had loaded.

Expected Behavior

Claude Code should reference CLAUDE.md content that is loaded in its context window before generating answers about repository infrastructure. When the context is under 1/3 capacity, there is no compaction or decay excuse — the content is there.

Impact

  • Incorrect claims presented with confidence
  • Wasted user time correcting wrong assumptions
  • Unnecessary code written that had to be replaced
  • User loses trust in whether Claude Code is working from project context or making things up

Environment

  • Model: Opus 4.6 (1M context)
  • Context usage at time of failure: ~33%
  • CLAUDE.md size: ~400 lines with detailed infrastructure docs

Notes

This appears to be a behavioral pattern — defaulting to generating reasoning rather than looking up answers from loaded documentation. It is not a context window or compaction issue.

extent analysis

TL;DR

The issue can be mitigated by ensuring Claude Code prioritizes referencing loaded CLAUDE.md content over generating answers from scratch when the context window is under capacity.

Guidance

  • Review the documentation loading process to ensure CLAUDE.md is properly loaded and indexed within Claude Code's context window.
  • Verify that the context usage is accurately reported and that the 33% usage is not causing any unexpected behavior.
  • Investigate the prioritization logic within Claude Code to determine why it defaults to generating reasoning over looking up answers from loaded documentation.
  • Consider adding explicit references or anchors to CLAUDE.md content to help Claude Code recognize and utilize the existing documentation.

Example

No code snippet is provided as the issue appears to be related to the behavioral pattern of Claude Code rather than a specific code implementation.

Notes

The issue may be related to the model's training data or the way it is configured to interact with the context window. Further investigation into the model's architecture and training process may be necessary to fully resolve the issue.

Recommendation

Apply a workaround by adding explicit references to CLAUDE.md content to help Claude Code recognize and utilize the existing documentation, as the root cause of the issue is unclear and may require significant changes to the model's architecture or training process.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Claude Code ignores loaded CLAUDE.md content when context is under 1/3 capacity [1 comments, 2 participants]