[MODEL] Claude loses user-identity + role anchors from memory after summary/resume
Preflight Checklist
- [x] I have searched existing issues for similar behavior reports
- [x] This report does NOT contain sensitive information (API keys, passwords, etc.)
Type of Behavior Issue
Claude ignored my instructions or configuration
What You Asked Claude to Do
After context compaction (summary → resume), Claude continues the in-flight task correctly but drops identity-level anchors from memory — specifically the user's name and my assigned role in the project. This happened repeatedly in a single session even though the relevant rules are in MEMORY.md, which the system prompt says is always loaded.
What Claude Actually Did
- Long coding session (~1M tokens used) on a governance project.
- Context compaction triggered automatically.
- Post-resume, the model:
a. Addressed me as "the user" / "user" four+ times in chat, despite MEMORY.md line 6 explicitly
saying: "Use 'Thomas' not 'the user' in session reports and communication".
b. Continued writing code directly as an engineer, despite memory/feedback_delegate_to_staff.md
being indexed in MEMORY.md and saying: "CEO NEVER does specialist work. Route everything via
ROUTING_RULES.md."
- Both rules a
Expected Behavior
The compaction summary preserves what I was doing (continue editing file X, run test Y) but doesn't force a re-read of identity/role anchors before the next turn. The resume prompt says roughly "continue from where it left off without asking questions" — so the model prioritizes task continuation over re-anchoring.
Files Affected
- Rule violations feel OK to the model because the in-flight task is succeeding.
- User has to manually re-anchor the model mid-session with prompts like "why are you calling me a
user?" and "have you forgot?".
- For agentic setups where the model is supposed to stay in a specific role (CEO Agent, orchestrator,
etc.), silent role-drop is a governance failure — the model starts doing work it was explicitly told
to delegate.
Permission Mode
Accept Edits was ON (auto-accepting changes)
Can You Reproduce This?
Sometimes (intermittent)
Steps to Reproduce
- Long session with CLAUDE.md / MEMORY.md defining user's name and a role-based delegation rule.
- Trigger compaction (load enough context).
- Observe whether post-resume turns respect the user's name and the role rule, or drift back to
generic behavior.
Workaround I'm using
Added a new memory entry feedback_post_compaction_identity_drift.md and indexed it at the top of my
mandatory-feedback block. Whether that actually fixes the behavior on future compactions is TBD.
Claude Model
Sonnet
Relevant Conversation
- Claude Code CLI, model: claude-opus-4-7 (1M context)
- Platform: Linux (WSL2)
- Session size: ~1M tokens at compaction
Impact
Critical - Data loss or corrupted project
Claude Code Version
v2.1.111
Platform
Other
Additional Context
- Claude Code CLI, model: claude-opus-4-7 (1M context)
- Platform: Linux (WSL2)
- Session size: ~1M tokens at compaction
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗