Skip to content

Directory-source marketplace: cached marketplace.json not refreshed on update, so plugin version stays stale #72616

Description

@ZackWaveXR

Directory-source marketplace: plugin version shown in the marketplace never updates (cached marketplace.json not refreshed)

Summary

For a marketplace registered with source: directory, updating the marketplace does not refresh the cached copy of the marketplace's marketplace.json. As a result, the marketplace browser keeps reporting a stale plugin version indefinitely, even after the source directory's marketplace.json has been bumped and an in-app "update" has been run (which reports success).

The installed plugin itself can still be updated to the newer version, so this is specifically a stale-metadata / cache-invalidation bug in how directory-source marketplaces are refreshed — not a problem with installing the plugin.

Environment

  • Claude Code: 2.1.197
  • Node: v22.19.0
  • OS: Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 (WSL2 on Windows)
  • Marketplace source type: directory (local path)

Repro

  1. Register a marketplace from a local directory:
    // ~/.claude/plugins/known_marketplaces.json
    "my-marketplace-local": {
      "source": { "source": "directory", "path": "/path/to/marketplace" },
      "installLocation": "~/.claude/plugins/marketplaces/my-marketplace-local"
    }
  2. Install a plugin from it (e.g. my-plugin at 0.3.0).
  3. In the source directory, bump that plugin's version in .claude-plugin/marketplace.json (e.g. 0.3.00.4.0). (In our case this happened across two bumps: 0.3.00.3.10.4.0.)
  4. Run the in-app marketplace update for my-marketplace-local.

Expected

The marketplace browser shows my-plugin at the new version (0.4.0), matching the source directory's marketplace.json.

Actual

The marketplace browser keeps showing the old version (0.3.0). The update reports success but the displayed version never changes across repeated update attempts.

Root cause (observed)

Claude Code maintains a cached copy of the marketplace manifest at:

~/.claude/plugins/marketplaces/<name>/.claude-plugin/marketplace.json

The marketplace browser reads this cached copy, but for a directory source the update flow never re-copies it from the source path. Concrete evidence from our install:

  • known_marketplaces.jsonwave-marketplace-local.lastUpdated = 2026-06-30T22:07:50Z (an update clearly ran).
  • The cached marketplaces/wave-marketplace-local/.claude-plugin/marketplace.json was last modified 2026-05-20 19:55 and still contained "version": "0.3.0" for the plugin.
  • The source /mnt/d/Git/wave-marketplace/.claude-plugin/marketplace.json contained "version": "0.4.0".
  • installed_plugins.json and cache/wave-marketplace-local/<plugin>/0.4.0/ showed the plugin was installed at 0.4.0.

So: the lastUpdated timestamp is bumped on update, but the cached marketplace.json (the file the listing UI reads) is never rewritten for a directory source. Contrast with github-source marketplaces, where the cached manifest is refreshed via git pull and stays current.

Workaround

Manually overwrite the cached manifest from the source, then restart Claude Code:

cp /path/to/marketplace/.claude-plugin/marketplace.json \
   ~/.claude/plugins/marketplaces/<name>/.claude-plugin/marketplace.json

After this the browser shows the correct version.

Suggested fix

On marketplace update for a source: directory marketplace, re-copy .claude-plugin/marketplace.json (and any other manifest assets) from the source path into the cached installLocation, the same way github sources are re-pulled. Bumping lastUpdated without rewriting the cached manifest is what produces the silent, persistent staleness.

Related issues

Notes

  • The directory source is on a Windows drive mounted into WSL2 (/mnt/d/...); unclear whether the mount is relevant, but flagging it for completeness.
  • The plugin installing correctly to 0.4.0 while the listing showed 0.3.0 confirms install and listing read from different sources (live source vs. stale cached manifest).

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions