Skip to content

Codex CLI approval prompts can steal input while user is typing #27374

Description

@ivnnv

What version of Codex are you using?

Current Codex CLI as of June 10, 2026.

What platform is your computer?

macOS, terminal-agnostic. I see this inside the VS Code integrated terminal and in iTerm.

What issue are you seeing?

Codex CLI/TUI can render an approval/question prompt while I am still typing a message in the composer. When that happens, the next keypress or click can be consumed by the prompt instead of continuing my message, so I accidentally answer the approval/question while I was still writing.

This is a bad UX trap because the prompt appears in the same terminal surface where I am actively composing. The UI changes underneath me and the input target effectively changes from "continue typing my message" to "answer this permission prompt".

Claude Code doesnt suffer from this in the same way. I can keep typing while it is working without a mid-compose permission prompt stealing my next action.

Steps to reproduce

  1. Start an interactive Codex CLI session in a terminal.
  2. Have Codex run a task that may request approval or ask a structured question.
  3. While Codex is still working, start typing a follow-up message in the composer.
  4. Before submitting that message, let Codex render an approval/question prompt.
  5. Continue typing or click, expecting to keep editing the message.
  6. The action can instead select/confirm the prompt.

Expected behavior

Codex should not let approval/question prompts steal in-progress user input.

Safer behavior would be one of:

  • If the user is actively composing text, keep focus in the composer and queue the approval prompt until the user submits or cancels the draft.
  • Render the approval prompt in a way that cannot be answered by ordinary typing meant for the composer.
  • Require an explicit focus change before prompt options accept keyboard/click input.
  • Preserve the draft exactly as typed if a prompt appears.

Actual behavior

The approval/question prompt can appear while I am composing, and my next action can answer the prompt instead of continuing the message.

Why this matters

This makes Codex feel unsafe during normal interactive use. I should be able to type instructions while the agent is working without worrying that a sudden approval UI will hijack my input and make me approve/reject something by accident.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions