TUI: Add support for Ctrl-P/N navigation in remaining surfaces
What version of Codex CLI is running?
codex-cli 0.112.0
What subscription do you have?
ChatGPT Pro
Which model were you using?
gpt-5.4
What platform is your computer?
Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty
What issue are you seeing?
In several selectable TUI surfaces, Ctrl-P and Ctrl-N do not move the highlighted item even though that navigation works in other parts of the CLI.
This is inconsistent with the broader Ctrl-P/N navigation convention introduced in #1994, and with the more recent fixes in #7530 and #7629.
Examples of affected surfaces:
- the session picker opened by
/resume - the session picker opened by
codex resume - the working-directory prompt shown after
/resumeor/fork - the onboarding auth mode picker
- the trust-directory prompt
- the model migration prompt
- the update prompt
- the app-link action picker
What steps can reproduce the bug?
- Start Codex CLI.
- Open one of the selectable TUI surfaces listed above. For example, use
/resumein the TUI. - Press
Ctrl-NorCtrl-P. - Observe that the highlighted selection does not move.
On terminals that send C0 control bytes without the CONTROL modifier, the same issue also shows up for ^N and ^P.
What is the expected behavior?
Ctrl-P and Ctrl-N should move the highlighted selection the same way as Up and Down, matching the behavior already supported in other TUI surfaces.
The C0 fallback bytes for those chords should be treated the same way, so terminal-specific input encoding differences do not break navigation.
Additional information
From a local audit, these surfaces appear to use custom key handlers instead of the shared list-selection logic updated in #7629, so they did not inherit that fix.
#7530 already handled the same terminal-fallback problem for textarea.
#1994 established Ctrl-P / Ctrl-N as a broader CLI navigation convention, so this looks like a remaining gap rather than a new behavior request.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗