diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml index 2d6b6f938..5466c4cad 100644 --- a/.github/workflows/claude-review.yml +++ b/.github/workflows/claude-review.yml @@ -38,5 +38,9 @@ jobs: Provide detailed feedback using inline comments for specific issues. + # --max-turns caps how many tool-use cycles Claude can run, which + # bounds token spend per invocation. The allowed `gh pr` commands are + # scoped to this PR's number so a misfire can't reach into another PR. claude_args: | - --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)" + --max-turns 30 + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment ${{ github.event.pull_request.number }}:*),Bash(gh pr diff ${{ github.event.pull_request.number }}:*),Bash(gh pr view ${{ github.event.pull_request.number }}:*)"