Merged
Conversation
anthonykim1
commented
Mar 24, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts terminal shell-type detection and tab-title computation to better support “agent CLI” terminals (eg Copilot/Claude/Codex/Gemini), so their own escape-sequence-provided title (${sequence}) can be used instead of long process-based titles.
Changes:
- Add new
GeneralShellTypevalues for agent CLIs and map them from process titles. - Override terminal tab title template to
${sequence}for agent CLI shell types (unlessshellLaunchConfig.titleTemplateis set). - Extend unit tests to cover the new title-template override behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts | Adds tests for agent-CLI ${sequence} title override and precedence rules. |
| src/vs/workbench/contrib/terminal/browser/terminalInstance.ts | Refreshes labels on shell-type change; adds agent-CLI shell-type override to ${sequence}. |
| src/vs/platform/terminal/node/windowsShellHelper.ts | Adds agent CLI executables/scripts to the Windows process-tree “shell executable” list. |
| src/vs/platform/terminal/node/terminalProcess.ts | Adds agent CLI shell-type mappings and normalizes shell-type lookup to lowercase; includes new debug logging. |
| src/vs/platform/terminal/common/terminal.ts | Introduces new GeneralShellType enum members for agent CLIs. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends terminal “shell type” detection to recognize agent CLIs (eg Copilot/Gemini) and uses their OSC title/sequence to improve terminal tab titles when the foreground process is otherwise indistinguishable (often just node).
Changes:
- Add new
GeneralShellTypevalues for agent CLIs and map them from process titles. - Detect agent CLIs from OSC title sequences in
TerminalInstance, suppressing misleadingnode/undefinedshell type updates while the agent is running. - Override terminal tab title templating to prefer
${sequence}for agent CLIs (and fornodewhen an OSC title is present), with new unit tests.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/terminal/test/browser/terminalInstance.test.ts | Adds unit coverage for ${sequence} title overrides for agent CLIs and node+OSC-title. |
| src/vs/workbench/contrib/terminal/browser/terminalInstance.ts | Implements OSC-title-based agent CLI detection and tab label template overrides. |
| src/vs/platform/terminal/node/windowsShellHelper.ts | Adds agent CLI entries to Windows process-tree “shell executable” list. |
| src/vs/platform/terminal/node/terminalProcess.ts | Adds agent CLI mappings to general shell type detection; normalizes case in one code path. |
| src/vs/platform/terminal/common/terminal.ts | Introduces new GeneralShellType enum values for agent CLIs. |
Copilot's findings
- Files reviewed: 5/5 changed files
- Comments generated: 4
This comment was marked as off-topic.
This comment was marked as off-topic.
Contributor
Author
|
/cc @meganrogge |
rzhao271
approved these changes
Apr 13, 2026
This was referenced Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #290830
Claude Code, Copilot CLI, and Gemini CLI all send OSC titles, which we would use when setting is enabled.
Codex does not. Will file request to have them set osc titles as they are useful identifier when different clis are being used across.
Gemini CLI has inconsistency of what they set the terminal title to when comparing Windows vs. Mac.
MacOS:

Limitation for MacOS) We don't detect codex as shell type maybe in future once we have process tree walk through like windows.
Windows:
