Add TUI option to preserve Vim mode after submitting prompts

Open 💬 3 comments Opened May 8, 2026 by codyw912

Summary

Vim mode in the Codex CLI TUI currently returns to Normal mode after a prompt is submitted. For users who mostly continue typing follow-up prompts, it would be useful to preserve the current Vim mode after prompt submit, especially Insert mode.

Proposed behavior

Add a TUI config option, for example:

[tui]
vim_mode_after_submit = "preserve"

Suggested values:

  • normal default: keep current behavior
  • preserve: keep active Vim mode after successful prompt submit or queued prompt

I would keep slash-command dispatch unchanged unless maintainers prefer this option to cover all composer dispatch paths.

Why

Submitting from Insert mode and immediately continuing to type currently requires entering Insert mode again after every turn. Preserving mode would make Vim mode less disruptive while keeping existing behavior as the default.

Notes

I noticed the contributing guide says unsolicited PRs are not accepted, so I am filing this as an issue/proposal rather than opening a PR.

View original on GitHub ↗

3 Comments

yasonk · 2 months ago

Current behavior is annoying. In any TUI vim mode application you keep insert mode unless ESC is hit because you are always inserting and only sometimes need to navigate around. I would say current behavior is a bug.

ma11hew28 · 1 month ago

I agree that the current behavior is a bug. I think just always have new messages start in insert mode, and don't add any config options.

yasonk · 1 month ago

You would think using codex, this would be a 5 second fix. My guess is OpenAI, after looking at metrics of VIM mode, decided not to fix bugs relating to VIM mode because nobody is using it. But they cannot figure out that nobody is using VIM mode because it is not usable due a bug... I use vim mode in every application where it exists, but not Codex...