Scope CLI prompt recall history to Codex conversation/session
Open 💬 3 comments Opened May 5, 2026 by jessedavidson
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
CLI
What feature would you like to see?
Add a new history.persistence mode:
[history]
persistence = "session"
CLI prompt history should match the context sent to the model. Fresh session, fresh history. Resumed session, restored history.
Right now I have to choose between no history or global history.
Additional information
codex-cli 0.128.0
3 Comments
The prompt history is filtered based on the session ID. If you go through all of the prompts from that session, it then returns prompts from the global history. For example, if you type a prompt "X" in one session and then create a second session and add prompts "A" and "B", your history will be "B", then "A" and then "X".
My goal is to understand the context of the current session quickly. Something like: “show me all prompts from this session.”
I'm reaching for prompt history as the closest thing. Setting
persistence = "none"gets me there within a current session, but then there's no history for resumed sessions. And the default behavior of falling back to global history means I have to recognize the transition to prompts from other sessions myself.Prompt recall would be clearer as an explicit scope, not fallback behavior.
A mode like session/project/global should return rows with prompt text, turn id, timestamp, session id, and cwd/project key. When the session list is exhausted, the UI should show that boundary instead of silently mixing in global history.
That keeps command recall aligned with what the model actually saw.
---
_Generated with ax._