Add mode telemetry for specialized subagents - #336457
Draft
Vikram Nitin (vikramnitin9) wants to merge 1 commit into
Draft
Vikram Nitin (vikramnitin9) wants to merge 1 commit into
Vikram Nitin (vikramnitin9) wants to merge 1 commit into
Conversation
Set the legacy editAgent mode on execution and search subagent requests and forward it through response telemetry so ExP classifies these requests as Agent. Co-authored-by: Copilot <[email protected]> Copilot-Session: 24f8457d-5586-4533-b8a7-31015ae321cb
Copilot started reviewing on behalf of
Vikram Nitin (vikramnitin9)
September 16, 2026 17:38
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The telemetry mode is consistently propagated and classified with focused validation coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Adds legacy agent-mode telemetry for execution and search subagent model requests and propagates it across response outcomes.
Changes:
- Tags specialized subagent requests with
editAgent. - Forwards mode through success, failure, and cancellation telemetry.
- Synchronizes shared BYOK GDPR classifications and adds focused tests.
| File | Description |
|---|---|
extensions/copilot/src/platform/networking/common/networking.ts |
Adds request mode telemetry metadata. |
extensions/copilot/src/extension/prompt/test/node/searchSubagentToolCallingLoop.spec.ts |
Verifies search subagent telemetry. |
extensions/copilot/src/extension/prompt/node/test/chatMLFetcherResponseApiTelemetry.spec.ts |
Verifies response mode forwarding. |
extensions/copilot/src/extension/prompt/node/searchSubagentToolCallingLoop.ts |
Tags search subagent requests. |
extensions/copilot/src/extension/prompt/node/executionSubagentToolCallingLoop.ts |
Tags execution subagent requests. |
extensions/copilot/src/extension/prompt/node/chatMLFetcherTelemetry.ts |
Emits mode on response telemetry. |
extensions/copilot/src/extension/prompt/node/chatMLFetcher.ts |
Preserves mode for cancellation paths. |
extensions/copilot/src/extension/byok/vscode-node/geminiNativeProvider.ts |
Synchronizes Gemini GDPR metadata. |
extensions/copilot/src/extension/byok/vscode-node/anthropicProvider.ts |
Synchronizes Anthropic GDPR metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
editAgenttelemetry moderesponse.successGDPR classifications in sync for BYOK providersThis makes
execution_subagentandsearch_subagentrequests resolve to the Agent bucket in theMode_Basesegment of theChatPanel(VSCodeCopilotChat)scorecard instead of None.Validation
npm --prefix extensions/copilot run test:unit -- src/extension/prompt/node/test/chatMLFetcherResponseApiTelemetry.spec.ts src/extension/prompt/test/node/searchSubagentToolCallingLoop.spec.tscd extensions/copilot && npx tsc --noEmit --project tsconfig.jsonnpm run precommit