[FEATURE]: Add an option to set the terminal window title #2996

Open
opened 2026-02-16 17:38:11 -05:00 by yindo · 8 comments
Owner

Originally created by @llucax on GitHub (Nov 20, 2025).

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

At least when using a terminal in Linux, the title can be set using some escape characters, like printf '\033]0;The title\007'.

When having multiple terminals with multiple running instances of OpenCode, it is sometimes hard to identify one instance.

It would be nice if OpenCode could set the window title to, for example, the session name.

In an ideal world, one could even use some sort of template, for example some placeholders could be:

  • %n: Session name
  • %m: Current model being used
  • %a: Current agent running, if any
  • %s: Status: IDLE or WORKING

Then you could configure something like "set_title": false or "set_title": "[%s] %n (%m)".

Originally created by @llucax on GitHub (Nov 20, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request At least when using a terminal in Linux, the title can be set using some escape characters, like `printf '\033]0;The title\007'`. When having multiple terminals with multiple running instances of OpenCode, it is sometimes hard to identify one instance. It would be nice if OpenCode could set the window title to, for example, the session name. In an ideal world, one could even use some sort of template, for example some placeholders could be: * `%n`: Session name * `%m`: Current model being used * `%a`: Current agent running, if any * `%s`: Status: IDLE or WORKING Then you could configure something like `"set_title": false` or `"set_title": "[%s] %n (%m)"`.
yindo added the discussion label 2026-02-16 17:38:11 -05:00
Author
Owner

@rekram1-node commented on GitHub (Nov 21, 2025):

You could do this via plugin btw

@rekram1-node commented on GitHub (Nov 21, 2025): You could do this via plugin btw
Author
Owner

@llucax commented on GitHub (Nov 21, 2025):

Oh, interesting, I guess I have to look at how plugins work.

@llucax commented on GitHub (Nov 21, 2025): Oh, interesting, I guess I have to look at how plugins work.
Author
Owner

@bogorad commented on GitHub (Feb 11, 2026):

can't find anything in the plugins spec to do it.

@bogorad commented on GitHub (Feb 11, 2026): can't find anything in the plugins spec to do it.
Author
Owner

@llucax commented on GitHub (Feb 12, 2026):

Was this somehow implemented? I see my terminal window title being updated in recent releases. I get a title like OC | <session title>. And in the commands window, I see under "System" the option to "Disable terminal title".

@llucax commented on GitHub (Feb 12, 2026): Was this somehow implemented? I see my terminal window title being updated in recent releases. I get a title like `OC | <session title>`. And in the commands window, I see under "System" the option to "Disable terminal title".
Author
Owner

@bogorad commented on GitHub (Feb 12, 2026):

nope, we discussed it on discord.

@bogorad commented on GitHub (Feb 12, 2026): nope, we discussed it on discord.
Author
Owner

@llucax commented on GitHub (Feb 12, 2026):

OK, I'm really confused now. Searching the code I even find mentions to this feature.

@llucax commented on GitHub (Feb 12, 2026): OK, I'm really confused now. Searching the code I even [find mentions to this feature](https://github.com/search?q=repo%3Aanomalyco%2Fopencode%20OPENCODE_DISABLE_TERMINAL_TITLE&type=code).
Author
Owner

@llucax commented on GitHub (Feb 12, 2026):

Or maybe you are only referring to customizing the title?

@llucax commented on GitHub (Feb 12, 2026): Or maybe you are only referring to customizing the title?
Author
Owner

@bogorad commented on GitHub (Feb 12, 2026):

I was referring to title customization, yes.

Image

and

Image
@bogorad commented on GitHub (Feb 12, 2026): I was referring to title customization, yes. <img width="973" height="262" alt="Image" src="https://github.com/user-attachments/assets/ae39d19e-5676-449e-9f59-135c5ffb0fc7" /> and <img width="892" height="269" alt="Image" src="https://github.com/user-attachments/assets/69a0f499-d61d-467e-84ef-1e7316064090" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2996