[FEATURE]: Allow custom session ID when starting codex CLI (e.g., --session my-project)

Resolved 💬 4 comments Opened Apr 14, 2026 by seekskyworld Closed Apr 14, 2026

What variant of Codex are you using?

CLI

What feature would you like to see?

What would you like to be added?
Feature hasn't been suggested before.

I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Currently, Codex automatically generates a session ID when starting a new session. While this works well, it makes it difficult to organize or intentionally resume sessions for specific projects.

I would like to request support for manually specifying a session ID when launching Codex, similar to how OpenClaw allows custom session identifiers.

Example:

codex --session my-project

With this feature, users could:

Start a session with a meaningful name
Resume the same session later using the same session ID
Organize multiple projects more easily
Avoid relying only on auto-generated session IDs
Example workflow

Start a session:

codex --session my-project

Later resume the same session:

codex --resume my-project
Why is this needed?

Benefits:

Better project-based session organization
Easier session recovery
More predictable workflows when using Codex for multiple tasks
Improved scripting and automation possibilities

This feature would be especially useful for developers who use Codex across multiple repositories or long-running development sessions.

If session IDs are currently auto-generated internally, this could potentially be implemented as an optional override flag while keeping the current default behavior unchanged.

Additional context

No response

Additional information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗