github / github/copilot-cli

[Bug] autoUpdate on extraKnownMarketplaces entry does not trigger plugin update at session start

Đang mở
#4,465 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

area:configuration area:plugins
Ngôn ngữ chính
Shell
Star
11.2k
Fork
1.9k
Merge trung bình
14 giờ 16 phút
Pull request đã merge (30 ngày)
6

Mô tả

Describe the bug

The changelog for 1.0.79 documents:

Set "autoUpdate": true on an extraKnownMarketplaces entry in your user settings to auto-update its plugins at session start

This does not happen. With autoUpdate: true set on an extraKnownMarketplaces entry and an installed plugin from that marketplace deliberately pinned to an older version (both in ~/.copilot/config.json and the cached .plugin/plugin.json/.claude-plugin/plugin.json), starting a brand-new CLI session (full process relaunch, not /restart) does not check for or apply an update. No log line referencing a plugin/marketplace update check appears anywhere in the session's debug log at startup.

Separately, when the update mechanism is triggered manually (copilot plugin update <name>), it worked correctly once a Windows file-lock (held by lingering VS Code / github-copilot-sdk background processes on the shared ~/.copilot/installed-plugins cache) was cleared. That confirms the underlying reinstall codepath is functional — the gap is specifically that automatic checking/triggering at session start never occurs, and (separately) that a locked-file failure during any such attempt would fail silently with no user-visible warning.

Steps to reproduce
  1. In user settings (~/.copilot/settings.json or via /settings), add/confirm an extraKnownMarketplaces entry with "autoUpdate": true, e.g.:
    "extraKnownMarketplaces": {
      "my-marketplace": {
        "source": { "source": "git", "url": "https://example.com/my-org/my-plugins" },
        "autoUpdate": true
      }
    }
    
  2. Have a plugin from that marketplace installed and enabled (e.g. version 0.2.0).
  3. Manually edit ~/.copilot/config.json (installedPlugins[].version) and the plugin's cached manifest (~/.copilot/installed-plugins/<marketplace>/<plugin>/.claude-plugin/plugin.json version field) down to an older version (e.g. 0.1.0), leaving source_sha untouched.
  4. Fully quit the CLI process (not /restart — a true new process launch) and start copilot again.
  5. Inspect ~/.copilot/config.json and the cached plugin.json again, and check ~/.copilot/logs/process-*.log for the new session for any plugin/marketplace update activity.
Expected behavior

On session start, the CLI should detect the installed plugin version is behind the marketplace's current version and automatically reinstall/update it (per the documented 1.0.79 changelog entry), updating config.json, the cached manifest, and installed_at.

Actual behavior
  • The plugin version in config.json and the cached manifest remains at the older pinned version after a full CLI relaunch.
  • installed_at timestamp is unchanged, confirming no reinstall attempt occurred.
  • The startup debug log shows no entries related to checking plugin/marketplace versions or auto-updating — it goes directly from initialization to loading/activating the existing cached plugins:
    ...Init suggestion check completed
    ...Loaded MCP config from installed plugins: 3 server(s): ...
    ...Plugin activation [agents]: fingerprint=..., plugins=11, loaded=14
    
  • Running copilot plugin update <plugin-name> manually does work once file locks are cleared, confirming the reinstall codepath itself is functional — it's just never invoked automatically at session start as documented.
Environment
  • GitHub Copilot CLI: 1.0.79
  • OS: Windows 11
  • Node.js: v24.18.1
  • Marketplace: private git-hosted extraKnownMarketplaces entry with autoUpdate: true
Additional context

While testing this, we also observed that a Windows file-lock on the shared ~/.copilot/installed-plugins/<marketplace>/<plugin> cache directory (held by lingering github-copilot-sdk background processes, e.g. from VS Code's Copilot extension) causes a manual copilot plugin update <plugin> to fail with Failed to install plugin: Access is denied. (os error 5). If the same lock were encountered during an automatic session-start check, it would likely fail silently with no user-facing message — worth surfacing a warning/error in that case rather than no-op.


🤖 This issue was drafted with assistance from GitHub Copilot CLI.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu với đường dẫn khởi động phiên tải extraKnownMarketplaces và so sánh nó với lệnh copilot plugin update . Tái hiện bằng cách sử dụng ~/.copilot/config.json, các tệp plugin.json được lưu trong bộ nhớ đệm bên dưới ~/.copilot/installed-plugins và nhật ký gỡ lỗi phiên. Được xem là hoàn tất khi việc khởi chạy lại toàn bộ cập nhật siêu dữ liệu plugin và installed_at, trong khi các lỗi như khóa tệp Windows tạo ra cảnh báo hiển thị rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
node.js
Lĩnh vực
cli, tooling
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.