[BUG] re-opening #63590 on behalf of OP: Context/compact button triggers compact on single click with no confirmation or undo

Open 💬 0 comments Opened Jul 7, 2026 by williamrobotma

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

From @rmiller-uab's original, erroneously closed and un-reopenable report at #63509: https://github.com/anthropics/claude-code/issues/63509

## 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.

... (in What Should Happen? box)

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

I personally have also been facing this same issue - it destroyed the context of one of my long-running sessions, forcing a lengthy recovery process that burned even more tokens along with the tokens from compact, not to mention the re-caching hit.

Further, @github-actions erroneously flagged it as a duplicate of #63232, which is about auto-compaction - this is decidedly not.

What Should Happen?

From the excised section of @rmiller-uab's original's post.

## 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.

Error Messages/Logs

/compact

Steps to Reproduce

  1. Start the session.
  2. Once the session passes 50% context, click the button. (the half-filled red ring here:

<img width="327" height="266" alt="Image" src="https://github.com/user-attachments/assets/21767d57-9f95-48bc-875a-7329398349c4" />)

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.202

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗