github / github/copilot-cli

plugin marketplace add reports success but registration is not persisted (browse immediately fails with 'not found')

Đang mở
#4,247 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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

`copilot plugin marketplace add` reports success, but the marketplace registration is never persisted anywhere on disk. A subsequent `copilot plugin marketplace list` (even in the same command chain / immediately after) does not show the newly added marketplace, and `copilot plugin marketplace browse ` fails with `Marketplace "" not found`.

This reproduces both for a **local directory** marketplace and a **GitHub-hosted** marketplace, so it does not appear to be specific to local-path or git-auth handling (unlike #4103).

### Environment

- GitHub Copilot CLI: 1.0.74 (latest at time of filing)
- OS: Windows 11 (PowerShell 7 / native)
- Marketplace manifest: valid `.claude-plugin/marketplace.json` at repo root (per docs, this location is supported)

### Steps to reproduce

```powershell
# Local directory marketplace with a valid .claude-plugin/marketplace.json
copilot plugin marketplace add C:\Git\Agentic
copilot plugin marketplace list
copilot plugin marketplace browse company-skills
```

```powershell
# Also reproduces with a GitHub-hosted marketplace
copilot plugin marketplace add anthropics/claude-code
copilot plugin marketplace list
```

### Actual result

```
Marketplace "company-skills" added successfully.
```
...but `copilot plugin marketplace list` afterward only shows the two built-in marketplaces:
```
Included with GitHub Copilot:
- copilot-plugins (GitHub: github/copilot-plugins)
- awesome-copilot (GitHub: github/awesome-copilot)
```
And:
```
Fetching plugins from marketplace "company-skills"...
Failed to browse marketplace: Error: Marketplace "company-skills" not found
```

[repro-marketplace.zip](https://github.com/user-attachments/files/30352224/repro-marketplace.zip)

Confirmed via `Compare-Object` of a full recursive file listing under `~/.copilot`, `%LOCALAPPDATA%`, and `%APPDATA%` before/after running `add` — **no files are created or modified** anywhere as a result of the command, despite the CLI reporting success.

### Expected result

`copilot plugin marketplace add` should persist the marketplace registration so that a subsequent `list`/`browse` in a new process reflects it, matching the documented behavior in https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-finding-installing.

### Additional context

Possibly related to #3403 (`~/.copilot/config.json` being overwritten/reset on session start, dropping previously-written keys like `hooks`) — if marketplace registrations are also expected to live in `config.json`, the same overwrite-on-start bug could explain why the registration never survives past the single `add` invocation.

--- *This report was investigated and drafted by GitHub Copilot CLI (Claude Sonnet 5).*

Additional notes: name of marketplace changed for to company-skills. Additional details

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

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

Hướng nghiên cứu

Bắt đầu từ các điểm vào CLI cho `plugin marketplace add`, `list` và `browse`, sau đó kiểm tra vị trí lưu trữ bền vững, bao gồm đường dẫn có thể là `~/.copilot/config.json` và manifest `.claude-plugin/marketplace.json`. Tái hiện với cả các ví dụ trong thư mục cục bộ và các ví dụ được lưu trữ trên GitHub; được coi là hoàn tất khi đăng ký vẫn tồn tại qua một tiến trình mới và xuất hiện trong `list` và `browse`.

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

Đánh giá

Công nghệ
github, powershell, shell
Lĩnh vực
cli
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
52/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.