Skip to content

Recover from missing/stale claude-plugins-official on aitools install#6054

Closed
dustinvannoy-db wants to merge 4 commits into
databricks:mainfrom
dustinvannoy-db:dustinvannoy-db/fix-aitools-claude-marketplace-recovery
Closed

Recover from missing/stale claude-plugins-official on aitools install#6054
dustinvannoy-db wants to merge 4 commits into
databricks:mainfrom
dustinvannoy-db:dustinvannoy-db/fix-aitools-claude-marketplace-recovery

Conversation

@dustinvannoy-db

Copy link
Copy Markdown

What

When databricks aitools install installs the databricks plugin for Claude Code, the install can fail if the built-in claude-plugins-official marketplace is missing (the user removed it) or its local copy is out of date — surfacing as Plugin "databricks" not found in marketplace "claude-plugins-official".

This PR:

  • Adds automatic recovery. In an interactive session, we now detect this failure, ask permission, re-add and refresh the marketplace (plugin marketplace add + plugin marketplace update), and retry the install once. Both repair steps tolerate failure (logged at debug), so the retried install is the real verdict.
  • Surfaces an actionable error when the session is non-interactive, the user declines, or the retry still fails — naming the exact commands to run manually.
  • Never de-registers the built-in marketplace. It's shared infrastructure, so recovery never records ownership; uninstall always leaves it in place.
  • Formats the recovery prompt for readability — the error, the repair commands (each on its own indented line), and a short confirm prompt, matching the rest of the aitools install output.

Why

Users hitting a stale or removed official marketplace previously got an opaque install failure with no guided path forward. This makes the common case self-healing and the fallback actionable.

Testing

  • Unit tests in libs/aitools/installer/plugin_test.go cover: successful recovery, user declining the prompt, non-interactive actionable error, and retry-still-fails.
  • go test ./libs/aitools/installer/ passes.

@dustinvannoy-db
dustinvannoy-db marked this pull request as ready for review July 24, 2026 05:36
@github-actions

Copy link
Copy Markdown
Contributor

Waiting for approval

Based on git history, these people are best suited to review:

  • @simonfaltum -- recent work in libs/aitools/installer/, libs/aitools/agents/

Eligible reviewers: @Divyansh-db, @MarioCadenas, @Shridhad, @atilafassina, @calvarjorge, @chrisst, @ditadi, @fjakobs, @hectorcast-db, @igrekun, @keugenek, @lennartkats-db, @mihaimitrea-db, @parthban-db, @pffigueiredo, @pkosiec, @rauchy, @renaudhartert-db, @tanmay-db, @tejaskochar-db

Suggestions based on git history. See OWNERS for ownership rules.

Installing the databricks plugin for Claude Code installs from Claude's
built-in claude-plugins-official marketplace. When a user has removed that
marketplace or their local copy is out of date, the install fails with
"Plugin not found in marketplace" and no guidance (issue databricks#212).

Add a recovery path for built-in marketplaces: on that failure, in an
interactive session prompt to re-add and refresh the marketplace and retry
the install once; in a non-interactive session (or when the user declines or
the retry still fails) return a BlockedError whose detail includes the agent's
own stderr plus the exact repair commands. A built-in marketplace stays shared
infrastructure we never record as ours, so uninstall never de-registers it.

Co-authored-by: Isaac
Split the built-in-marketplace recovery output onto separate lines: the
error, the repair commands (add + update, each indented), and a short
prompt. Mirrors the non-interactive builtinMarketplaceError formatting.

Co-authored-by: Isaac
Extract repairCommands() so the interactive recovery prompt and the
non-interactive BlockedError render the two re-add/refresh commands from
one place, and fold marketplaceAddSourceArgs into marketplaceAddArgs.
No behavior or output change.

Co-authored-by: Isaac
@dustinvannoy-db
dustinvannoy-db force-pushed the dustinvannoy-db/fix-aitools-claude-marketplace-recovery branch from a777e54 to 32c5cfc Compare July 24, 2026 19:58
@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 6054
  • Commit SHA: 32c5cfce3dade08c7bbf59a191ea4c863d1e2210

Checks will be approved automatically on success.

@dustinvannoy-db

Copy link
Copy Markdown
Author

I had an old main when creating this PR, will submit a new one once a cleaner set of changes is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant