Codex CLI should set a persistent distinctive terminal title marker
What problem are you trying to solve?
When multiple AI coding CLIs are open at once, it is useful for each terminal window to have a distinctive, persistent identifier in the window title. Claude Code and Gemini CLI both put an identifying character in their terminal titles, which makes their windows easy to distinguish in window switchers and terminal tab lists.
Codex CLI currently does not appear to keep such an identifier in the terminal title during an interactive TUI session.
Observed behavior
Environment:
- Codex CLI:
codex-cli 0.130.0 - OS/shell: Linux, Bash
- Terminal supports OSC title sequences
A shell wrapper can briefly set the terminal title before launching Codex, for example:
printf '\033]2;✾ Codex\007'
command codex "$@"
But when Codex starts, the title is immediately overwritten, so the marker is not persistent. That makes the wrapper approach insufficient; this likely needs to be handled inside the Codex TUI itself.
Requested behavior
Please add a built-in persistent Codex terminal-title marker for interactive CLI sessions. For example, Codex could set the title to something beginning with U+273E:
✾ Codex
If Codex already has dynamic title content, the marker could be prepended instead of replacing that content, such as:
✾ Codex - /path/to/project
Details that would make this useful
- Keep the marker present throughout the interactive session, including after internal TUI title updates.
- Restore the previous terminal title on exit if Codex already manages terminal state cleanup.
- Gracefully no-op in environments that do not support OSC terminal title sequences.
- If a fixed marker is too opinionated, expose a config option for the title prefix/marker.
Why this matters
This is a small usability improvement, but it helps users quickly identify Codex sessions among other AI coding agents and regular terminals.
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗