fix: gate Claude Code plugin install on minimum CLI version#465
Draft
posthog[bot] wants to merge 1 commit into
Draft
fix: gate Claude Code plugin install on minimum CLI version#465posthog[bot] wants to merge 1 commit into
posthog[bot] wants to merge 1 commit into
Conversation
Outdated Claude Code CLIs (<1.0.88) responded to `claude plugin install
posthog` with "A newer version (1.0.88 or higher) is required to
continue." That error fell through to `analytics.captureException`,
producing a captured exception with no actionable UX for the user.
- Cache the version read from `claude --version` and short-circuit
`installPlugin()` when it parses below MIN_PLUGIN_VERSION ("1.0.88"),
returning `{ success: false, outdatedClient: true }` without touching
analytics.
- As a belt-and-suspenders fallback (e.g. unparseable version strings),
recognise the CLI's own "newer version" / "is required to continue"
message in the install catch block and treat it the same way.
- Plumb the `outdated` set through `installPlugins`, the McpInstaller
service, and McpScreen so the Done view renders a yellow "run
`claude update` and re-run the wizard" hint instead of a silent skip.
Generated-By: PostHog Code
Task-Id: 6780d653-bf05-479b-83e5-d5b8f8d82fb1
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
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
Users on outdated Claude Code installations (<1.0.88) hit an uncaught failure when the wizard tried to install the PostHog plugin.
claude plugin install posthogexits non-zero withA newer version (1.0.88 or higher) is required to continue., which falls straight through toanalytics.captureExceptioninClaudeCodeMCPClient.installPlugin()— producing a captured exception with no actionable UX (the user is told nothing, just sees a generic skip).Error tracking caught 2 occurrences from 2 distinct users over the last 30 days. Low volume today, but growing as the 1.0.88 floor ages.
Changes
claude --versionon the client and addMIN_PLUGIN_VERSION = '1.0.88'plus a simple semver-shape parser insrc/steps/add-mcp-server-to-clients/clients/claude-code.ts.installPlugin()short-circuits with{ success: false, outdatedClient: true }when the CLI parses below the minimum — no analytics exception.newer version/is required to continueerror text in the install catch block to the sameoutdatedClientresult, so we still avoid the noisy capture when version parsing fails.installPluginsinsrc/steps/add-mcp-server-to-clients/index.tsnow returns{ installed, outdated }.McpInstaller.installPluginspropagates that shape and tags themcp plugins installedanalytics event withoutdated.McpScreen.tsxrenders a yellow "Plugin install skipped — runclaude updateand re-run the wizard" hint when the outdated set is non-empty, and gives the Done view an extra beat to be read.Test plan
claude-code.test.ts:plugin installand returnsoutdatedClientwhen--versionis below 1.0.88 (and does not callanalytics.captureException).outdatedClientwhen version parsing fails.mcp-installer.test.tsfor the new{ installed, outdated }shape and analytics payload.pnpm build && pnpm jest src/steps/add-mcp-server-to-clients src/ui/tui— all 222 tests pass;pnpm fixclean (only pre-existing warnings remain).Created with PostHog Code