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.
4 Comments
One preventive suggestion: please consider documenting this in
codex-rs/tui/src/AGENTS.mdso future selectable TUI surfaces do not miss the sameCtrl-P/Ctrl-Nand^P/^Nsupport again.I also have a local fix here in case it is useful: https://github.com/aofei/fork.openai.codex/commit/eddc4c474c476eb13f14331963e9fb25cbde7b84
This feature request hasn't received enough upvotes, so I'm going to close it.
Hi @etraut-openai,
This is actually a bug report, not a feature request.
Felipe from the team has acknowledged it and said they're willing to fix it: https://x.com/fcoury/status/2042985138284384280?s=46
So could you please consider reopening the issue?
Hi @etraut-openai, sorry for the ping.
I saw that 0.122.0 includes a fix for Ctrl-P/N support in the resume picker.
Any chance we could reopen the issue and add the same support to the reset UI? ❤️
/cc @fcoury-oai