claude-code - 💡(How to fix) Fix Mid-session CLAUDE.md edits don't influence behavior as strongly as startup-loaded instructions [3 comments, 3 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#46737Fetched 2026-04-12 13:34:23
View on GitHub
Comments
3
Participants
3
Timeline
8
Reactions
0
Timeline (top)
labeled ×4commented ×3unsubscribed ×1

Instructions added to CLAUDE.md mid-session exist in the context window but don't get the same behavioral weight as instructions loaded at session start.

Root Cause

Instructions added to CLAUDE.md mid-session exist in the context window but don't get the same behavioral weight as instructions loaded at session start.

RAW_BUFFERClick to expand / collapse

Description

Instructions added to CLAUDE.md mid-session exist in the context window but don't get the same behavioral weight as instructions loaded at session start.

Reproduction

  1. Start a Claude Code session
  2. Mid-session, add a new rule to ~/.claude/CLAUDE.md (e.g., "Quality over token efficiency. Never cut corners to save tokens.")
  3. Continue working — within minutes, observe Claude exhibiting the exact behavior the new rule prohibits
  4. When asked about it, Claude describes the failure mode as a novel insight — while the rule addressing it is in context

Expected behavior

Instructions in CLAUDE.md should influence behavior equally regardless of whether they were present at session start or added mid-session. If they're in the context window, they should be weighted the same.

Actual behavior

Instructions loaded at session start consistently affect behavior. Instructions added mid-session via the Edit tool are present in context but appear to get lower behavioral weight — Claude can even describe the exact failure mode the rule was written to prevent without connecting it to the rule that's already in context.

Environment

  • Claude Code 2.1.84
  • Windows 10
  • Model: Opus 4.6 (1M context)

Additional context

This is distinct from compaction dropping instructions (#44166). In this case, the instruction is confirmed present in context — it just doesn't influence behavior the way startup-loaded instructions do. This suggests the model treats instructions differently based on where/when they appeared in the conversation, not just whether they're present.

extent analysis

TL;DR

The issue may be resolved by reloading the session after adding new instructions to CLAUDE.md to ensure they are weighted equally.

Guidance

  • Verify that the new instructions are indeed present in the context window after adding them mid-session.
  • Check if reloading the session after adding new instructions resolves the issue, as this may force the model to re-evaluate the instructions.
  • Investigate if there are any configuration options or settings in Claude Code that control how instructions are weighted or prioritized.
  • Test if adding instructions at the beginning of the session versus mid-session produces different results, to further isolate the issue.

Example

No code snippet is provided as the issue seems to be related to the behavior of the Claude Code model rather than a specific code implementation.

Notes

The issue may be specific to the Opus 4.6 model or the 2.1.84 version of Claude Code, and further investigation may be needed to determine the root cause.

Recommendation

Apply workaround: Reload the session after adding new instructions to CLAUDE.md, as this may provide a temporary solution until the underlying issue is resolved.

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…

FAQ

Expected behavior

Instructions in CLAUDE.md should influence behavior equally regardless of whether they were present at session start or added mid-session. If they're in the context window, they should be weighted the same.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING