Skip to content

Scope resume functionality to current workspace/directory #3856

Closed

Description

@novacoole

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

Activity

  1. dgunay commented on Sep 25, 2025

    @dgunay

    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.

  2. andylizf commented on Sep 26, 2025

    @andylizf

    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.

  3. pmarreck commented on Nov 22, 2025

    @pmarreck

    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.

  4. etraut-openai commented on Nov 22, 2025

    @etraut-openai
    Contributor

    In recent versions, codex resume has been changed such that it is scoped to the current workspace / directory. If you want to disable the directory filter, can you use codex resume --all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions