Skip to content

agentHost: Emit initiator client type in CTS telemetry - #328074

Merged
roblourens merged 2 commits into
mainfrom
roblou/agents/emit-initiatorclienttype-value
Jul 30, 2026
Merged

roblourens merged 2 commits into
mainfrom
roblou/agents/emit-initiatorclienttype-value

Conversation

@roblourens

Copy link
Copy Markdown
Member

Summary

  • include initiatorClientType on the existing standard CTS skillContentRead event
  • add the same attribution to enhanced/internal skill, auto-mode, and repository-info telemetry
  • preserve the initiating client across asynchronous repository-info begin/end capture

Validation

  • npm run compile-client
  • focused Agent Host telemetry unit tests
  • npm run precommit

Follow-up to #327417.

(Written by Copilot)

Propagate the initiating AHP client type to skill, auto-mode, and repository-info telemetry, including standard CTS skill events. (Written by Copilot)

Co-authored-by: Copilot <[email protected]>
Copilot AI review requested due to automatic review settings July 29, 2026 18:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Adds initiator client attribution (initiatorClientType) to agent host CTS/restricted telemetry so events can be attributed to the originating UI client (e.g., editor vs agents window), including across async repo-info begin/end reporting.

Changes:

  • Plumbs clientType through session turn state and repo-info telemetry begin/end to preserve initiator across async capture.
  • Emits initiatorClientType on auto-mode routing, repo-info, and skill-content-read telemetry (including standard GH telemetry for skillContentRead).
  • Updates unit tests and test telemetry service to assert/record the new property.
Show a summary per file
File Description
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Captures current turn client type and carries it through skill/auto-mode/repo-info telemetry.
src/vs/platform/agentHost/node/agentHostTelemetryReporter.ts Adds initiatorClientType into emitted telemetry payloads and extends report shapes with clientType.
src/vs/platform/agentHost/node/agentHostRepoInfoTelemetry.ts Threads clientType through repo-info capture/report path so begin/end can include initiator attribution.
src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts Updates session telemetry assertions to include initiatorClientType.
src/vs/platform/agentHost/test/node/agentHostTelemetryReporter.test.ts Extends test telemetry service to record standard GH events and asserts initiatorClientType across sinks.
src/vs/platform/agentHost/test/node/agentHostRepoInfoTelemetry.test.ts Updates repo-info telemetry tests to pass/verify clientType.

Review details

  • Files reviewed: 6/6 changed files
  • Comments generated: 3
  • Review effort level: Low

Cache the initiating client type with the begin capture so repository telemetry always attributes begin and end consistently. (Written by Copilot)

Co-authored-by: Copilot <[email protected]>
@roblourens
roblourens marked this pull request as ready for review July 30, 2026 00:14
@roblourens
roblourens enabled auto-merge (squash) July 30, 2026 00:14
@roblourens
roblourens merged commit 21a32c8 into main Jul 30, 2026
29 checks passed
@roblourens
roblourens deleted the roblou/agents/emit-initiatorclienttype-value branch July 30, 2026 00:23
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 30, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Sep 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants