Repository navigation
Agent Host: disable the Copilot runtime's semantic_code_search tool - #342126
Merged
Bhavya U (bhavyaus) merged 1 commit intoOct 16, 2026
Merged
Conversation
Contributor
|
Base:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The narrowly scoped exclusion has consistent unit expectations and prompt baselines, with no unresolved actionable findings.
0 open findings
What changed in this PR
Disables Copilot’s built-in semantic_code_search in Agent Host sessions to avoid overlap with the existing semantic_search client tool, independently of the SDK bump.
Changes:
- Adds the runtime tool identifier and unconditional exclusion.
- Updates unit expectations and 19 prompt snapshots.
- Documents the exclusion rationale.
Paths below are relative to src/vs/platform/agentHost/.
| File | Description |
|---|---|
test/node/e2e/README.md |
Documents the exclusion. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5-mini.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5-codex.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5_6-terra.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5_6-sol.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5_6-luna.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5_1.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5_1-codex.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gpt-5_1-codex-mini.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_gemini-2_0-flash.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-sonnet-5.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-sonnet-4_6.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-sonnet-4_5.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-opus-5.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-opus-5_5.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-opus-4_7.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-opus-4_6.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-opus-4_5.prompt.md |
Removes the native tool definition. |
test/node/e2e/providers/__snapshots__/Agent_Host_E2E___Copilot_prompts_claude-haiku-4_5.prompt.md |
Removes the native tool definition. |
test/node/copilotSessionLauncher.test.ts |
Updates excluded-tool expectations. |
test/node/copilotAgent.test.ts |
Updates session configuration expectations. |
node/copilot/copilotToolDisplay.ts |
Adds the native tool identifier. |
node/copilot/copilotSessionLauncher.ts |
Excludes the tool and explains why. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
roblourens
approved these changes
Oct 16, 2026
Exclude the runtime's built-in `semantic_code_search` tool from Copilot SDK sessions in favor of the Agent Host's own `semantic_search` client tool. The runtime tool is remote-only (no local chunking/embedding or external ingest) and the CLI is still A/B testing its prompt variations and deferred-loading strategies; revisit in a future iteration. Co-authored-by: Copilot <[email protected]>
Bhavya U (bhavyaus)
force-pushed
the
bhavyau/disable-runtime-semantic-code-search
branch
from
October 16, 2026 19:02
f6a80cc to
7acd5ac
Compare
roblourens
approved these changes
Oct 16, 2026
roblourens
approved these changes
Oct 16, 2026
Justin Chen (justschen)
approved these changes
Oct 16, 2026
Bhavya U (bhavyaus)
deleted the
bhavyau/disable-runtime-semantic-code-search
branch
October 16, 2026 19:51
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.
The Copilot runtime now ships a built-in
semantic_code_searchtool (already present with SDK1.0.23-preview.2onmain, and kept in the #342093 bump). Agent Host sessions already have our ownsemantic_searchclient tool, so this excludes the runtime one (builtin:semantic_code_search) to avoid offering the model two overlapping semantic search tools.Per discussion with Timothy Clem (@tclem): clients with their own tools are expected to override these built-ins. The runtime tool is remote-only (no local chunking/embedding or external ingest), and the CLI is actively A/B testing its prompt variations and two deferred-loading strategies. We'll revisit — possibly with our own A/B experiment — in a future iteration. This rationale is captured in a comment next to the exclusion.
Changes:
copilotSessionLauncher.ts: always addbuiltin:semantic_code_searchto the SDKexcludedTools, with the note above.copilotToolDisplay.ts: addCopilotToolName.SemanticCodeSearch.excludedTools.semantic_code_searchtool definition) and note the exclusion in the E2E README.This is independent of the SDK bump in #342093, which will pick it up on its next merge from
main.How to test
./scripts/test.sh --run src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts --run src/vs/platform/agentHost/test/node/copilotAgent.test.ts: 888 passing, 14 failing. The same 14CopilotAgenttests fail onmainwithout this change; they're environment-related (they expect a/home/test/...session-state path).AGENT_HOST_UPDATE_AHP_SNAPSHOTS=1 ./scripts/test-integration.sh --run src/vs/platform/agentHost/test/node/e2e/providers/copilotPromptsE2E.integrationTest.tsto regenerate the prompt snapshots, then the same command without the variable (replay): 24 passing.npm run eslinton the changed TypeScript files: clean.