Avoid interrupting a user actively typing
Open 💬 4 comments Opened Jun 16, 2026 by redbmk
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
codex-cli 0.139.0
What feature would you like to see?
If I'm typing while the model is working, sometimes it will ask me a question. When this happens, a lot of what I'm typing gets swallowed, but worse it's really common to type y, p, or n while typing, so it will automatically end up selecting an answer (e.g. "always do this") before even having a chance to see the question.
Some options:
- detect that a user is typing before asking a question - add something like "waiting for user to stop typing before asking a question" to indicate that it's about to interrupt you
- change the shortcuts from letters commonly used while typing to something less likely to be triggered accidentally (e.g. claude uses 1,2,3; could use ctrl- prefix or special chars)
- don't replace the prompt when text is written at all - ask the question above and have a way to select without overwriting the prompt (e.g. ctrl- prefixed options) so you don't have to send the prompt you're working on first
- no-interrupt mode as an option (see #14693)
- have some safeguards where if a user answers quicker than seems reasonable (e.g. within 100ms? 200ms?) then it triggers a terminal bell on each keystroke until you stop typing for long enough, maybe with a visual indicator that says it's not accepting the answer to avoid causing you to accidentally approve or disapprove something
Additional information
_No response_
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
The TUI already defers presentation of a question if you are actively typing. It waits for a pause of a couple of seconds before displaying the menu. Are you seeing a different behavior? Or are you finding that this mechanism is insufficient?
So it does... Is that a relatively new feature? I feel like this has bit me quite a few times, even recently. Maybe I pause to think for a second and then keep typing right as it pops up?
If this has been the behavior for a long time then I would say I'm finding it insufficient. I could strike the first bullet point from the list, though I think indicating that it's waiting to tell you something would still be helpful - right now it just says "Working" so it's unclear that it's waiting to ask you for input as opposed to actively working on something.
If it's new, I'll have to see how often I keep running into this.
This change was added about a month ago, so kind of new.