You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow setting thread name at session start with codex --name #14482
Add a --name flag to the interactive CLI so a thread can be named when it is created:
codex --name "issue AAA"
This should work with the existing thread naming and resume behavior, so the same session can later be resumed with:
codex resume "issue AAA"
Problem
Today, naming a conversation is a two-step flow:
Start a session with codex
Rename it later with /rename
That works, but it is awkward when the intended thread name is already known before starting the session, for
example when opening work for a specific bug, issue, or task.
Proposed behavior
Support:
codex --name "issue AAA"
Expected behavior:
Starts a fresh interactive session
Sets the initial thread name to "issue AAA"
Persists that name through the existing session index / thread naming path
Makes the session resumable via:
codex resume "issue AAA"
Scope
This request is only for naming a fresh session at startup.
I would not expect --name to implicitly rename resumed or forked sessions. Those cases should probably either:
reject --name with a clear error, or
be handled in a follow-up design discussion
Why this shape
codex --name "..." fits the current CLI better than a separate codex name "..." command because naming is metadata
for the normal interactive startup path, not a distinct top-level mode.
This looks like it should be a relatively small change because:
/rename already persists thread names
codex resume already resolves thread names
So the missing part is mainly exposing an initial-name option on the fresh-session path.
Additional information
No response
Reacted by Mateen Ulhaq, Samuel Tschiedel, Tyler Kozlowski, Alex Jones, Michał Bałos, Stefan Heidekrüger, Levan Kekelidze, Higor , Nahuel, michal-b-bozek and 14 more
Now that 0.120.x has /rename in interactive mode, it just makes sense to have a --name flag. Hoping this can get bumped up and gain some traction for next release.
Adding a related Desktop use case: this would also help Codex Desktop users whose first prompt naturally begins with long local paths.
Example workflow:
/Users/<user>/Desktop/<workspace>/<project>/<document>.docx
Please modify this file according to the attached/spec document...
Today, if that first prompt is used as the initial title or remains as a stale fallback in metadata, Desktop Projects/sidebar rows become very long and hard to scan. A creation-time name such as:
codex --name "Course material revision"
or an equivalent Desktop UI field would avoid relying on the first prompt as title metadata.
Related current behavior I observed on Codex Desktop 26.519.31651 / CLI 0.133.0:
the app-server protocol already exposes thread/name/set with { threadId, name }
after rename/generation, session_index.jsonl can contain the concise title while state_5.sqlite.threads.title still contains the long first prompt
This would avoid the current start-then-rename flow when the intended task name is already known. I am going to try a focused implementation and will link a branch or PR if GitHub allows it.
adds codex --name <THREAD_NAME> for fresh interactive sessions
normalizes/rejects empty names before TUI startup
rejects --name for subcommands and for resume/fork paths instead of silently ignoring it
uses the existing thread/name/set app-server API immediately after thread/start, so it works through the current TUI app-server startup path without adding a new thread/start protocol field
Validation:
cargo fmt --all (fallback because just is not installed locally)
cargo test -p codex-cli name_flag --bin codex
cargo test -p codex-tui thread_name --lib
The first test run hit a webrtc-sys GitHub download timeout for webrtc-mac-arm64-release.zip; I pre-downloaded the expected archive into the local Cargo build cache and reran the tests successfully.
There now seem to be multiple independent implementations of this feature, along with several users requesting the same workflow. The implementation also appears relatively self-contained since it builds on the existing thread naming and resume infrastructure.
Is there any maintainer feedback on the proposed --name approach, or any design concerns that should be addressed before this can move forward?
I'd be happy to help test or iterate on the implementation if that would help get it merged.
This would be a workflow and fluency improvement for those who run many concurrent Codex CLI sessions, surely not hard to implement, and perhaps also one that does not carry a huge tangle of design interactions versus existing feature sets.
Activity
Add --name for fresh interactive sessions (openai#14482)
zipus commentedon Mar 12, 2026
I implemented this on my fork, but GitHub is blocking PR creation because
openai/codexonly allows collaboratorsto open pull requests.
Branch:
zipus/issue-14482-initial-thread-nameCommit:
382d8909Fork branch URL:
https://github.com/zipus/codex/tree/zipus/issue-14482-initial-thread-name
Summary:
codex --name "..."for fresh interactive sessions--nameon resume/fork instead of ignoring ittkozzer commentedon Apr 11, 2026
Now that 0.120.x has
/renamein interactive mode, it just makes sense to have a--nameflag. Hoping this can get bumped up and gain some traction for next release.baawhee commentedon May 6, 2026
That would be a great addition to the CLI!
NightGlowww commentedon May 22, 2026
Adding a related Desktop use case: this would also help Codex Desktop users whose first prompt naturally begins with long local paths.
Example workflow:
Today, if that first prompt is used as the initial title or remains as a stale fallback in metadata, Desktop Projects/sidebar rows become very long and hard to scan. A creation-time name such as:
codex --name "Course material revision"or an equivalent Desktop UI field would avoid relying on the first prompt as title metadata.
Related current behavior I observed on Codex Desktop 26.519.31651 / CLI 0.133.0:
thread/name/setwith{ threadId, name }session_index.jsonlcan contain the concise title whilestate_5.sqlite.threads.titlestill contains the long first promptSo
--name/ initial-name support would solve the workflow problem, while #16405 tracks keeping the persistence layers in sync after a name is set.Higor-Matos commentedon Jun 10, 2026
I hit this in daily CLI use with multiple concurrent Codex sessions.
Environment:
Desired workflow:
This would avoid the current start-then-rename flow when the intended task name is already known. I am going to try a focused implementation and will link a branch or PR if GitHub allows it.
Higor-Matos commentedon Jun 10, 2026
I implemented a focused branch for this on my fork, but GitHub is blocking PR creation from my account with:
Branch/commit:
Implementation summary:
codex --name <THREAD_NAME>for fresh interactive sessions--namefor subcommands and forresume/forkpaths instead of silently ignoring itthread/name/setapp-server API immediately afterthread/start, so it works through the current TUI app-server startup path without adding a newthread/startprotocol fieldValidation:
cargo fmt --all(fallback becausejustis not installed locally)cargo test -p codex-cli name_flag --bin codexcargo test -p codex-tui thread_name --libThe first test run hit a
webrtc-sysGitHub download timeout forwebrtc-mac-arm64-release.zip; I pre-downloaded the expected archive into the local Cargo build cache and reran the tests successfully.est7 commentedon Jul 4, 2026
Friendly ping on this.
There now seem to be multiple independent implementations of this feature, along with several users requesting the same workflow. The implementation also appears relatively self-contained since it builds on the existing thread naming and resume infrastructure.
Is there any maintainer feedback on the proposed
--nameapproach, or any design concerns that should be addressed before this can move forward?I'd be happy to help test or iterate on the implementation if that would help get it merged.
sshekhar-coursera commentedon Jul 15, 2026
Is this being picked, its a real important feature I am awaiting.
LamForest commentedon Jul 22, 2026
This is exactly the feature I’m looking for.
I can confirm that the startup naming option is still unavailable in
codex-cli 0.145.0-alpha.27on macOS.saidelike commentedon Jul 24, 2026
Also voted for this
gswallow commentedon Aug 6, 2026
Correction: I should have read the manual.
/renamealready exists in the CLI.The actual gap I ran into was discoverability, not the absence of a rename feature.
matanox commentedon Oct 21, 2026
This would be a workflow and fluency improvement for those who run many concurrent Codex CLI sessions, surely not hard to implement, and perhaps also one that does not carry a huge tangle of design interactions versus existing feature sets.