Skip to content

[1.145] agentHost: retain SDK conversation IDs in restricted telemetry - #345688

Merged
Aaron Munger (amunger) merged 1 commit into
release/1.145from
amunger/release-1.145-sdk-correlation
Nov 3, 2026
Merged

Aaron Munger (amunger) merged 1 commit into
release/1.145from
amunger/release-1.145-sdk-correlation

Conversation

@amunger

@amunger Aaron Munger (amunger) commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

cherry pick #345609 to add sdk session ID field for correlating telemetry within a chat thread

* agentHost: retain SDK conversation IDs in restricted telemetry

Preserve the producing SDK session and child identities on restricted engine snapshots and carry the SDK session ID on host text/tool events. Keep host conversation fields independent and require no new runtime context API.

Co-authored-by: Copilot <[email protected]>

* agentHost: test SDK correlation at the event producer boundary

Use distinct host and SDK session IDs in the existing wrapper-driven telemetry regression so omitting or misattributing any text/tool SDK ID fails the test.

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
(cherry picked from commit 3b3bea4)
Copilot AI balanced review requested due to automatic review settings November 2, 2026 23:18

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.

🔵 Needs a closer look

The backport has not been built or exercised against release/1.145’s pinned Copilot SDK, leaving telemetry/session and wrapper compatibility unverified by main-branch results.

No open issues 🎉

What changed in this PR

Backports #345609 to release/1.145, preserving Copilot SDK conversation identity in Agent Host restricted telemetry without changing existing host identifiers or consent controls.

Changes:

  • Retains sdkSessionId on engine snapshots and host text/tools events, plus sdkAgentId on child engine calls.
  • Adds regression coverage for identity propagation, missing IDs, and restricted upload envelopes.
  • Documents correlation semantics and the separate downstream retention requirements.

No actionable findings remain. Release-branch tests remain unverified because the prerequisite build was blocked by an installed SDK version mismatch.

File Description
src/​vs/​platform/​agentHost/​test/​node/​copilotAgentSession.test.ts Verifies SDK identity propagation through event callbacks.
src/​vs/​platform/​agentHost/​test/​node/​agentHostTelemetryReporter.test.ts Covers independent SDK identity and missing-ID behavior.
src/​vs/​platform/​agentHost/​test/​node/​agentHostGitHubTelemetryRouter.test.ts Covers authoritative IDs, child identities, and upload envelopes.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgentSession.ts Passes the emitting wrapper’s SDK ID to telemetry reporters.
src/​vs/​platform/​agentHost/​node/​agentHostTelemetryReporter.ts Adds optional SDK identity to restricted text/tools events.
src/​vs/​platform/​agentHost/​node/​agentHostGitHubTelemetryRouter.ts Retains notification identities and declares telemetry classifications.
src/​vs/​platform/​agentHost/​AGENTS.md Documents identity semantics and downstream retention boundaries.

Review effort: Balanced

Copilot AI commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Setup pnpm

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

@amunger
Aaron Munger (amunger) marked this pull request as ready for review November 2, 2026 23:36
@amunger
Aaron Munger (amunger) merged commit a11bd0b into release/1.145 Nov 3, 2026
55 of 56 checks passed
@amunger
Aaron Munger (amunger) deleted the amunger/release-1.145-sdk-correlation branch November 3, 2026 01:19
@vs-code-engineering vs-code-engineering Bot added this to the 1.145.0 milestone Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants