Refresh Claude marketplace cache and report setup failures honestly#555
Conversation
Fixes #417. Root cause: `basecamp setup` runs `claude plugin marketplace add` before installing the plugin, but `add` no-ops on an already-registered marketplace. Users who added the 37signals marketplace before its source metadata switched from the SSH `github` shorthand to an HTTPS `url` source (basecamp/claude-plugins#7) are left with a stale cache that makes `claude plugin install` clone via `git@github.com:` — which fails on machines without a GitHub SSH key. Separately, the wizard printed "Setup complete!" even when the plugin step failed. Refresh the cache with `claude plugin marketplace update <name>` before each install (mirroring the Codex path), so a stale `source: github` entry is replaced with the current HTTPS `source: url` first. Claude's own marketplace clone already falls back SSH→HTTPS, so the refresh works without a key. Report honestly: wizardAgents now returns an explicit outcome distinguishing a deliberate skip from a real failure. When agent checks fail after setup, the summary drops "Setup complete!" for an honest headline, lists each failing step with its own agent-specific remediation hint, and points to `basecamp doctor`. A user who declines agent setup still reads as complete.
There was a problem hiding this comment.
Pull request overview
This PR fixes setup failures when installing the Claude Code plugin from a stale marketplace cache (issue #417) by refreshing marketplace metadata before install, and it improves the setup wizard’s reporting so it no longer claims “Setup complete!” when agent/plugin setup steps actually failed.
Changes:
- Refresh Claude marketplace metadata via
claude plugin marketplace update 37signals(best-effort) before plugin installs, including reinstall and fresh-install non-interactive paths. - Make agent-setup return an explicit outcome (skipped vs issues) and propagate that into wizard status (
completevsincomplete) and the human/machine summaries. - Add unit tests for the new pure helpers and assertions that the marketplace refresh is invoked in relevant paths.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/commands/wizard.go | Makes the completion headline and summary reflect incomplete agent setup, and prints per-issue remediation hints. |
| internal/commands/wizard_agents.go | Adds marketplace refresh before Claude plugin install and returns structured agent-setup outcomes/issues for honest reporting. |
| internal/commands/wizard_test.go | Adds coverage for the new helper logic and asserts Claude marketplace refresh is invoked in non-interactive paths. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…tatus Address review follow-ups on the #417 fix: - Manual recovery hint now includes `claude plugin marketplace update`, so the copy-paste path also refreshes a stale cache instead of reproducing the SSH clone failure (marketplace add alone no-ops on an existing marketplace). - Completion status and the rendered checklist now derive from a single post-setup snapshot (snapshotAgentChecks) carried through the outcome, so a transient check can no longer make the headline and checklist disagree. - Status is issue-authoritative: any observed failure marks the run incomplete and Skipped no longer suppresses one. A deliberate skip records no issues, so it stays complete. - Tests: rendered showSuccess assertions (no "Setup complete!" on failure, agent-specific hint present, doctor pointer present); exact add → update → install ordering on both the non-interactive and interactive install paths; snapshot/issue helpers covered with supplied agents (no global registry mutation).
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7aa4588818
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
internal/commands/wizard.go:371
- The remediation list prefixes the agent name even though the check names already include it (e.g. “Codex — Codex Plugin”), which results in redundant output. Consider using the check name as-is here to keep the remediation lines concise.
label := issue.Check
if issue.Agent != "" {
label = issue.Agent + " — " + issue.Check
}
…ip UX
Address the next review round:
- Bound the marketplace refresh with a 60s child context so a stalled clone
can't hang setup; install still proceeds on timeout.
- Re-check stale plugin keys after handlers (claudeStaleIssues): a current-
plugin health check can pass while stale entries survive removal, which
previously still reported complete. Leftover stale keys now mark the run
incomplete.
- Skip renders coherently: a declined agent setup shows "Coding agent setup
skipped" instead of red failing checks under a "complete" headline.
- Remediation no longer double-names agents whose check already carries the
name ("Claude Code Plugin", not "Claude Code — Claude Code Plugin").
- Doc/comment accuracy: describe issues as snapshot failures plus standalone
setup failures; drop a stale step number.
- Tests: rendered skip-path summary; stale post-condition → incomplete; exact
add → update → install ordering on the reinstall path too.
Fixes #417.
Root cause
basecamp setupdetects Claude Code, installs the agent skill, then shells out toclaude plugin install basecamp@37signals. It first runsclaude plugin marketplace add, butaddno-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
basecampplugin entry from the SSHgithubshorthand to an anonymous-HTTPSurlsource. But a user who registered the marketplace before that change keeps a stale cached entry declaringsource: github, soclaude plugin installstill clonesgit@github.com:basecamp/basecamp-cli.gitand dies withPermission denied (publickey)on machines without a GitHub SSH key.Reproduced against a clean Claude home:
marketplace add(what setup runs)plugin installsource: urlsource: github)marketplace updatesource: urlSeparately, the wizard printed "Setup complete!" even when the plugin step failed, hiding the failure behind a single easy-to-miss
✗.Changes
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.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
claudeharness).collectAgentIssues,statusFromOutcome,successHeadline, and the incompletewizardSummaryLinebranch — a declined setup stays complete; a real failure becomes incomplete.bin/cigreen.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
claude plugin marketplace update 37signalsaftermarketplace addbefore everyplugin install(fresh installs and reinstalls, interactive and non-interactive).source: githubentries that forced SSH clones; installs now use HTTPS as intended.marketplace updatestep so copy-paste fixes don’t reproduce the SSH failure.New Features
basecamp doctor. Machine output mirrors the status and exit code stays 0.Written for commit cfd575f. Summary will update on new commits.