codex - 💡(How to fix) Fix [FEATURE]: Allow custom session ID when starting codex CLI (e.g., --session my-project) [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17782Fetched 2026-04-15 06:28:22
View on GitHub
Comments
2
Participants
3
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1
RAW_BUFFERClick to expand / collapse

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

extent analysis

TL;DR

To address the requested feature, consider adding an optional command-line flag to specify a custom session ID when launching Codex.

Guidance

  • Review the current session ID generation logic to determine the best approach for implementing an override flag.
  • Investigate how OpenClaw's custom session identifier feature is implemented for potential inspiration or guidance.
  • Consider the potential impact on existing workflows and session management when introducing custom session IDs.
  • Evaluate the need for additional error handling or validation when using custom session IDs.

Example

No code example is provided due to the lack of specific technical details about the Codex implementation.

Notes

The implementation details of the proposed feature are uncertain and may require further discussion or experimentation to determine the best approach.

Recommendation

Apply workaround: Implement an optional command-line flag to specify a custom session ID, allowing users to override the auto-generated session ID while maintaining the current default behavior. This approach would provide the requested functionality while minimizing potential disruptions to existing workflows.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING