claude-code - 💡(How to fix) Fix Stale officialMarketplaceAutoInstallFailReason causes permanent "Failed to install Anthropic marketplace" banner when marketplace is already installed

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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).

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,
  });
}

Fix Action

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.

Code Example

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

---

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

---

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

---

} 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,
  });
}
RAW_BUFFERClick to expand / collapse

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.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING