microsoft / microsoft/vscode

Agent Host: Copilot SDK tool-search override regressed after runtime Rust port

Open
#333,935 1 comment 0 reactions 1 assignee Claimed by @roblourens View on GitHub
agent-host bug
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Summary

Agent Host sessions backed by the Copilot SDK no longer use the Copilot extension's natural-language tool search. The runtime advertises and executes its own regex `tool_search_tool` instead of the `tool_search_tool` override VS Code registers with `overridesBuiltInTool: true`.

## Expected

VS Code registers `tool_search_tool` (see `_createClientSdkTools` in `src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts`) with a natural-language `{ query }` schema and `overridesBuiltInTool: true`, and sets `toolSearch.enabled: true` on the session. The model should see VS Code's description and schema, and every `tool_search_tool` call should reach VS Code's handler, which ranks the deferred tools and returns `toolReferences`.

## Actual

After the runtime's Rust port ([github/copilot-agent-runtime#13629](https://github.com/github/copilot-agent-runtime/pull/13629)):

- `toolSearch.enabled: true` no longer enables client tool search without a rollout flag or experiment assignment.
- The override's description and `{ query }` schema are dropped: Claude sees the built-in regex `{ pattern }` schema and GPT falls back to provider-hosted search.
- `tool_search_tool` calls run the runtime's regex search instead of VS Code's handler, so semantic search never happens and the `availableTools` snapshot is never consulted.

## Repro

1. Start an Agent Host session with a tool-search-capable model (e.g. Claude Sonnet 4.6 or GPT-5.6) and enough tools to cross the deferral threshold.
2. Ask a question that requires a deferred tool.
3. Observe the request's `tool_search_tool` declaration carries `{ pattern }` (not `{ query }`), and VS Code's tool-search handler is never invoked.

Prompt snapshots in microsoft/vscode#333689 pin the expected shape.

## Fix

Runtime fix: [github/copilot-agent-runtime#18448](https://github.com/github/copilot-agent-runtime/pull/18448).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.