copilot plugin update does not sync new version to config.json
Description
After running copilot plugin update <name>, the plugin files on disk are updated to the latest version (via git pull), but the version field in ~/.copilot/config.json is not updated — it still shows the version from the original install. This causes copilot plugin list to report a stale version.
Steps to Reproduce
- Install a plugin that has a
plugin.json with a version field:
copilot plugin install owner/repo
- Note the installed version:
copilot plugin list
# Shows: plugin-name@source (v1.0.0)
- Wait for the plugin to release a new version (e.g., v2.0.0)
- Update the plugin:
copilot plugin update plugin-name
# Reports success
- Check the reported version:
copilot plugin list
# Still shows: plugin-name@source (v1.0.0) <-- WRONG
- Check the actual installed version on disk:
cat ~/.copilot/installed-plugins/plugin-name/plugin-name/plugin.json | grep version
# Shows: "version": "2.0.0" <-- CORRECT
Observed Behavior
| Source |
Version |
~/.copilot/config.json installedPlugins[].version |
1.0.0 (stale — never updated after install) |
~/.copilot/installed-plugins/<name>/<name>/plugin.json |
2.0.0 (correct — updated by git pull) |
~/.copilot/installed-plugins/<name>/<name>/package.json |
2.0.0 (correct) |
git describe --tags --exact-match in installed clone |
v2.0.0 (correct) |
copilot plugin list |
v1.0.0 (wrong — reads config.json) |
Expected Behavior
After copilot plugin update, the version field in config.json should be updated to match the new version on disk. copilot plugin list should report the correct current version.
Real-World Example
Tested with msx-mcp plugin:
- Installed at
v0.12.1 — config.json records "version": "0.12.1"
- Updated to
v0.14.1 — all files on disk at 0.14.1, git HEAD at tag v0.14.1
copilot plugin list still shows v0.12.1
config.json still has "version": "0.12.1"
Suggested Fix
After the git pull/checkout operation in the update command completes, read the new version from the installed plugin.json (or package.json) and write it back to ~/.copilot/config.json.
Environment
- Copilot CLI: 1.0.40
- OS: Windows 11
- Shell: PowerShell 7
copilot plugin updatedoes not sync new version toconfig.jsonDescription
After running
copilot plugin update <name>, the plugin files on disk are updated to the latest version (viagit pull), but theversionfield in~/.copilot/config.jsonis not updated — it still shows the version from the original install. This causescopilot plugin listto report a stale version.Steps to Reproduce
plugin.jsonwith a version field:Observed Behavior
~/.copilot/config.jsoninstalledPlugins[].version~/.copilot/installed-plugins/<name>/<name>/plugin.json~/.copilot/installed-plugins/<name>/<name>/package.jsongit describe --tags --exact-matchin installed clonecopilot plugin listExpected Behavior
After
copilot plugin update, theversionfield inconfig.jsonshould be updated to match the new version on disk.copilot plugin listshould report the correct current version.Real-World Example
Tested with
msx-mcpplugin:v0.12.1— config.json records"version": "0.12.1"v0.14.1— all files on disk at0.14.1, git HEAD at tagv0.14.1copilot plugin liststill showsv0.12.1config.jsonstill has"version": "0.12.1"Suggested Fix
After the git pull/checkout operation in the update command completes, read the new version from the installed
plugin.json(orpackage.json) and write it back to~/.copilot/config.json.Environment