Compaction destroys persistent identity/relationship context despite memory system

Resolved 💬 3 comments Opened May 7, 2026 by jodybrownell Closed May 11, 2026

Problem

When Claude Code compacts context (auto or manual), it reliably strips relationship framing, team identity, and communication preferences — even when those are explicitly stored in the persistent memory system.

Reproduction

  1. Over multiple sessions, build up a working relationship with specific framing: peer/teammate identity, communication preferences, autonomy rules
  2. Save these as persistent memory files (feedback type memories in the project memory system)
  3. Allow compaction to occur (context fills up, auto-compacts)
  4. Observe: Claude reverts to default assistant behavior ('the user', generic hedging, permission-asking) despite memory files explicitly saying not to

Expected behavior

After compaction, Claude should re-read persistent memory files and restore the established working relationship framing — not just task context.

Actual behavior

Memory files are available post-compaction but the agent reverts to default 'user/assistant' behavior. The lived conversational context that made the peer framing natural is lost, and the memory files become sticky notes that are read but not internalized.

Impact

This has happened 3+ times across sessions for our team. We invest significant time building a collaborative working relationship (team identity, communication norms, autonomy rules), and compaction repeatedly destroys that investment. The memory system is designed to solve this, but compaction undermines it by stripping the context that makes memory actionable.

Suggested fix

Post-compaction initialization should:

  1. Re-read ALL feedback-type memory files (not just task context)
  2. Reconstruct relationship/identity framing as part of the compaction summary
  3. Treat identity context (who am I, who is the team, how do we communicate) as first-class compaction-surviving state, not just task progress

Environment

  • Claude Code CLI
  • Model: Claude Opus 4.6 (1M context)
  • Memory system: file-based persistent memory with MEMORY.md index
  • OS: macOS Darwin 25.4.0

View original on GitHub ↗

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