Up/down arrows should cycle through user messages within current thread
Resolved 💬 8 comments Opened Mar 10, 2026 by kendonB Closed May 10, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.112.0
What subscription do you have?
ChatGPT Pro
Which model were you using?
N/A
What platform is your computer?
Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64
What terminal emulator and version are you using (if applicable)?
Windows Terminal WSL
What issue are you seeing?
Up/down arrow browses all recent messages for all chats, when it should search just the current chat. I do like that it goes back to previous chats from the same folder, however.
The ideal behaviour would be for up to cycle:
- The user messages from the active session
- THEN, previous user messages from all other sessions in that directory, in chronological order, such that pressing up past the first message of the current session jumps to the last message from a previous session
What steps can reproduce the bug?
Have two sessions open in two separate folders. Cycle messages with up/down.
What is the expected behavior?
_No response_
Additional information
_No response_
8 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Related to #12085 and #10512 but this issue is for the cli (behaviour, though, should be aligned between app and cli).
I think this behavior is intended. I frequently make use of this behavior. I'll enter a prompt, then realize that I want to start a new thread, so I type
/new, then I hit up to restore the previous prompt.Indeed, you get this behaviour with my suggestion:
"""
The ideal behaviour would be for up to cycle:
The user messages from the active session
THEN, previous user messages from all other sessions in that directory, in chronological order, such that pressing up past the first message of the current session jumps to the last message from a previous session
"""
OK, I'll change this from a bug report to an enhancement request, and we'll see if it gets upvotes.
Thank you. I do think the specific behaviour that you can cycle through messages that originate from sessions in other folders should be considered a bug
I have an implementation for this issue in my fork:
https://github.com/onezibo/codex/tree/feat/history-cwd-scope
Changes (5 files, +224/-98):
cwdfield toHistoryEntrywith backward-compatible#[serde(default)]cwd: &Paththroughappend_entry,history_metadata,lookupscan_matching_entries<T>()to deduplicate lock+iterate+filter logicWould it be possible to get collaborator access to open a PR,
or could a maintainer cherry-pick from my branch?
This feature request hasn't received enough upvotes, so I'm going to close it.