TUI Vim mode: allow starting in Insert mode by default
Open 💬 7 comments Opened May 9, 2026 by Contextualist
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
CLI
What feature would you like to see?
Please add an option for Vim mode to start in Insert mode by default, while still allowing users to press Esc to enter Normal mode.
Currently, enabling Vim mode permanently starts the composer in Normal mode. I would prefer a config option such as:
[tui]
vim_mode_default = true
vim_mode_initial_state = "insert"
or similar.
Motivation
Most TUI interactions begin with writing a new prompt, and only optionally editing that prompt afterward. Starting in Insert mode matches that common flow better while preserving Vim-style editing when needed.
This would also match the behavior of “vi mode” in shells like Bash: the prompt starts ready for text input, and users can press Esc to switch into Normal mode for editing.
Related issue: #21804
Additional information
_No response_
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
actually, claude does the same and IMHO this totally makes sense. someone has to come up with a usecase to start in normal mode to convince me of the opposite. anyways, thanks for opening this issue!
While doing so, if we can avoid changing the cursor shape in Normal/Insert mode (or make it configurable) it would be great.
You probably don't want to just update to initial state but the after submit state
Why would anyone not want to start in insert mode for new messages?
I put together a focused, one-commit reference implementation for this and the common follow-up-prompt case discussed in #21804.
Since external PRs are invitation-only, I’m sharing the branch in a form that can be reviewed, cherry-picked, or converted into an internal PR:
The configuration is scoped under the mode:
tui.vim_mode_defaultcontinues to enable Vim operations. The new setting only controls how enabled Vim mode behaves:falsepreserves the existing Normal-mode default.truestarts fresh composer messages in Insert mode.For #21804 specifically, this makes each follow-up prompt ready for typing when the configured default is Insert. It deliberately returns to the configured default rather than preserving an arbitrary previous mode.
Coverage includes config parsing/round-tripping, generated schema, startup behavior, post-submit behavior, and the visible footer mode. The patch passed all 255
codex-configtests and all 3,521codex-tuitests, plus scoped lint and formatting.If the preferred product decision is to make Insert unconditional rather than configurable, or to use a string-valued mode instead of a boolean, this patch should be straightforward to adapt.
Would a maintainer like to adopt/cherry-pick this internally, or explicitly invite the focused PR?
Coming from Claude Code cli its very frustrating not being able to just start prompting, it would seem natural that you would by default (or by configuration) be able to start in insert mode