github / github/copilot-cli

Plugin marketplace cache ignores  ref  when shared across projects with different branches

Open
#4,513 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:plugins
Dominant language
Shell
Stars
11.2k
Forks
1.9k
Avg merge
14h 16m
Merged PRs (30d)
6

Description

Describe the bug

When two projects reference the same git-based marketplace source but pin different  ref  values (branches) in  .github/copilot/settings.json 's  extraKnownMarketplaces , Copilot CLI reuses a single on-disk cache checkout keyed only by the source URL/path — not by  ref . Opening a project that expects  branch1  does not re-checkout the cache to  branch1  if it was last left on  branch2  by another project.

Affected version

Copilot CLI 1.0.80

Steps to reproduce the behavior
  1. Create marketplace repo with  branch1  and  branch2 , differing plugin content.
  2. Project A's  .github/copilot/settings.json  sets  extraKnownMarketplaces..source.ref = "branch2" . Open Copilot CLI there — cache clones/checks out  branch2 .
  3. Project B (different repo) sets  ref = "branch1"  for the same marketplace source URL. Open Copilot CLI there.
  4. Expected: cache checks out  branch1  before loading plugins for Project B.
  5. Actual: cache in  %LOCALAPPDATA%\copilot\marketplaces<hash-of-source>  remains on  branch2 ; Project B silently loads branch2's plugins instead of branch1's.
Expected behavior

When a project's  .github/copilot/settings.json  specifies a  ref  (branch/tag/commit) for an  extraKnownMarketplaces  entry, Copilot CLI should ensure the local cache reflects that exact  ref  before loading plugins for that session — regardless of what  ref  was last checked out there by a different project sharing the same source URL.

Additional context

Suggested fix (from copilot lol): Include  ref  in the cache key/path, or verify+checkout the requested  ref  on every load regardless of cache state.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the two-project case using .github/copilot/settings.json with the shared git source pinned to branch1 and branch2, then inspect the checkout under %LOCALAPPDATA%\copilot\marketplaces<hash-of-source>. Done when each project loads plugins from its requested ref regardless of which project used the cache previously, with regression coverage for the shared-cache scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.