Scope resume functionality to current workspace/directory
What feature would you like to see?
At the moment, when running codex resume, you are given a list of all recent sessions in Codex, not just those in the current directory.
That coupled with the fact that the sessions are only identifiable by the first message (which is almost always the /init system prompt) makes it quite difficult to identify the session I actually want to resume.
I can't really see a usecase for resuming a session from one codebase in another, it will just lead to a bunch of failed tool calls as the model's context will be completely irrelevant.
Could we please either localise sessions to a per project .codex folder, or simply tag sessions with the directory file path, so that they can be displayed in the codex resume UI to help us find the correct session?
Are you interested in implementing this feature?
_No response_
Additional information
_No response_
4 Comments
This is a pretty big problem for me in my workflow. Currently I run a lot of codex instances over many git worktrees from 3-4 different repos. If I reboot my computer, my active sessions exit. When I do
codex resume, the information in the picker is not very useful. If there were information saved about the working directory in the session information, then hopefully it'd be easier to tell which session corresponds to which workspace.Yeah I'm facing exactly the same issue. I created a small tool for it. https://github.com/andylizf/codexer.
@dgunay Happy to hear your feedback.
Glad to see this is getting attention! (Sorry for filing the duplicate enhancement request!)
To clarify, since I sometimes DO want to resume the same conversation in a different directory, the list of conversations to resume should "merely" prioritize the list of recent conversations FIRST by "was started from this directory" and THEN by recency.
If you wanted to be pedantic, you could even split it up into 2 labeled lists, the first one labeled "From $(pwd):" (sorted by recency) and the second labeled "From anywhere:" (also sorted by recency, but possibly also including the previous list among its results)
I believe this would help a lot of users' workflows; it's often hard to tell which conversation I want based only on the beginning of the first request and/or the search results.
Perhaps the search could even also match on paths; so searching for "Documents/Projects/projectname" would also produce hits for conversations begun in that directory.
Thanks for everyone's work on this.
In recent versions,
codex resumehas been changed such that it is scoped to the current workspace / directory. If you want to disable the directory filter, can you usecodex resume --all.