Repository navigation
fix(mcp): show a hint for invalid Claude Code settings JSON on plugin install - #1366
Merged
gewenyu99 merged 3 commits intoOct 7, 2026
Conversation
… install Add an expected-failure table to the Claude Code client for the plugin install stage. Invalid JSON in ~/.claude/settings.json now returns a hint and sends `mcp expected failure hinted`. Other plugin install failures use a constant exception message and put the scrubbed detail in a property. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: 04a7c3a8-17e9-4e2b-8031-ec7776c32a3c
🧙 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
Test against a Context Mill branch:
Add Results will be posted here when complete. |
gewenyu99
reviewed
Oct 7, 2026
gewenyu99
left a comment
Collaborator
There was a problem hiding this comment.
🥸 Reviewed by NotVincent, totally not Vincent. The real Vincent will review it separately. Probably slop, please disregard.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gewenyu99
marked this pull request as ready for review
October 7, 2026 14:04
gewenyu99
approved these changes
Oct 7, 2026
gewenyu99
deleted the
posthog-self-driving/fixmcp-show-a-hint-for-local-claude-e0e54e
branch
October 7, 2026 14:05
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
~/.claude/settings.jsoncannot install the PostHog Claude Code plugin. They see the raw CLI error and get no clear next step.installPluginputs the raw CLI output into the exception message. Each new wording becomes a new error tracking issue, so one failure class splits across many issues.Origin
8c54c11Changes
EXPECTED_FAILUREStable toclaude-code.ts, scoped to theplugin installstage. It uses the sameexpectedFailureHintpath ascodex.ts.Invalid JSON syntax in settings file at ~/.claude/settings.json. The user sees: fix the invalid JSON in~/.claude/settings.json, then retry. The wizard sendsmcp expected failure hintedand no exception.Claude Code plugin install failed. The scrubbed CLI output goes in thedetailsproperty, next tostageandmarketplaceFailure.mcp expected failure hintedeventdetailsNote
The match is only for the user-level file. A project
.claude/settings*.jsonpath is not one the hint can name, so it stays reported.Test plan
npx vitest run src/steps/add-mcp-server-to-clients: 183 tests pass.details/marketplaceFailureproperties.LLM context
plugin installstage.mcp add,mcp remove, andplugin uninstallstill put the raw text in the message.Created with PostHog Desktop from this inbox report.
🤖 Generated with Claude Code