Skip to content

fix(init): Surface MCP policy skip reasons#256

Merged
cameroncooke merged 1 commit intomainfrom
fix/init-mcp-policy-feedback
Mar 2, 2026
Merged

fix(init): Surface MCP policy skip reasons#256
cameroncooke merged 1 commit intomainfrom
fix/init-mcp-policy-feedback

Conversation

@cameroncooke
Copy link
Collaborator

Improve init --skill mcp feedback 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 claude override before the filtering loop to make policy
intent explicit and avoid unnecessary filter work, and add a regression test for the
only-Claude auto-detect MCP scenario.

Refs GH-250

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>
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 2, 2026

Open in StackBlitz

npm i https://pkg.pr.new/xcodebuildmcp@256

commit: a1ccbea

@cameroncooke cameroncooke marked this pull request as ready for review March 2, 2026 09:23
@cameroncooke cameroncooke merged commit c342fa2 into main Mar 2, 2026
9 checks passed
@cameroncooke cameroncooke deleted the fix/init-mcp-policy-feedback branch March 2, 2026 12:52
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