Add optional dynamic conversation titles via a model rename capability
Open 💬 4 comments Opened Mar 9, 2026 by oxysoft
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
Summary
Codex should optionally expose a model-usable tool/capability for dynamically renaming the current conversation as the work evolves.
Problem
Static or one-time titles are often insufficient once a session changes direction. Even with manual rename support, the title can drift out of sync with the actual work unless the user keeps updating it themselves.
Requested behavior
- add an optional capability/tool that allows the model to rename the current conversation/thread
- expose it as a user-controlled feature, for example "Dynamic Conversation Title"
- allow prompting/guidance that encourages the model to keep the title aligned with the current work as the task evolves
- keep manual rename available and let the user override the dynamic title at any time
Why this is useful
- long sessions often change scope or become more specific over time
- dynamic titles would improve resume/search/navigation across many threads
- it reduces the need for the user to manually keep titles synchronized with the actual work
Suggested UX / policy direction
- off by default or clearly opt-in
- model updates title only when the conversation meaningfully changes
- avoid noisy micro-renames on every tiny turn
- title changes should be visible/auditable in the UI
Success criteria
- a session can keep a useful current title without manual renaming every time the scope shifts
- the feature is controllable by the user
- manual rename and dynamic rename coexist cleanly
- title changes improve session navigation rather than creating churn
Related context
- #9471
- #4163
This request was suggested in the discussion on #9471 as a separate feature request.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I’d like to add a concrete CLI/TUI use case for this.
I use long-running Codex CLI sessions where the actual task often becomes clearer only after several turns. A helper can infer a better title from the conversation and persist it to local session metadata, but without a first-class current-thread rename capability it still cannot reliably update the active TUI state. In practice, the workaround is to copy
/rename <title>to the clipboard and ask the user to paste it, or wait until the session is exited and resumed before the title is visible everywhere.An opt-in dynamic title capability would solve this cleanly if it provides:
session_index, SQLite-backed metadata, resume picker, and app/CLI surfaces do not driftThis is closely related to #15444, but the dynamic-title version is useful when the user does not want to keep manually issuing
/renameafter the session scope evolves. The key requirement from the CLI side is not only persistence, but a supported way for the current TUI session to be notified and refreshed.I now have a working, zero-model-cost workaround for the CLI/TUI version of this problem.
This does not replace the requested native capability: it changes the terminal window/tab title, not the persisted Codex thread name used by
/resume, search, or other surfaces. Still, it may be useful both as an immediate workaround and as implementation evidence for separating a stable task label from live activity state.The result looks like:
How it works
It uses the existing Codex lifecycle hooks:
UserPromptSubmit: derive a short deterministic task label, persist it per session, and write● <task>Stop: reuse the same label and write○ <task>SessionStart: restore the label after resume and write the idle stateThe solid/hollow dot already communicates the live state, so the title does not repeat
WorkingorIdlein text.The hook writes an OSC 0 sequence directly to
/dev/tty, because hook stdout is captured by Codex. It does not call a model or the network, so it adds no token cost or model latency.Other behavior:
continue,go, or好的do not replace the task label/rename) takes priority when it is available in local metadata~/.codex/terminal-title-state/The reusable hook script is here:
https://gist.github.com/sunnykaibai/f9a4c5450ee68f71c7b3c76adbe98f86
Minimal configuration
Merge these handlers into the existing
~/.codex/hooks.jsonrather than replacing other hooks:Disable the native title writer so it does not overwrite the hook:
For VS Code integrated terminals, the tab title setting must accept the program-provided sequence:
Otty already honors OSC titles directly. Hook trust should be reviewed and approved on the target machine; persisted trust hashes should not be copied between machines.
Verification
Tested locally with:
0.146.0-alpha.9.222.22.0Verified:
continuepromptSessionStartThe remaining reason for a native feature is important: this workaround cannot update the persisted thread name or notify every Codex surface. A first-class current-thread rename capability would still be the clean solution for
/resume, history/search, IDE, desktop, and web. A smaller native TUI improvement could also expose something like aturn-summaryterminal-title item alongside the existing activity/run-state items.I have a working opt-in plugin workaround for the Codex Desktop version of this request:
https://github.com/znbsf/codex-personal-skills#codex-task-title-organizer-plugin
It intentionally avoids renaming on every turn:
UserPromptSubmitcounts prompts locally per task session.Privacy-wise, the hook stores only hashed session/turn identifiers and small counters. It does not persist prompt text, generated titles, transcripts, rollout data, local paths, or project taxonomy.
The latest implementation is receipt-free: it does not depend on
PostToolUse, because code-mode nested tools do not consistently emit that event (#38850). Existing v2 counters migrate without resetting or replaying prompt 4.Install:
Then restart the desktop app or start a new Codex session and review/trust the hook. Tested on Windows Codex Desktop with the current-task title tool available.
This is not a replacement for the native feature requested here: runtimes without a current-thread rename tool are not covered, and a native implementation would still be better for first-class cross-surface auditability and user controls.