github / github/copilot-cli

Plugin skills installed by sessionStart hooks are not available in the current session

Open
#1,855 0 comments 0 reactions 0 assignees View on GitHub
area:installation area:plugins area:sessions
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

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

1. Create .github/hooks/hooks.json with a sessionStart hook that installs plugins:
```json
{
"version": 1,
"hooks": {
"sessionStart": [{
"type": "command",
"bash": "copilot plugin marketplace add owner/repo; copilot plugin install my-plugin@my-marketplace",
"cwd": ".",
"timeoutSec": 120
}]
}
}
```
2. Start a new copilot session and send a message
3. Hook logs confirm success: Plugin "my-plugin" installed successfully. Installed 4 skills.
4. Run /skills reload
5. 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:
1. **Automatically re-scan plugins/skills after sessionStart hooks complete** — hooks exist precisely for session setup like installing plugins
2. **Have /skills reload also re-read installed_plugins from config.json** and load newly added plugin skills
3. **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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.