Default to compact instead of clear when context is nearly full
Resolved 💬 2 comments Opened Feb 21, 2026 by asiop Closed Mar 22, 2026
Problem
When about to implement a planl, Claude Code prompts the user to clear context. This is destructive and irreversible — the entire conversation history is lost, and everything has to be re-learned from scratch.
In practice, sessions are almost always ongoing related work. Clearing context mid-session means losing accumulated knowledge about what was tried, what failed, and what decisions were made.
Suggestion
- Default to compact instead of clear when the context limit is approaching
- Or offer both options with compact as the recommended/first choice (e.g., "Yes, compact context" as primary, "Clear context entirely" as secondary)
- Ideally, allow users to configure this behavior in settings
Rationale
/compactpreserves essential context in summarized form, which is the right behavior in nearly all cases/clearis rarely what users actually want — if they need a truly fresh start, they can start a new session- Accidentally hitting "yes" on a clear prompt is an irreversible mistake with no recovery path
- The current UX is a footgun: a destructive action is the default suggestion during normal workflow
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗