Double-Esc triggers conversation rewind too easily and lacks a safety mechanism
Problem
Esc Esc immediately enters conversation backtracking/history editing.
This is easy to trigger accidentally, especially for developers who use Vim or Vim-style keybindings, where repeatedly pressing Esc is a common reflex to ensure Normal mode.
In multi-window or multi-monitor workflows, it's easy to misjudge which window has focus and accidentally trigger a conversation rewind.
Why this matters
Rewinding conversation state is a high-impact action, but it currently happens immediately with no confirmation and no obvious undo path.
An accidental Esc Esc can interrupt an active workflow and force users to reconstruct conversation context built over multiple interactions.
Suggested improvement
Claude Code uses a safer pattern: Esc Esc opens a history picker, and no state changes occur until the user explicitly selects a checkpoint.
Codex could consider:
- Opening a history picker before rewinding (preferred)
- Requiring confirmation before a state-changing rewind
- Allowing the shortcut to be remapped or disabled
This would make accidental activation much less likely while preserving the functionality.
2 Comments
Confirmed that the underlying UX problem is still present in
codex-cli 0.145.0on Linux (x86_64).The current flow is now safer than the original report in one respect:
Esc Escopens a transcript picker, and no branch is persisted until an older prompt is edited and submitted. However, the key-state behavior remains surprisingly easy to trigger by accident:Esc: arms “edit previous message”.Esc: opens the transcript overlay.Escis immediately reinterpreted as “select the previous editable user message” (the same action asLeft).Rightselects the next editable user message, whileUp/Downscroll the transcript rather than changing the selected message.Enterchooses the highlighted prompt for editing; submitting it creates a new conversation branch.This is especially error-prone when the TUI is slow to redraw. A user may press
Escthree or four times because the UI has not visibly reacted yet. Those queued keypresses cross the mode transition and silently move the selection farther back than intended. The footer does document the controls, but users should not need to infer that repeated presses of the conventional “cancel/back” key become a destructive-range navigation command after a delayed state transition.This had a material impact in my case: one ordinary CLI conversation accumulated a linear chain of five descendant forks. Local rollout metadata confirmed that these were real TUI-created branches (
forked_from_id), not duplicate list rendering or mobile/remote activity.There is also an intermittent, not-yet-deterministic failure mode: after pressing
Esctoo many times and thenEnter, Codex has occasionally exited outright. I have not reduced that part to a reliable minimal reproduction, so I am mentioning it as an observation rather than claiming a confirmed root cause.Possible improvements:
Escevents across the transition into the transcript overlay.Escclose/cancel the overlay instead of selecting an older prompt.Up/Downfor prompt selection andPgUp/PgDnfor transcript scrolling, or make this configurable.Left/Rightas optional previous/next shortcuts, but do not make them the only selection controls.The issue is not that the current controls are completely undocumented; it is that the same key changes from “open/cancel” to “move farther back” across a potentially slow redraw boundary, which makes accidental rewinds and branch proliferation unusually easy.
This matches my workflow as well. I often use
Escrepeatedly as a cancel/normal-mode key, and in a slow or busy TUI those queued keypresses can cross the transition into the transcript picker. The result is an unintended rewind/fork rather than a no-op or a visible confirmation.Requested UX:
Esc Escas opening the transcript picker only.Escevents.Escconsistently cancel/close; use explicit navigation keys for checkpoint selection.This would provide the Claude Code-style convenience without making accidental context rewinds easy to trigger.