Skip to content

Feature Request: resume the latest session in the current directory (follow-up to #4342) #4545

@Nhahan

Description

@Nhahan

What feature would you like to see?

I’m requesting a way to resume the most recent Codex session scoped to the current directory/workspace, not the global last session.
In #4342, I was advised to use codex resume --last, but that resumes the global latest session across all directories on the machine. The desired behavior is to resume the latest session for the current directory/workspace only.

Any of the following would work:

  • New subcommand: codex continue → resume the most recent session whose session’s workspace equals the current directory
  • New flag: codex resume --last-in-dir or codex resume --continue
  • Scope flag: codex resume --last --scope=dir (default remains global)

Are you interested in implementing this feature?

Yes. Once the preferred UX (new subcommand vs flag) is confirmed, I’ll open a PR.

Additional information

This is a follow-up to #4342 to clarify scope: the request is directory/workspace-scoped resume.
Why this helps: when working across multiple repos, --last often resumes an unrelated repo’s session; users expect a directory-scoped resume invoked from a folder to continue that folder’s work.
If no matching session exists for the current directory, a friendly message is sufficient (e.g., suggest listing sessions in this directory or starting a new one).

cc @dedrisian-oai

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions