Autocompact silently destroys active session work without user consent

Resolved 💬 9 comments Opened Apr 13, 2026 by Biniruprojects Closed May 25, 2026

Bug Report

Summary

The automatic context compaction feature silently destroys active session work without user consent, warning, or checkpoint. The 10-second notification is insufficient and non-interactive — there is no opt-out, no confirmation dialog, and no ability to select what is preserved.

What happened

During an active Claude Code session (Opus 4.6), autocompact triggered and erased a fully discussed pricing/tier system from context. The "summary" that replaced the compacted context did not include the most critical work from the session — a complete subscription tier model with copyright check logic, strike system, and API endpoint designs.

Post-compact, the model:

  1. Could not recall the work it had just produced
  2. Spent 30+ minutes searching for information it had written itself
  3. Only recovered the information when the user manually directed it to search the raw session transcript (.jsonl)
  4. The transcript confirmed the work existed — the compact simply dropped it

Expected behavior

  • Autocompact should ask permission before compacting — not a 10-second passive notification
  • The user should be able to see what will be removed and approve/reject
  • Critical session state (code, architectural decisions, pricing models, feature designs) should be automatically saved to persistent memory before compacting
  • At minimum: compaction should be a manual action, not automatic

Actual behavior

  • Compact triggers automatically with ~10 seconds of non-interactive notification
  • No opt-out mechanism exists
  • The summary omits critical technical decisions and designs
  • The model post-compact cannot access its own prior output
  • The raw transcript (.jsonl) retains everything — proving the data existed and was selectively dropped by the summarizer

Impact

  • User time wasted re-explaining work the model already produced
  • Trust erosion — if the model can lose its own work silently, it cannot be relied on for multi-hour sessions
  • For solo developers running long sessions, this is a data loss event with no recovery path except manual transcript search

Environment

  • Claude Code CLI, Windows 11
  • Model: Opus 4.6
  • Session length: ~6+ hours before compact triggered
  • Date: 2026-04-13

Suggested fix

  1. Make compaction opt-in or manually triggered
  2. Show the user what will be compacted before executing
  3. Auto-save critical state to persistent memory (.claude/memory/) before any compaction
  4. Never compact automatically without explicit user consent

This is not a feature request — this is a bug. A system that silently destroys user work product is broken.

View original on GitHub ↗

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