Codex should provide meaningful OSC 0/2 for Terminal Title

Resolved 💬 6 comments Opened Apr 20, 2026 by anthonykim1 Closed Apr 26, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.118.0

What subscription do you have?

pro

Which model were you using?

5.3-codex

What platform is your computer?

mac os

What terminal emulator and version are you using (if applicable)?

vscode

What issue are you seeing?

Coming from https://github.com/microsoft/vscode/issues/290830 and https://github.com/microsoft/vscode/pull/304528

Note that all other CLI such as gemini, claude, copilot provides meaningful terminal title via OSC 0/2, but codex does not, leading to fallback on just workspace name from pwsh.

With new vscode setting terminal.integrated.tabs.allowAgentCliTitle we allow CLIs to set their own terminal tab title name, and it would serve codex good if you guys can contribute title, this way to prevent confusion to users and have better UI/UX for them when in embedder like vscode, cmux, or even on windows powershell.

What steps can reproduce the bug?

  1. Open vscode.
  2. set terminal.integrated.tabs.allowAgentCliTitle to enalbed
  3. Launch codex via typing codex in integrated terminal
  4. Watch title is meaningless compared to those set b y other CLIs.

What is the expected behavior?

Contribute osc 0/2 to set meaningful terminal title for embedder to set accordingly.

Additional information

_No response_

View original on GitHub ↗

6 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #17440

Powered by Codex Action

etraut-openai contributor · 4 months ago

Have you tried using the /title command in the CLI? It allows you to pick what you want to see in the title. It uses an OSC 0 escape to set the title.

nedtwigg · 3 months ago

It's a big QOL improvement if the title is generated automatically. Here's what Claude Code does right now. :

  • on launch: * Claude Code
  • after users sends the first message * <persistent generated title based on the first message>

And the leading asterisk turns into a spinner thing. Codex also does the spinner thing, but it doesn't auto-generate a title based on that first message. Very nice to not need to manually type /title when you're managing multiple concurrent instances. Any chance of reopening this with the changed title:

Codex should autogenerate meaningful title and send via OSC 0/2
etraut-openai contributor · 3 months ago

@nedtwigg, /title configures your preferences for what you want to see in your title. You need to run it only once, and your preferences are then saved. If you're seeing a problem with the /title feature, please open a new bug report and fill in the requested details in the template.

nedtwigg · 3 months ago

Wonderful, thanks! I misunderstood. Fwiw, here was my experience:

› /title working on a new feature
• Working on a new feature. What feature should I implement or inspect?

It didn't show me the menu that a bare /title does, and no error or indication I had used it wrong.

anthonykim1 · 27 days ago

Now seeing cwd as default title and codex is properly detected as shell type on MacOS VS Code integrated terminal:
<img width="673" height="200" alt="Image" src="https://github.com/user-attachments/assets/2224df8c-aeca-4f3e-822b-144b5795f023" />

Thanks from VS Code!