Audit deprecated Copilot SDK terminal content usage
@anthonykim1 is already working on this.
Since Jul 1, 2026.
Assessment
This issue has not been assessed yet.
Description
Follow-up from https://github.com/microsoft/vscode/pull/323922 and https://github.com/github/copilot-sdk/issues/1803.
Copilot SDK now exposes shell_exit for shell command exit metadata, and SDK terminal content is deprecated for that purpose. I want to make sure we do not keep depending on SDK type: "terminal" content for new shell status behavior.
From a quick audit, the Agent Host ToolResultContentType.Terminal usages are not the same thing as the deprecated SDK terminal content. Those are VS Code/AHP terminal resource references with a terminal URI, and should stay separate from SDK shell_exit metadata.
Actual deprecated SDK terminal-content dependency found:
formatSearchToolInvocationCompletedstill reads SDKresult.contents[0].type === 'terminal'andtextfor glob/grep/rg result parsing:- Tests still encode that legacy SDK
terminalcontent shape for glob/grep/rg:
Places checked that are probably not deprecation debt:
- Agent Host custom terminal content uses
ToolResultContentType.Terminalas a live terminal resource reference (resource,title), not SDK terminal output text:- https://github.com/microsoft/vscode/blob/9d925988ae356620214d52776fba0a4bb486fe1f/src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts#L637-L640
- https://github.com/microsoft/vscode/blob/9d925988ae356620214d52776fba0a4bb486fe1f/src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts#L2672-L2677
- Chat-side terminal rendering reads Agent Host terminal resource blocks by URI, not deprecated SDK terminal output blocks:
- https://github.com/microsoft/vscode/blob/9d925988ae356620214d52776fba0a4bb486fe1f/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts#L144-L150
- https://github.com/microsoft/vscode/blob/9d925988ae356620214d52776fba0a4bb486fe1f/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/stateToProgressAdapter.ts#L718-L722
Work:
- Confirm whether the internal Copilot CLI extension path should keep supporting SDK
terminalcontent for glob/grep/rg result parsing as legacy compatibility. - If not, migrate search result parsing to
result.contentor another non-deprecated SDK content shape. - Keep
shell_exitlimited to shell command exit metadata; do not treat it as display output or as a live terminal resource. - Rename or update tests so any remaining SDK
terminalcoverage is clearly marked as legacy compatibility. - Make sure Agent Host
ToolResultContentType.Terminalremains documented as a VS Code/AHP terminal resource, not deprecated SDK terminal content.
This is mostly cleanup/debt after adopting shell_exit; I do not think it blocks the command decoration fix.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·