Skip to content

CLI: include named thread titles in the default terminal tab title #35626

Description

@MrSimonC

What variant of Codex are you using?

Codex CLI (codex-cli 0.145.0) in Windows Terminal on Windows 11, running Ubuntu under WSL2.

What feature would you like to see?

Please include a named Codex thread in the default Windows Terminal tab title.

Codex already supports configurable terminal-title items through /title, including thread-title. The missing piece is making a useful named thread title part of the default experience, without requiring every user to configure /title manually.

Current behavior

Running:

/rename simon

successfully renames the session. Codex confirms that the session can be resumed by selecting simon, but the Windows Terminal tab title does not include simon.

The current default terminal-title selection contains the activity indicator and project name, but not the thread name.

Proposed behavior

After a thread is named or renamed, the default terminal title should include that name and update immediately without restarting Codex.

For example:

  • When idle: the existing project title followed by simon.
  • While Codex is working: the existing activity indicator, project title, and simon.
  • When the work completes: the existing completion BEL notification continues to work independently.

The existing activity and notification behavior should be preserved. This feature should not change Windows Terminal's global bell settings.

For unnamed sessions, the default title should retain the current behavior rather than exposing a UUID merely because named-thread titles were added. The existing configurable thread-title item may continue to retain its current thread-identifier fallback for users who explicitly select it.

Suggested implementation direction

The current TUI already has the necessary update path:

  • /rename updates the stored thread name.
  • The thread-name update handler refreshes status surfaces.
  • Codex already emits OSC 0 terminal-title updates from the TUI.
  • TerminalTitleItem::Thread already renders a thread name.

The default-title implementation could therefore add a named-only title item or equivalent default-only resolution, for example:

activity | project-name | thread-name-if-present

The implementation should:

  • Update the Windows Terminal title immediately after /rename.
  • Avoid changing the semantics of explicitly configured thread-title unless intended and documented.
  • Add TUI snapshot coverage for named and unnamed default sessions.
  • Update the terminal-title configuration description if it documents the old default.
  • Leave the existing BEL completion notification path unchanged.

This should be implemented inside the Codex TUI. A shell wrapper, launch hook, /dev/tty process scan, or tab-colour mechanism should not be required: Codex already owns and successfully emits its terminal-title escape sequence while the TUI is running.

Why this matters

Users commonly run several Codex sessions in parallel. The Windows Terminal tab is often the quickest way to identify which session is active. Session names are already persisted and selectable through codex resume, so reflecting the name in the default tab title would make that existing feature substantially more useful.

Additional information

This request is related to, but distinct from:

A previous Windows Terminal colour integration also showed that launch-time shell changes need to happen before Codex enters its alternate-screen TUI. That constraint is not needed for this feature because the title update is already emitted by Codex itself after the TUI starts.

The current Windows Terminal settings do not contain a suppressApplicationTitle override.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or requestsessionIssues involving session (thread) management, resuming, forking, naming, archivingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions