Feature request: `--name <label>` to name a thread at start (codex / codex exec / codex fork)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What variant of Codex are you using?
Codex CLI (0.154.0, Linux aarch64)
What feature would you like to see?
A start-time flag to name the thread, e.g. codex --name <label> / codex exec --name <label> (and codex fork --name), equivalent to running /rename <label> after the first turn.
Use case
I run several Codex TUI workers in parallel from an orchestrator (one per task, each in its own terminal pane). The orchestrator later needs to address a specific worker — codex queue --thread <label>, thread/queue/add, codex resume <label>, and the codex agents dashboard all support names — but today a name can only be attached after the first turn (/rename in the TUI, or thread/name/set over the app-server), and only by first discovering the thread's UUID.
Current workaround (works, but fragile):
- wait until the worker's first turn has run (before that
/renamehas nothing to persist; the thread is not yet inthread/list); thread/listfiltered bycwd+thread/loaded/listto find the UUID (not unique when a previous worker's thread is still loaded in the daemon);thread/name/set.
A flag at start would make the name available from the moment the thread is created, so the orchestrator can use its own task id as the address without a discovery step.
Proposed behaviour
--name <text>oncodex(interactive),codex exec,codex fork; applied when the thread is first persisted, same semantics as/rename(overrides automatic thread naming; empty/whitespace rejected).codex queue --thread <name>currently refuses with "Cannot verify a unique session label across server pages" when the thread list is paginated; with an explicit--namethat is a common case, so it would help if name lookup scanned all pages (or the check were limited to loaded threads) — happy to file that separately if preferred.
Additional information
Related: #35069 (no way to see the name after /rename — the TUI footer now shows the UUID in 0.154), #30995 (resume by name across cwds), #44093 (automatic naming).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing argument handling for the interactive codex, codex exec, and codex fork entry points, then follow thread creation until the first persistence step. Confirm how /rename validates and stores names, and make the flag available with the same validation and override behavior across all three commands. Done means a supplied name is persisted at thread creation, while empty or whitespace-only names are rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100