Vim mode switches from Normal to Insert after cancelling slash command with Backspace
Resolved 💬 1 comment Opened May 12, 2026 by BankBro Closed May 13, 2026
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
- Start Codex CLI.
- Enable Vim mode with
/vim. - Ensure the composer shows
Vim: Normal. - Press
/to open the slash command picker. - Press
Backspaceto 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 toVim: Normal. - If it was opened from
Vim: Insert, cancelling it should return toVim: 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗