Allow claude-review to actually post its comment/inline review - #92
Merged
Conversation
pull-requests: write (#91) fixed the GITHUB_TOKEN's API scope, but that's not what was blocking posting: permission_denials_count stayed high (and grew) because Claude Code's own tool-permission gate, which is separate from the token's API scope, was denying every attempt to call `gh pr comment` and mcp__github_inline_comment__create_inline_comment - the two mechanisms the code-review plugin actually uses to post a review. Neither is in Claude Code's default allowed-tools set for a non-interactive run, so every attempt was silently denied with nobody present to approve the prompt.
Contributor
|
This was referenced Aug 1, 2026
d-morrison
added a commit
to imelainew/ucd-serg.github.io
that referenced
this pull request
Aug 1, 2026
The code-review plugin gates all posting on a --comment argument: "If --comment argument was NOT provided, stop here. Do not post any GitHub comments." (step 7 of plugins/code-review/commands/code-review.md in anthropics/claude-code.) We have never passed it, so every review this repo has run has been working as designed -- reviewing, printing to the job log, and posting nothing behind a green check. claude has zero review comments across UCD-SERG#78, UCD-SERG#79, UCD-SERG#80, UCD-SERG#86, UCD-SERG#87, UCD-SERG#92, UCD-SERG#93 and UCD-SERG#94. This was not a permissions problem. UCD-SERG#91's pull-requests: write and UCD-SERG#92/UCD-SERG#94's allowlist work were treating a symptom. Closes UCD-SERG#96 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HMmB6db4xpbuqcqaQKArZb
This was referenced Aug 1, 2026
This was referenced Aug 24, 2026
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.
Summary
GITHUB_TOKEN's API scope (pull-requests: write), but tested on PR #87 it turned out not to be the actual blocker —permission_denials_countstayed nonzero (and even grew, 8 → 17) andclaude-reviewstill posted zero comments on any same-repo PR.GITHUB_TOKEN's API scope. Thecode-reviewplugin posts its review via exactly two mechanisms (confirmed from the plugin's own command source):gh pr comment(aBashtool call), for the summarymcp__github_inline_comment__create_inline_comment(an MCP tool), for inline commentspermission_denials_countwas counting. This matches the workflow file's own half-written hint that was sitting there as a dead comment:# claude_args: '--allowed-tools Bash(gh pr *)'.claude_args: '--allowed-tools "Bash(gh pr comment *)" "mcp__github_inline_comment__create_inline_comment"'so both mechanisms the plugin actually needs are explicitly allowed.Test plan
claudereview comment (summary or inline) actually appears on a same-repo PR after this merges — would be the first genuine one ever recorded in this repo (see the historical review-comment audit in PR #91's discussion)permission_denials_countdrops to 0 (or near 0) in the run's result logGenerated by Claude Code