Codex/CLI/Q/How can the Codex conversation name become the tmux pane title?
Properties
- logseq-entity
- Logseq/Entity/Question
How can the Codex/CLI conversation name become the tmux pane title?
AI Answer
- Answer/Official from Codex Configuration Reference, Codex developer commands, and tmux(1):
- Short answer: Add the
threaditem to Codex's terminal title in$CODEX_HOME/config.toml(normally~/.codex/config.toml): - Restart Codex, then name the chat with
/rename <name>. Codex writes that chat name as the terminal title. tmux receives the sameOSC 2title sequence and stores it as the pane'spane_title, which appears on the pane row when the tmux/session/Picker tree is expanded. - Check the result after suspending or exiting Codex in that pane with:
- The resume-picker label has two possible sources. Codex's resume-picker source displays the saved chat name when one exists and otherwise falls back to the session preview, usually the first prompt. The
threadterminal-title item displays the saved name when one exists and otherwise falls back to the thread UUID. Thereforeterminal_title = ["thread"]matches named chats; it does not copy the preview text of an unnamed chat. - To mirror the unnamed fallback too, a small Codex/Hook helper can run on
SessionStartandStop: use the hook'ssession_idwith App Serverthread/read, choosethread.nameorthread.preview, then runtmux select-pane -t "$TMUX_PANE" -T "$label". Codex App Server exposes both fields, and Codex Hooks supplies the session ID. Using/renamekeeps the setup to the native Codex option above. allow-renameis unrelated: tmux uses it for a program changing the window name.OSC 2andselect-pane -Tset the pane title.
- Short answer: Add the
- Answer/Official from Codex Configuration Reference, Codex developer commands, and tmux(1):