Enter key repeat can accept two stages of the model picker

Open 💬 1 comment Opened Jul 12, 2026 by lance2k

What version of Codex CLI is running?

codex-cli 0.144.1

What subscription do you have?

Pro 20x

Which model were you using?

gpt-5.6-sol

What platform is your computer?

Linux 6.17.0-35-generic x86_64 x86_64

What terminal emulator and version are you using?

Alacritty 0.13.2, without tmux, screen, or Zellij.

Codex doctor report

{
  "schemaVersion": 1,
  "overallStatus": "ok",
  "codexVersion": "0.144.1",
  "authMode": "chatgpt",
  "model": "gpt-5.6-sol",
  "platform": "linux-x86_64",
  "terminal": "Alacritty",
  "updateStatus": "current version is not older"
}

The full report returns overallStatus: ok; the fields above are the relevant environment summary.

What issue are you seeing?

Pressing Enter in the model-selection flow can activate two consecutive picker stages. The first event accepts the highlighted model and opens its reasoning-level picker. An Enter repeat event can then immediately accept the highlighted reasoning level, making one physical key press appear like a double-click and skipping the chance to review the second selection.

This is easiest to reproduce when Enter is held just long enough for keyboard auto-repeat.

What steps can reproduce the bug?

  1. Start Codex in Alacritty.
  2. Run /model.
  3. Open the full model list and highlight a model that has multiple reasoning levels.
  4. Press Enter and hold it briefly enough to generate a repeat event.
  5. Observe that the model picker accepts the model and the newly opened reasoning picker may also be accepted immediately.

What is the expected behavior?

One physical Enter press should accept only the currently visible picker. Repeat events originating from that press should not accept a newly opened child picker.

Additional information

The current event path appears to explain the behavior:

  • The TUI requests KeyboardEnhancementFlags::REPORT_EVENT_TYPES.
  • KeyBinding::is_press treats both KeyEventKind::Press and KeyEventKind::Repeat as matches.
  • ListSelectionView calls accept() when list.accept.is_pressed(key_event) matches.
  • Model selection can immediately open a reasoning-level child picker, allowing the next repeat event to reach that new view.
  • Release events are already ignored, so this does not appear to be caused by key-up handling.

A possible fix would be to require KeyEventKind::Press for one-shot list acceptance while retaining repeat behavior for navigation keys. A regression test could send Enter Press followed by Enter Repeat across the model-to-reasoning picker transition and assert that only the first stage is accepted.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗