From 8692db9ae0b0bb2f6646cdeb2987bce44ad04d03 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Sat, 1 Aug 2026 16:27:10 -0500 Subject: [PATCH] claude-code-review.yml: register the inline-comment MCP server via claude_args The workflow invokes claude-code-action with an explicit prompt (agent mode, no @claude mention). In agent mode the action only installs the github_inline_comment MCP server when it sees mcp__github_inline_comment__create_inline_comment listed in a --allowedTools flag inside claude_args -- it does not read the code-review plugin's own allowed-tools frontmatter to decide that. Since claude_args was never set, the MCP server never started, so mcp__github_inline_comment__create_inline_comment did not exist as a callable tool. This made every review since the plugin switch fall back to one consolidated PR comment ("inline line comments were not available in this environment") instead of real per-line comments, e.g. https://github.com/Postgres-Extensions/cat_tools/pull/58#issuecomment-5148396014 Confirmed by reading claude-code-action's source (src/mcp/install-mcp-server.ts's prepareMcpConfig and src/modes/agent/parse-tools.ts's parseAllowedTools): this repo's pull_request_target design (see .github/workflows/CLAUDE.md) means the fix can only be verified from a subsequent PR after this merges to master, since GitHub always runs a pull_request_target workflow file from the base branch. --- .github/workflows/claude-code-review.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 83d39eb..d2292f3 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -128,3 +128,14 @@ jobs: # provided, so no GitHub comments were posted"). Every review run # before this fix has been silently invisible on GitHub. prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }} --comment' + # A direct `prompt:` (no @claude mention) runs the action in "agent + # mode". In that mode, claude-code-action only installs the + # github_inline_comment MCP server if it sees + # mcp__github_inline_comment__create_inline_comment listed in an + # --allowedTools flag inside claude_args (src/modes/agent/parse-tools.ts) -- + # it does NOT look at the code-review plugin's own `allowed-tools` + # frontmatter to decide that. Without this, the MCP server never + # starts, the tool genuinely doesn't exist in the session, and the + # plugin silently falls back to one consolidated PR comment instead + # of real inline line comments. + claude_args: '--allowedTools mcp__github_inline_comment__create_inline_comment'