Add Agent Host setting for Copilot terminal tools#315420
Draft
roblourens wants to merge 1 commit intomainfrom
Draft
Add Agent Host setting for Copilot terminal tools#315420roblourens wants to merge 1 commit intomainfrom
roblourens wants to merge 1 commit intomainfrom
Conversation
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>
Contributor
There was a problem hiding this comment.
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
Contributor
blocks-ci screenshots changedReplace the contents of Updated blocks-ci-screenshots.md<!-- auto-generated by CI — do not edit manually -->
#### editor/codeEditor/CodeEditor/Dark

#### editor/codeEditor/CodeEditor/Light

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Dark

#### editor/inlineChatZoneWidget/InlineChatZoneWidget/Light

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Dark

#### editor/inlineChatZoneWidget/InlineChatZoneWidgetTerminated/Light
 |
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.
Summary
chat.agentHost.copilot.disableCustomTerminalToolsto disable VS Code's custom Copilot terminal tool overrideVSCODE_AGENT_HOST_COPILOT_DISABLE_CUSTOM_TERMINAL_TOOLSValidation
npm run compile-check-ts-nativenpm 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