[BUG] Left arrow key clears entire conversation with no confirmation and no undo
Summary
In 2.1.160, pressing the left arrow key while in the agents/subagent navigation view cleared the entire active conversation with no confirmation prompt and no undo path. Thousands of tokens of in-progress work were permanently lost.
Repro
- Have an active, long-running conversation open (multi-thousand token context).
- While focus is in the agents view (not the prompt input box), press the left arrow key — either by navigating there accidentally or by mistyping.
- The conversation is cleared immediately. No confirmation dialog. No undo.
Expected: A destructive action like clearing an entire conversation requires confirmation before executing, or provides an undo/restore path (e.g. /resume).
Actual: Conversation cleared immediately and permanently. No way to recover the chat history.
Why this is severe
- The left arrow is a normal navigation key with no "destructive" semantic in any standard UX pattern.
- There is no confirmation step — the action is irreversible the moment the key is pressed.
- Conversation history is the user's working context. Losing it mid-session means losing all reasoning, decisions, and in-progress work that wasn't yet committed to files.
/resumedoes not restore the cleared session.
Related
This appears to be in the same family as #62736 (arrow keys hijacked by subagent navigation feature, not scoped to the subagent view). The regression there is broken cursor movement; the regression here is an accidental destructive action triggered by the same unconditional arrow key capture.
Request
At minimum: require confirmation before any action that clears conversation history.
Better: scope arrow-key navigation to the agents/subagent view only, so it cannot fire when the user is typing or navigating in other contexts.
Best: add an undo path for /clear so accidental clears are recoverable.
Environment
- claude 2.1.160 (Claude Code)
- Platform: macOS (Darwin 25.5.0, arm64)
- Shell: zsh
Showing cached comments. Read the full discussion on GitHub ↗
3 Comments
Have the same issue. Wiped 2 hours of work with no indiciation of why or what happened. It is extremely frustrating. It seems even when I exit calude code with CTRL+C (Windows) it gives me an error since it was actively using a tool:
SessionEnd hook ["C:/Users/[user]/AppData/Local/GitKrakenCLI/gk.exe" ai hook run --host claude-code] failed: Hook cancelledHere is a newer issue https://github.com/anthropics/claude-code/issues/75899#issuecomment-4957313986 that mentions a workaround by
CLAUDE_CODE_DISABLE_AGENT_VIEW=1("disableAgentView": true) to prevent entering the agent view accidentally.That issue needs some upvotes, otherwise with no new comments it will get auto-closed in 2 * 14 days https://github.com/anthropics/claude-code/issues/30407#issuecomment-4813778775.
This is highly frustrating as it breaks complex long running sessions in unpredictable ways and trying to recover with resume or navigating to the session in the agents view sometimes seems to just make it worse