github / github/app

Tool Search never defers MCP tools in the desktop app — gated behind an unassigned server experiment

Đang mở
#3,172 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
153
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Investigated on macOS (App engine `1.0.80`, model `claude-opus-4.8`). MCP tool definitions load eagerly in every session regardless of model or config.

Measured (via `~/.copilot/data.db` → `sessions.context_tool_definitions_tokens`, on a copy): a fresh session whose only message was `hi` = 151,111 tool-def tokens. Same value across `claude-opus-4.8`, and up to 406k–440k on `gpt-5.6-sol` / `claude-opus-5` — so this is not model gating; all are "supported" models per the docs.

Root cause: deferral (`Session::apply_tool_search_defer_policy`, event `tool_search.activated`, present in the app binary) is gated behind the server-assigned `tool_search` experiment flight. My `app_state → exp-assignment-cache` (FlightingVersion 5389) only assigns `ccr_pr_nudge_adoption` + `app_aa_c1`; `tool_search` is absent. In the binary, `tool_search` sits in the same flight family as `mcp_apps` / `local_sandbox` / `cloud_sessions` — i.e. a server rollout, not a user toggle (which is why it also doesn't appear in Settings → Experimental).

Things that did NOT work:

* `deferTools: "auto"` per server in `mcp-config.json`
* Hard-adding `tool_search` to `app_state → enabled-experiments` in `data.db`
* `toolSearch: true` in `~/.copilot/settings.json`, tested both before and after a full app restart → tool-def tokens unchanged (151,111 → 151,115). The app constructs `toolSearch` itself from `expAssignments` and ignores this settings.json key, unlike the documented CLI.

Ask: please expose Tool Search as a user setting in the desktop app that bypasses the experiment gate, or enroll accounts in the `tool_search` flight — otherwise heavy MCP users pay for 150k–440k tool-definition tokens on every turn with no local mitigation.

---

Related: #1398 (dynamic MCP tool loading request), #2141 (large tool sets silently produce no output on Claude models in the app, while the CLI — where tool search is on by default — is unaffected). CLI docs: https://docs.github.com/en/copilot/concepts/agents/copilot-cli/tool-search

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng việc kiểm tra entry point Session::apply_tool_search_defer_policy của binary desktop, event tool_search.activated và dữ liệu flight expAssignments được mô tả trong app_state → exp-assignment-cache. So sánh hành vi này với tài liệu CLI tool-search và các đường dẫn settings đã được tài liệu hóa. Được xem là hoàn tất khi ứng dụng desktop cung cấp bypass do người dùng kiểm soát hoặc đăng ký các account vào tool_search, đồng thời số lượng token định nghĩa tool được báo cáo trên mỗi session được giảm xuống.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
macos
Lĩnh vực
ai-infra-agents, desktop
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.