Stale officialMarketplaceAutoInstallFailReason causes permanent "Failed to install Anthropic marketplace" banner when marketplace is already installed

Resolved 💬 3 comments Opened May 16, 2026 by IanVand Closed May 19, 2026

Summary

On every startup, Claude Code shows the orange notification "Failed to install Anthropic marketplace · Will retry on next startup" even though the official marketplace is installed and healthy (~/.claude/plugins/marketplaces/claude-plugins-official is a working sparse git checkout, fetches cleanly from origin, valid marketplace.json, listed in ~/.claude/plugins/known_marketplaces.json).

Repro

  1. Hit a transient install failure once (e.g. brief git/network blip during a retry attempt) — this writes officialMarketplaceAutoInstallFailReason: "unknown" plus retry-count/timestamps into ~/.claude.json.
  2. On a later startup, the marketplace successfully installs via the GCS-cached path.
  3. From then on, the user-facing notification fires on every subsequent startup — until the user manually edits ~/.claude.json.

Root cause

The auto-installer (Ic_ in the bundled CLI) has two success branches.

The git-fallback success branch correctly clears the failure bookkeeping:

// git-fallback success — correct
a8(z => ({
  ...z,
  officialMarketplaceAutoInstallAttempted: true,
  officialMarketplaceAutoInstalled: true,
  officialMarketplaceAutoInstallFailReason: void 0,
  officialMarketplaceAutoInstallRetryCount: void 0,
  officialMarketplaceAutoInstallLastAttemptTime: void 0,
  officialMarketplaceAutoInstallNextRetryTime: void 0,
}));

The GCS success branch (taken when W28(K, $) returns non-null) only flips two fields and leaks the prior failure state:

// GCS success — leaks stale failure state
a8(Y => ({
  ...Y,
  officialMarketplaceAutoInstallAttempted: true,
  officialMarketplaceAutoInstalled: true,
}));

If a previous attempt set officialMarketplaceAutoInstallFailReason: "unknown" (plus a retry count and timestamps), those fields stay in ~/.claude.json forever. On startup, the gate gtA() short-circuits to false (because officialMarketplaceAutoInstalled === true), and Ic_ early-returns:

let q = H.officialMarketplaceAutoInstallFailReason ?? "already_attempted";
return { installed: false, skipped: true, reason: q };

Because of the ?? fallback, reason is the stale "unknown" instead of "already_attempted". The notifier then unconditionally renders:

} else if (H.skipped && H.reason === "unknown") {
  push({
    key: "marketplace-install-failed",
    text: "Failed to install Anthropic marketplace · Will retry on next startup",
    color: "warning",
    priority: "immediate",
    timeoutMs: 8000,
  });
}

Suggested fix

Either of these would resolve it:

  • (preferred) Mirror the git-fallback success branch — clear FailReason / RetryCount / LastAttemptTime / NextRetryTime in the GCS success branch as well.
  • (defensive) Have gtA() and Ic_'s early-return treat officialMarketplaceAutoInstalled === true as "already_installed" regardless of any leftover failure fields, so a stale FailReason can't leak into the notifier path.

Workaround

Manually delete these four fields from ~/.claude.json (leave Attempted and Installed alone):

  • officialMarketplaceAutoInstallFailReason
  • officialMarketplaceAutoInstallRetryCount
  • officialMarketplaceAutoInstallLastAttemptTime
  • officialMarketplaceAutoInstallNextRetryTime

After this, the banner stops appearing on next startup.

Environment

  • Claude Code 2.1.143 (native installer)
  • Windows 11 Enterprise
  • Bedrock backend (CLAUDE_CODE_USE_BEDROCK=1)
  • Marketplace folder is healthy: clean sparse git checkout of anthropics/claude-plugins-official, valid .claude-plugin/marketplace.json, listed in known_marketplaces.json with a recent lastUpdated.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗