Skip to content

Fix first plugin skill completion - #333854

Draft
Paul (pwang347) wants to merge 2 commits into
mainfrom
fix/333203-first-plugin-skill
Draft

Fix first plugin skill completion#333854
Paul (pwang347) wants to merge 2 commits into
mainfrom
fix/333203-first-plugin-skill

Conversation

@pwang347

@pwang347 Paul (pwang347) commented Sep 1, 2026

Copy link
Copy Markdown
Member

Summary

  • route agent-host skill completion discovery through the existing serialized session customization publisher
  • ensure SessionCustomizationsChanged is emitted before the completion response can reach the workbench
  • add a regression test covering a newly discovered custom plugin skill

Fixes #333203

Verification

The regression test demonstrates the ordering bug directly: before the fix the skill completion is returned, but SessionState.customizations is still undefined.

Without the fix

AgentService (node dispatcher)
  1) publishes a newly discovered skill before returning its completion

0 passing
1 failing

actual:
  items: ['/dummy:print-hello-world ']
  published: undefined

With the fix

AgentService (node dispatcher)
  ✔ publishes a newly discovered skill before returning its completion

1 passing

Related tests

AgentHostSkillCompletionProvider: 19 passing
AgentSideEffects customization tests: 16 passing

UI verification

Launched Code - OSS Dev from this PR branch with the minimal plugin from #333203 and a fresh Copilot chat. On the first attempt, completion returned /dummy:print-hello-world; accepting it immediately produced the recognized blue skill token shown below. The DOM assertion independently confirmed ced-chat-dynamic-variable-1 and ced-chat-session-clickable-text-1 on the token with color rgb(133, 182, 255).

First plugin skill is recognized on first use

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 1, 2026 20:01

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.

Copilot review overview

🟢 Approval recommended

The focused ordering fix is consistent with existing publication logic and has direct regression coverage.

Review tier: Balanced
Findings: None

What changed in this PR

Routes skill completion discovery through serialized customization publishing, ensuring new skills reach session state before completion results.

Changes:

  • Exposes an awaitable customization refresh path.
  • Uses it for skill completions.
  • Adds regression coverage for first-use plugin skills.
File Description
agentSideEffects.ts Returns resolved customizations from serialized publication.
agentService.ts Connects completions to the publisher.
agentHostSkillCompletionProvider.ts Supports injected customization resolution.
agentService.test.ts Verifies publication precedes completion.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 342383b8-789f-4236-ae1b-a108d68e5a59
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.

First usage of skill command from agent plugin is not recognized

2 participants