Skip to content

Emit agentSkillsFound telemetry from Agent Host - #325039

Draft
Aaron Munger (amunger) wants to merge 1 commit into
mainfrom
aamunger/ah-agentSkillsFound
Draft

Emit agentSkillsFound telemetry from Agent Host#325039
Aaron Munger (amunger) wants to merge 1 commit into
mainfrom
aamunger/ah-agentSkillsFound

Conversation

@amunger

Copy link
Copy Markdown
Collaborator

uses the SDK's session.skills_loaded, and adds AH discriminator fields (provider, agentSessionId, isSubagentSession)

Subscribes to the SDK's session.skills_loaded event and emits an

agentSkillsFound event under the workbench kind so existing dashboards

keep working when we swap to the Agent Host.

Adds AH discriminator fields (provider, agentSessionId, isSubagentSession)

so rows can be split from local emissions. Local per-source buckets that

the SDK does not distinguish (claudePersonal, claudeWorkspace,

githubWorkspace, agentsWorkspace, extensionAPI) and the skipped-file

counters (SDK only reports loaded skills) are intentionally omitted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 8, 2026 21: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

This PR adds agentSkillsFound telemetry emission from the Agent Host (Copilot CLI) side. It subscribes to the SDK's session.skills_loaded event and reports skill counts bucketed by source, mirroring local chat's emitter in promptsServiceImpl.ts but carrying only the subset of fields derivable from the SDK's skill list, plus Agent Host discriminator fields (provider, agentSessionId, isSubagentSession) so AH rows can be distinguished from local rows.

Changes:

  • Adds an onSkillsLoaded event getter to CopilotSessionWrapper, following the existing memoized ??= this._sdkEvent(...) pattern.
  • Adds _subscribeForAgentSkillsFoundTelemetry() in CopilotAgentSession, wired during construction after the wrapper is registered, which maps SDK skill source values into telemetry buckets and emits agentSkillsFound.
  • Reuses the existing agentSkillsFound event name with a documented "semantic shift" for shared field names (vendor-specific workspace tiers and skip reasons are intentionally omitted).
Show a summary per file
File Description
src/vs/platform/agentHost/node/copilot/copilotSessionWrapper.ts Exposes a new memoized onSkillsLoaded event wrapping the SDK's session.skills_loaded.
src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Subscribes to onSkillsLoaded and emits agentSkillsFound telemetry with AH discriminator fields; imports AgentSession and isSubagentSession.

Note: I could not verify the SDK's SkillsLoadedSkill.source string-literal values against the switch cases (personal-copilot, personal-agents, plugin, project, inherited, custom, builtin), because the @github/copilot-sdk types are not vendored in this checkout. These would only be caught by compilation, and the telemetry reuses an existing event name with deliberately divergent field semantics — a GDPR/telemetry decision that benefits from human sign-off.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Medium

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.

2 participants