claude-code - 💡(How to fix) Fix Context/compact button triggers compact on single click with no confirmation or undo

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Problem

The context indicator button (showing remaining context %) triggers /compact on a single click. There is:

  • No confirmation dialog
  • No undo
  • No "are you sure?" given the destructive nature

This is a footgun. The button looks like an informational indicator (it displays a percentage), but clicking it irreversibly compacts the conversation. Once compacted, the original turn-by-turn context is gone — you only have the summary the model produced.

Why it matters

Compaction is destructive in a way most UI buttons aren't:

  • You can't recover the original messages
  • The summary may miss nuance the user was relying on
  • Mid-task compaction can drop in-flight reasoning that the next response depended on
  • It's particularly painful in long sessions where the user has invested context-building work

A single misclick on what looks like a status indicator wipes that out.

Suggested fixes (any one would help)

  1. Confirmation modal — "Compact this conversation? This cannot be undone." with Cancel/Confirm
  2. Two-step interaction — first click expands a panel showing context stats; explicit "Compact now" button inside
  3. Undo window — keep the pre-compact state for N seconds and surface an Undo toast
  4. Separate the affordances — make the % indicator non-interactive and put compact in a menu

Of these, the confirmation modal is the lowest-friction fix and would prevent the misclick problem entirely.

Environment

  • Claude Code VSCode extension
  • Long-running session (multi-hour, multi-task)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Context/compact button triggers compact on single click with no confirmation or undo