Skip to content

Conversation

@liobrasil
Copy link
Collaborator

Summary

  • Fix Claude Code review workflow not posting comments to PRs
  • Claude was using gh api instead of gh pr comment, but gh api is not in the allowed tools list

Root Cause

Investigation of PR #46 and #44 showed that:

  1. Claude wrote comprehensive reviews but attempted to post them using gh api repos/.../issues/.../comments
  2. This command was permission denied because only Bash(gh pr comment:*) is allowed, not Bash(gh api:*)
  3. The review silently failed to post

Changes

  • Add explicit warning in prompt: "You MUST use gh pr comment. Do NOT use gh api"
  • Clarify the command format with a proper code block instead of inline backticks

Test plan

🤖 Generated with Claude Code

Claude was using `gh api` instead of `gh pr comment` to post reviews,
but `gh api` is not in the allowed tools list, causing the comment
to fail silently.

Changes:
- Add explicit warning to use `gh pr comment` and not `gh api`
- Clarify the command format with a proper code block

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@liobrasil liobrasil merged commit c03cc23 into main Feb 5, 2026
1 of 4 checks passed
@liobrasil liobrasil deleted the fix/claude-review-use-gh-pr-comment branch February 5, 2026 00:11
@liobrasil liobrasil restored the fix/claude-review-use-gh-pr-comment branch February 5, 2026 00:20
@liobrasil liobrasil deleted the fix/claude-review-use-gh-pr-comment branch February 5, 2026 00:31
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