Skip to content

Refresh Claude marketplace cache and report setup failures honestly#555

Merged
jeremy merged 3 commits into
mainfrom
fix/plugin-install-https-fallback
Jul 22, 2026
Merged

Refresh Claude marketplace cache and report setup failures honestly#555
jeremy merged 3 commits into
mainfrom
fix/plugin-install-https-fallback

Conversation

@jeremy

@jeremy jeremy commented Jul 22, 2026

Copy link
Copy Markdown
Member

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 each marketplace add on the install paths (mirroring what the Codex path already does), 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.
  • Honest completion reporting. wizardAgents now returns an explicit outcome that distinguishes a deliberate skip (still "complete") from a real failure ("incomplete"). When post-setup agent checks fail, showSuccess drops "Setup complete!" for an honest headline, lists each failing step with its own agent-specific remediation hint (Claude vs Codex), and points to basecamp 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-claude harness).
  • Pure-helper unit tests for collectAgentIssues, statusFromOutcome, successHeadline, and the incomplete wizardSummaryLine branch — 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 37signals after marketplace add before every plugin install (fresh installs and reinstalls, interactive and non-interactive).
    • Avoids stale source: github entries 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 update step so copy-paste fixes don’t reproduce the SSH failure.
    • No CLI surface changes.
  • 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.

Written for commit cfd575f. Summary will update on new commits.

Review in cubic

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.
Copilot AI review requested due to automatic review settings July 22, 2026 20:11
@github-actions github-actions Bot added commands CLI command implementations tests Tests (unit and e2e) labels Jul 22, 2026
@github-actions github-actions Bot added the bug Something isn't working label Jul 22, 2026
Comment thread internal/commands/wizard_agents.go

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (complete vs incomplete) 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.

Comment thread internal/commands/wizard.go

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread internal/commands/wizard_agents.go
…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).
Copilot AI review requested due to automatic review settings July 22, 2026 20:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread internal/commands/wizard_agents.go

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread internal/commands/wizard.go Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
			}

Comment thread internal/commands/wizard.go Outdated
…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.
Copilot AI review requested due to automatic review settings July 22, 2026 21:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@jeremy
jeremy merged commit eb2f5e5 into main Jul 22, 2026
26 of 27 checks passed
@jeremy
jeremy deleted the fix/plugin-install-https-fallback branch July 22, 2026 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working commands CLI command implementations tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

basecamp init plugin install fails when GitHub SSH not configured (skill OK, plugin step bombs)

3 participants