codex - 💡(How to fix) Fix Vim mode switches from Normal to Insert after cancelling slash command with Backspace

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…

Root Cause

This feels unexpected because cancelling the slash command picker should preserve the Vim mode that was active before opening it.

RAW_BUFFERClick to expand / collapse

What happened?

When Codex TUI Vim mode is in Normal, opening the slash command picker with / and then deleting the slash with Backspace changes the composer state to Vim: Insert.

This feels unexpected because cancelling the slash command picker should preserve the Vim mode that was active before opening it.

Steps to reproduce

  1. Start Codex CLI.
  2. Enable Vim mode with /vim.
  3. Ensure the composer shows Vim: Normal.
  4. Press / to open the slash command picker.
  5. Press Backspace to delete/cancel the slash input.

Actual behavior

The composer switches to Vim: Insert.

Expected behavior

The composer should return to the previous Vim state, i.e. Vim: Normal in this repro.

More generally:

  • If the slash command picker was opened from Vim: Normal, cancelling it should return to Vim: Normal.
  • If it was opened from Vim: Insert, cancelling it should return to Vim: Insert.

Environment

  • Codex CLI: codex-cli 0.130.0
  • OS: Linux x86_64, Ubuntu kernel 6.8.0-49-generic
  • Terminal: running inside tmux, TERM=screen

Notes

Using Esc after the transition returns to Vim: Normal, so this is mainly a Vim-mode state restoration issue after cancelling the slash command picker with Backspace.

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…

FAQ

Expected behavior

The composer should return to the previous Vim state, i.e. Vim: Normal in this repro.

More generally:

  • If the slash command picker was opened from Vim: Normal, cancelling it should return to Vim: Normal.
  • If it was opened from Vim: Insert, cancelling it should return to Vim: Insert.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

codex - 💡(How to fix) Fix Vim mode switches from Normal to Insert after cancelling slash command with Backspace