Hide defunct/renamed native providers from the create-agent prompt#126
Open
ryw wants to merge 1 commit into
Open
Hide defunct/renamed native providers from the create-agent prompt#126ryw wants to merge 1 commit into
ryw wants to merge 1 commit into
Conversation
The `tembo` → `tembo-agent-studio` slug rename left orphaned `workspace_connection`
rows (`type='tembo'`) that the Connections UI no longer renders but that
buildNativeSlots still surfaced — so the create/edit prompt told CAP to use a
`tembo` slot and fetch `/for-agents/tembo.md`, which 404s ("Unknown provider").
buildNativeSlots now skips any native connection whose provider slug isn't in
the catalog (getMcpProvider === null), so a renamed/removed provider's leftover
rows stay out of CAP's prompt. The live `tembo-agent-studio` connection is
unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
ryw
added a commit
that referenced
this pull request
Jun 14, 2026
A native connection to a provider that left the catalog (e.g. the old `tembo` self-key connection after the `tembo-agent-studio` rename) lingers as an orphaned row: it doesn't render on the Connections page, can't be disconnected, keeps a minted tas_ key alive, and (before #126) leaked into CAP's prompt. - The Connections → Native MCP page now shows a "removed provider" banner with a one-click Remove when you hold such connections; removeDefunctNativeConnectionsAction deletes the rows, revokes any self-key key, and drops their cached tools. - Generalized the disconnect key-revocation to fire on any self-key connection (metadata.api_key_id present) instead of matching the current slug, so a renamed provider's leftover key is revoked too. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CAP was being handed a defunct
tembonative connection. Thetembo→tembo-agent-studioslug rename (#119) was code-only, so oldworkspace_connectionrows withtype='tembo'linger. The Connections UI doesn't render them (no matching catalog provider), butbuildNativeSlotsstill listed them — so the create/edit prompt told CAP to declare atemboslot and fetch…/for-agents/tembo.md, which 404s with "Unknown provider."Fix
buildNativeSlotsnow skips any active native connection whose provider slug is no longer in the catalog (getMcpProvider(c.type) === null). Renamed/removed providers' orphaned rows stay out of CAP's prompt; the livetembo-agent-studioconnection is unaffected. General guard, not a one-off fortembo.tsc/ eslint clean.Loose end (separate)
The orphaned
temborow still exists in the DB and, since it's a self-key connection, its mintedtas_key is still valid — and it can't be disconnected from the UI (the page doesn't render non-catalog providers). Worth a one-time cleanup (delete the row + revoke the key), but this PR stops the CAP exposure, which was the ask. Happy to do that cleanup next if you want.🤖 Generated with Claude Code