agentHost: separate agent selection and execution mode telemetry - #328843
Merged
Aaron Munger (amunger) merged 2 commits intoAug 4, 2026
Conversation
Contributor
There was a problem hiding this comment.
🟡 Not ready to approve
Agents Window telemetry can attribute mode selections to the wrong session or peer chat.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Separates Agent Host execution-mode telemetry from user-selected chat modes while extending chat.modeChange to the Agents Window.
Changes:
- Extracts shared chat-mode telemetry reporting.
- Adds Agents Window picker telemetry.
- Renames Agent Host execution telemetry and updates tests/docs.
File summaries
| File | Description |
|---|---|
chatModeTelemetry.test.ts |
Tests shared telemetry behavior. |
chatModeTelemetry.ts |
Adds shared reporting helper. |
chatExecuteActions.ts |
Uses the shared helper. |
SESSIONS.md |
Documents telemetry separation. |
modePicker.test.ts |
Tests Agents Window reporting. |
modePicker.ts |
Reports picker selections. |
agentSideEffects.test.ts |
Tests execution-mode telemetry. |
agentSideEffects.ts |
Calls the renamed reporter method. |
agentHostTelemetryReporter.ts |
Defines the separate execution event. |
sessions/SKILL.md |
Records the telemetry distinction. |
Review details
- Files reviewed: 10/10 changed files
- Comments generated: 1
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
Keep chat.modeChange scoped to user picker and custom-agent selections, including the Agents Window, and report interactive, plan, and autopilot transitions through agentHost.executionModeChanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Resolve the previous mode and request count from the picker surface's scoped session and active chat so multi-session and peer-chat selections are attributed correctly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Aaron Munger (amunger)
force-pushed
the
amunger/agent-host-mode-agent-telemetry
branch
from
August 3, 2026 23:23
4efecd7 to
c0d3e23
Compare
Aaron Munger (amunger)
marked this pull request as ready for review
August 3, 2026 23:51
Paul (pwang347)
approved these changes
Aug 3, 2026
Aaron Munger (amunger)
deleted the
amunger/agent-host-mode-agent-telemetry
branch
August 4, 2026 03:39
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.
Overview
This follows up #328504 by keeping two distinct telemetry concepts separate:
chat.modeChangetracks user selections of chat modes and custom agents.agentHost.executionModeChangedtracks Agent Host execution modes:interactive,plan, andautopilot.The SDK-native
session.mode.changedevent remains unchanged as a peer signal.Before
chat.modeChangesession.mode.changedAgent Host custom-agent selections made through the Agents Window picker were not reported by
chat.modeChange. Agent Host execution-mode transitions also lacked a consistent VS Code-owned event.After
chat.modeChangeagentHost.executionModeChangedsession.mode.changedchat.modeChangeRetains the picker-oriented shape:
fromModemoderequestCountstorageextensionIdtoolsCounthandoffsCountisClaudeAgentCustom-agent names retain their existing privacy treatment.
agentHost.executionModeChangedReports:
provideragentSessionIdisSubagentSessionpreviousModenewModeturnCountRepeated SDK echoes of an already-applied mode transition remain suppressed.
Changes
chat.modeChangereporting into a shared helper.agentHost.executionModeChanged.Dashboard implications
chat.modeChangeremains a coherent user-selection event instead of mixing custom-agent and execution-mode value domains.chat.modeChangerows.agentHost.executionModeChanged; they remain distinguishable byprovider,agentSessionId, andisSubagentSession.Validation
mainincopilotAgentSession.ts,copilotSystemNotification.ts, andfixtureUtils.ts.