Refresh Claude marketplace cache and report setup failures honestly
Fixes #417.
Root cause
basecamp setup detects Claude Code, installs the agent skill, then shells out to claude plugin install basecamp@37signals. It first runs claude plugin marketplace add, but add no-ops on an already-registered marketplace — it does not refresh the cached metadata.
The transport itself was fixed upstream: basecamp/claude-plugins#7 (merged Jul 20) switched the basecamp plugin entry from the SSH github shorthand to an anonymous-HTTPS url source. But a user who registered the marketplace before that change keeps a stale cached entry declaring source: github, so claude plugin install still clones git@github.com:basecamp/basecamp-cli.git and dies with Permission denied (publickey) on machines without a GitHub SSH key.
Reproduced against a clean Claude home:
| Scenario | marketplace add (what setup runs) | plugin install |
|---|---|---|
| Clean home | caches source: url | succeeds over HTTPS ✓ |
Stale cache (source: github) | "already on disk" — no refresh | SSH clone → fails w/o key ✗ |
Stale cache + marketplace update | refreshes to source: url | succeeds over HTTPS ✓ |
Separately, the wizard printed "Setup complete!" even when the plugin step failed, hiding the failure behind a single easy-to-miss ✗.
Changes
- Refresh the marketplace cache before install. Add a best-effort
claude plugin marketplace update <name>after eachmarketplace addon the install paths (mirroring what the Codex path already does), so a stalesource: githubentry is replaced with the current HTTPSsource: urlfirst. Claude's own marketplace clone already falls back SSH→HTTPS, so the refresh works without a key. - Honest completion reporting.
wizardAgentsnow returns an explicit outcome that distinguishes a deliberate skip (still "complete") from a real failure ("incomplete"). When post-setup agent checks fail,showSuccessdrops "Setup complete!" for an honest headline, lists each failing step with its own agent-specific remediation hint (Claude vs Codex), and points tobasecamp doctor. Exit stays 0 (graceful degrade). The machine-output summary reflects the same status.
No CLI command/flag surface changes.
Tests
- Marketplace refresh asserted on both the reinstall and fresh-install non-interactive paths (via the existing stub-
claudeharness). - Pure-helper unit tests for
collectAgentIssues,statusFromOutcome,successHeadline, and the incompletewizardSummaryLinebranch — a declined setup stays complete; a real failure becomes incomplete.
bin/ci green.
Summary by cubic
Refreshes the Claude marketplace cache before plugin installs and reports setup results honestly with a bounded refresh and clear skip behavior. This avoids SSH clone failures for basecamp@37signals, catches leftover stale plugins, and gives actionable next steps.
-
Bug Fixes
- Run
claude plugin marketplace update 37signalsaftermarketplace addbefore everyplugin install(fresh installs and reinstalls, interactive and non-interactive). - Avoids stale
source: githubentries that forced SSH clones; installs now use HTTPS as intended. - Bound the marketplace refresh to 60s so a stalled clone can’t hang setup; install still proceeds if it times out.
- Re-check surviving stale plugin entries and mark the run incomplete if cleanup fails.
- Manual recovery hint now includes the
marketplace updatestep so copy-paste fixes don’t reproduce the SSH failure. - No CLI surface changes.
- Run
-
New Features
- Setup outcome is issue‑authoritative and based on a single post‑setup snapshot, so the headline and checklist never disagree.
- If the user skips agent setup, the summary shows “Coding agent setup skipped” instead of red checks; a skip remains “complete”.
- When issues remain, the banner reflects it and shows agent‑specific hints; it also points to
basecamp doctor. Machine output mirrors the status and exit code stays 0.