From bd488d669d525e418c8ad62f651388b4bc4cac05 Mon Sep 17 00:00:00 2001 From: Brenton Strickler Date: Tue, 6 Oct 2026 10:17:02 -0400 Subject: [PATCH] ci: move Claude review to claude-code-action@v1 and drop the model pin The claude-review check has failed on every pull request since the pinned model, claude-sonnet-4-20250514, was retired: the API answers 404 not_found_error and the action exits after one turn, leaving an error comment on the PR. Removing the pin alone is not enough, because the workflow also used the frozen @beta tag of the action. Move to @v1 with no model so the action's default model is used, and translate the inputs to their v1 names: direct_prompt becomes prompt, with track_progress so the review is still posted as a tracking comment, and an explicit tool allowlist for inline comments and read-only gh pr commands. Triggers, job name, permissions, and the review criteria are unchanged. --- .github/workflows/claude-code-review.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index c8bc84b..ebfff55 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -23,11 +23,14 @@ jobs: with: fetch-depth: 0 - name: Run Claude Code Review - uses: anthropics/claude-code-action@beta + uses: anthropics/claude-code-action@v1 with: claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} - model: "claude-sonnet-4-20250514" - direct_prompt: | + track_progress: true + prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }} + Review this PR for: 1. Correctness bugs (logic errors, off-by-one, null safety) 2. Security issues (injection, unsafe operations, credential handling) @@ -37,3 +40,5 @@ jobs: Be concise. Only comment on real issues, not style preferences. Do not comment on pre-existing warnings or code not changed in this PR. + claude_args: | + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"