Skip to content

Add Agent Host setting for Copilot terminal tools#315420

Draft
roblourens wants to merge 1 commit intomainfrom
agents/vsckb-implement-we-need-to-add-a-setting-cb0c1739
Draft

Add Agent Host setting for Copilot terminal tools#315420
roblourens wants to merge 1 commit intomainfrom
agents/vsckb-implement-we-need-to-add-a-setting-cb0c1739

Conversation

@roblourens
Copy link
Copy Markdown
Member

Summary

  • add chat.agentHost.copilot.disableCustomTerminalTools to disable VS Code's custom Copilot terminal tool override
  • forward the setting into the Agent Host process via VSCODE_AGENT_HOST_COPILOT_DISABLE_CUSTOM_TERMINAL_TOOLS
  • omit Agent Host shell tools from Copilot SDK session config when disabled so SDK built-in terminal support is used

Validation

  • npm run compile-check-ts-native
  • npm run valid-layers-check
  • ./scripts/test.sh --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts --grep "materialization omits VS Code terminal tools"
  • node --experimental-strip-types build/hygiene.ts src/vs/platform/agentHost/common/agentService.ts src/vs/platform/agentHost/electron-main/electronAgentHostStarter.ts src/vs/platform/agentHost/node/copilot/copilotAgent.ts src/vs/platform/agentHost/node/nodeAgentHostStarter.ts src/vs/platform/agentHost/test/node/copilotAgent.test.ts src/vs/workbench/contrib/chat/browser/chat.contribution.ts

Adds an Agent Host setting that disables VS Code's custom Copilot terminal tool override so sessions can fall back to the Copilot SDK's built-in terminal support.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 9, 2026 01:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an opt-in setting to let Copilot Agent Host sessions fall back to the Copilot SDK’s built-in terminal tooling by disabling VS Code’s PTY-backed shell tool overrides, and forwards this choice into the Agent Host process.

Changes:

  • Introduces chat.agentHost.copilot.disableCustomTerminalTools (and associated env var forwarding) to control terminal tool override behavior.
  • Updates Copilot Agent session materialization/resume to omit VS Code shell tools when the override is disabled.
  • Adds a unit test asserting that shell tools are omitted from the Copilot SDK session configuration when disabled.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/chat.contribution.ts Registers the new experimental setting in the chat/agent host configuration schema.
src/vs/platform/agentHost/common/agentService.ts Defines the new setting ID and env var constant used across starters/agent host.
src/vs/platform/agentHost/node/nodeAgentHostStarter.ts Forwards the setting into the Node child-process agent host via env var.
src/vs/platform/agentHost/electron-main/electronAgentHostStarter.ts Forwards the setting into the Electron utility-process agent host via env var.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Omits ShellManager + shell tools from Copilot SDK session config when disabled.
src/vs/platform/agentHost/test/node/copilotAgent.test.ts Adds coverage to verify materialization excludes VS Code terminal tools when disabled.

Copilot's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 0

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

blocks-ci screenshots changed

Replace the contents of test/componentFixtures/blocks-ci-screenshots.md with:

Updated blocks-ci-screenshots.md
<!-- auto-generated by CI — do not edit manually -->

#### editor/codeEditor/CodeEditor/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/67bfb687fd2818bd53771a60660541b9ed6f38b80d37da0aac15d267ecaeacec)

#### editor/codeEditor/CodeEditor/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/0469dd8d0a587d94a1eaec514c79917b93b9a38694ef2b767bb1892819ae0a55)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/97162fc53c861ee13dc78a18e41fe3a25a42f62dc52a560510ebf084a418e1c3)

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/3b7e2eb5cc9ba727e2bc1c5113c3e17d8e9a6ce9a37b77519be3716ceb9a9afa)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Dark
![screenshot](https://hediet-screenshots.azurewebsites.net/images/97162fc53c861ee13dc78a18e41fe3a25a42f62dc52a560510ebf084a418e1c3)

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Light
![screenshot](https://hediet-screenshots.azurewebsites.net/images/3b7e2eb5cc9ba727e2bc1c5113c3e17d8e9a6ce9a37b77519be3716ceb9a9afa)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants