-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Plugin skills installed by sessionStart hooks are not available in the current session
Description
When a sessionStart hook installs plugins via copilot plugin install, the installed plugin skills are never made available to the current session. /skills reload does not pick them up either.
Steps to Reproduce
- Create .github/hooks/hooks.json with a sessionStart hook that installs plugins:
{
"version": 1,
"hooks": {
"sessionStart": [{
"type": "command",
"bash": "copilot plugin marketplace add owner/repo; copilot plugin install my-plugin@my-marketplace",
"cwd": ".",
"timeoutSec": 120
}]
}
}- Start a new copilot session and send a message
- Hook logs confirm success: Plugin "my-plugin" installed successfully. Installed 4 skills.
- Run /skills reload
- Observe: plugin_skill_count: 0 — no plugin skills are loaded
Root Cause
- Skills are loaded eagerly at process startup (e.g. skills_loaded at 18:36:32)
- sessionStart hooks fire lazily on the first user message (e.g. 18:37:24)
- The hook successfully installs plugins and updates config.json (with �nabled: true)
- Plugin skill files exist on disk at ~/.copilot/installed-plugins/ with valid SKILL.md files
- But the running CLI process never re-reads the plugin configuration
- /skills reload re-scans project/personal skills but does not re-read installed_plugins from config.json
Expected Behavior
After sessionStart hooks complete, newly installed plugin skills should be available in the current session. At minimum, /skills reload should re-read installed_plugins from config.json.
Suggested Fix
Either:
- Automatically re-scan plugins/skills after sessionStart hooks complete — hooks exist precisely for session setup like installing plugins
- Have /skills reload also re-read installed_plugins from config.json and load newly added plugin skills
- Defer skills loading until after sessionStart hooks have completed (may impact perceived startup latency)
Workaround
Start a second session after the first one. Since the plugins are now in config.json, they will be discovered at process startup in subsequent sessions.
Environment
- Copilot CLI: 0.0.422-1
- OS: Windows 11
- Node.js: v24.11.1
Reactions are currently unavailable