fix(init): Surface MCP policy skip reasons#256
Merged
cameroncooke merged 1 commit intomainfrom Mar 2, 2026
Merged
Conversation
Print skipped-client reasons before failing policy-filtered installs so users understand why no targets remain. Include the skipped summary in the thrown error for non-interactive workflows. Move the explicit Claude override ahead of the filter loop to keep policy intent clear and avoid unnecessary work. Add coverage for the only-Claude auto-detect MCP path. Refs GH-250 Co-Authored-By: Claude <noreply@anthropic.com>
commit: |
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.
Improve
init --skill mcpfeedback when install policy filters out all targets.This follow-up addresses post-merge review feedback on #250. The previous behavior raised a
technically correct but low-context error when only Claude was auto-detected and filtered.
Now we print skipped-client reasons before failing and include those reasons in the error
message, so users immediately understand why no eligible targets remain.
I considered only changing the throw message, but that would still hide useful per-client
skip output in the failing path. Printing skip reasons before the empty-target check keeps
the behavior consistent with successful installs while preserving a clear terminal failure.
Also move the explicit
--client claudeoverride before the filtering loop to make policyintent explicit and avoid unnecessary filter work, and add a regression test for the
only-Claude auto-detect MCP scenario.
Refs GH-250