Autocompact silently destroys active session work without user consent
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:
- Could not recall the work it had just produced
- Spent 30+ minutes searching for information it had written itself
- Only recovered the information when the user manually directed it to search the raw session transcript (
.jsonl) - 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
- Make compaction opt-in or manually triggered
- Show the user what will be compacted before executing
- Auto-save critical state to persistent memory (
.claude/memory/) before any compaction - 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.
This issue has 9 comments on GitHub. Read the full discussion on GitHub ↗