Agents Window: manifest-declared nested plugin skills appear in plugin details but not in Skills
# Agents Window: manifest-declared nested plugin skills appear in plugin details but not in Skills Does this issue occur when all extensions are disabled?: Not tested. Report Issue' dialog can assist with this. --> - VS Code Version: 1.145.0-insider, commit `206844b5537c1b7582f6e81b41e1c5402c7e7fbc`, x64 - OS Version: Windows x64, build 26300 - Surface: Agents Window, Copilot CLI harness, Customizations - Plugin: `mattpocock-skills` version 1.3.2 from https://github.com/mattpocock/skills Steps to Reproduce: 1. Install `mattpocock-skills` through Copilot CLI, using `copilot plugin marketplace add mattpocock/skills` and `copilot plugin install mattpocock-skills@mattpocock`. This reproduction used the resulting installation under `~/.copilot/installed-plugins/mattpocock/mattpocock-skills`. 2. In the VS Code Insiders Agents Window, open Customizations, then Plugins. 3. Open `mattpocock-skills`. Its details show **27 skills**, including `improve-codebase-architecture`. 4. Select Skills and search for `improve-codebase-architecture`. 5. Observe **No items match 'improve-codebase-architecture'**. 6. Search for another skill from this plugin, such as `diagnosing-bugs`. It is also missing. ## Expected Skills declared by the installed, enabled plugin should appear in the Skills section, consistent with the plugin details and Agent Host inventory. ## Actual The plugin details list 27 skills, but the Agent Host customization item provider expands this plugin to zero items. This affects the plugin's entire nested skill layout, not just `improve-codebase-architecture`. ## Diagnostic evidence Reproduced against the running Insiders window using DBGJS, with Playwright driving the actual Customizations UI. - A live UI assertion failed because searching for `improve-codebase-architecture` produced zero matching skill rows and the explicit empty-state message. - The live `AgentCustomizationItemProvider._expansionCache` contained the Matt Pocock plugin with **zero children**. Other installed plugins using a flat `skills/ /SKILL.md` layout had nonzero children. - A controlled diagnostic passed the real `skills/engineering` directory entries to the same production `collectFromSkillDir` method. It returned **20 skills**, including `improve-codebase-architecture`. No installed files or plugin metadata were changed. - AHP logs from 2026-10-29 show `session/customizationUpdated` publishing the plugin as `load: { kind: "loaded" }` with **27 children** at **17:22:41.881 UTC**. Those children include a skill named `improve-codebase-architecture` with `disableModelInvocation: true` and no `disableUserInvocation` restriction. - The normal Agent Host log records the plugin being synchronized successfully, and subsequently records invocation of the sibling `diagnosing-bugs` skill from its nested directory. The `disable-model-invocation: true` frontmatter is not the reason for the omission: the UI's shallow scan never reaches this skill file, and other plugin skills without that flag are also absent. ## Root cause There are inconsistent discovery paths: 1. Plugin details use `plugin.skills.get()`. `AgentPluginService` resolves the plugin manifest's `skills` entries through `resolvePluginComponentDirs` and `readPluginSkills`. This plugin explicitly declares paths such as `./skills/engineering/improve-codebase-architecture`, so that path discovers the skills correctly. 2. For plugin customizations, `AgentCustomizationItemProvider.provideChatSessionCustomizations` expands the plugin directory instead of projecting its already-published typed `children`. 3. `AgentCustomizationContentExpander.expandPluginContents` scans fixed canonical directories, including ` /skills`. Its `collectFromSkillDir` checks only each immediate child for `SKILL.md`; it neither resolves manifest-declared skill paths nor descends into category directories. 4. For this plugin, the immediate children are `engineering` and `productivity`. The scanner therefore attempts to read `skills/engineering/SKILL.md` and `skills/productivity/SKILL.md`, rather than the actual `skills/ / /SKILL.md` files. 5. `readPromptMetadata` treats these missing files as expected file-access failures and returns no metadata without logging an error. Both category folders are skipped, producing zero items. The expansion result is cached by plugin URI, nonce, and label. Later publication of the correct typed children does not repair the result because plugin item rendering still consumes the filesystem expansion. Relevant source at the reproduced build: - [Plugin details read the installed plugin's skills](https://github.com/microsoft/vscode/blob/206844b5537c1b7582f6e81b41e1c5402c7e7fbc/src/vs/workbench/contrib/chat/browser/aiCustomization/embeddedAgentPluginDetail.ts#L777) - [Manifest-aware plugin discovery](https://github.com/microsoft/vscode/blob/206844b5537c1b7582f6e81b41e1c5402c7e7fbc/src/vs/workbench/contrib/chat/common/plugins/agentPluginServiceImpl.ts#L379) - [Agent Host UI provider expands plugin directories](https://github.com/microsoft/vscode/blob/206844b5537c1b7582f6e81b41e1c5402c7e7fbc/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationItemProvider.ts#L310) - [Fixed-directory and single-level skill scanning](https://github.com/microsoft/vscode/blob/206844b5537c1b7582f6e81b41e1c5402c7e7fbc/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.ts#L30) - [Missing skill metadata is silently skipped](https://github.com/microsoft/vscode/blob/206844b5537c1b7582f6e81b41e1c5402c7e7fbc/src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentCustomizationContentExpander.ts#L191) ## Suggested fix and regression coverage Prefer consuming the Agent Host's published typed plugin children, preserving their metadata and enablement semantics. Where filesystem expansion is still necessary, use the shared format/manifest-aware plugin parsers rather than maintaining a separate shallow discovery implementation. Add focused coverage for manifest-declared `skills/ / /SKILL.md` paths, a plugin whose published children are populated after its initial loaded notification, and a user-invocable skill with `disable-model-invocation: true`. Preserve the existing flat-layout behavior. ## Related report [#328927](https://github.com/microsoft/vscode/issues/328927) describes the same nested-layout omission. It was closed as completed on 2026-09-28, but this reproduction demonstrates that the behavior is still present in the build above. Whether it persisted continuously or was reintroduced has not been established. ## Investigation limits No product changes were made, no automated repository test suite was run, and the extension-disabled scenario was not tested. The UI failure and production-parser comparison were exercised live. Temporary DBGJS breakpoint instrumentation and renderer globals were removed. Full logs are intentionally not attached because they contain unrelated session content and local paths.