Skip to content

CI: register inline-comment MCP tool for claude-code-review - #23

Open
jnasbyupgrade wants to merge 1 commit into
masterfrom
fix-claude-review-mcp-and-cache-perms
Open

CI: register inline-comment MCP tool for claude-code-review#23
jnasbyupgrade wants to merge 1 commit into
masterfrom
fix-claude-review-mcp-and-cache-perms

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Summary

  • claude-code-review.yml's review step drives claude-code-action with a bare prompt: (no @claude mention), which runs the action in "agent mode." In that mode the action decides which MCP servers to start from an --allowedTools flag inside claude_args, not from the invoked plugin's own allowed-tools frontmatter. Without mcp__github_inline_comment__create_inline_comment listed there, that MCP server never started, so the code-review plugin silently fell back to a single consolidated PR comment instead of real per-line inline comments — no error, no warning, just the wrong output shape. Fixed by adding claude_args: '--allowedTools mcp__github_inline_comment__create_inline_comment'.

Investigated, not changed

  • Considered adding permissions: actions: write to let the job's internal cache-save step (inside claude-code-action's own setup) succeed instead of emitting a Cache reservation failed: cache write denied: token has no writable scopes warning. Checked a sibling repo's identical review workflow that already grants actions: write: the warning still appears in its runs both immediately after that permission was added and in its most recent run — so the permission does not actually resolve the warning in practice. Not adding it here since it wouldn't fix anything and would only grant unused, broader privileges (cancelling/deleting workflow runs, managing artifacts).

Test plan

  • Validated YAML syntax locally
  • Diff confined to .github/workflows/claude-code-review.yml
  • Watch this PR's own CI run (note: pull_request_target always runs the workflow from master, so this PR's own check reflects the OLD workflow, not this change — verification of the MCP fix happens on a subsequent PR after merge)

🤖 Generated with Claude Code

The review step drives claude-code-action with a bare prompt: (no @claude
mention), which runs it in "agent mode". That mode decides which MCP
servers to start from an --allowedTools flag inside claude_args, not from
the invoked plugin's own allowed-tools frontmatter. Without
mcp__github_inline_comment__create_inline_comment listed there, that MCP
server never starts, so the code-review plugin silently falls back to one
consolidated PR comment instead of real per-line inline comments.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4e76b6e3-6d6a-442e-8715-dc4f61027724

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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