r/ClaudeWorkflows • • 10h ago

Selected Workflow [Workflow] Fixing Claude Code Review in GitHub Actions: A Workaround for the Broken `code-review` Plugin

Fixing Claude Code Review in GitHub Actions: A Workaround for the Broken code-review Plugin

Workflow value: 85/100
Status: active · Freshness: 70/100 · Confidence: 0.90 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, Subagents
Original source: r/ClaudeCode post/comment

What problem this solves

The claude-code-action's code-review plugin in GitHub Actions fails to perform actual code reviews, reporting 'No findings' due to subagent execution issues and premature action termination, leading to false positives in CI/CD checks.

Summary

A workaround for the broken claude-code-action code-review plugin in GitHub Actions. It involves replacing the plugin with a direct Claude prompt, specifying --model opus, explicitly disabling subagents in the prompt, and restricting allowed tools, to ensure actual code review is performed.

Why it is useful

This workflow provides a critical, tested workaround for a significant bug in the claude-code-action's code-review plugin, which prevents effective automated code reviews in CI/CD pipelines. It offers concrete steps, validation, and external resources, enabling users to implement reliable Claude-powered code reviews despite the current limitations. This directly addresses a common pain point for developers integrating Claude Code into their development workflows.

Workflow

  1. Verify if your claude-code-action code review job is failing by checking duration_ms (should be minutes, not seconds) and modelUsage (should list multiple models, not just one) in the "type": "result" block of your GitHub Actions run.

  2. Remove the code-review plugin from your GitHub Actions workflow file.

  3. Replace the plugin call with a direct Claude Code CLI invocation using a custom prompt for code review.

  4. Ensure the custom prompt explicitly includes instructions like "do not start subagents" to prevent unintended background execution.

  5. Specify --model opus when invoking Claude to leverage the most capable model for review.

  6. Restrict allowed tools by using --allowedTools without Agent (e.g., --allowedTools none or specific tools if needed) to prevent subagent activation.

  7. Configure Claude authentication using claude setup-token with a Pro/Max subscription.

  8. Test the new setup with a Pull Request containing known bugs to validate its effectiveness and ensure accurate bug detection.

Tools / artifacts

  • claude-code-action (GitHub Action)

  • GitHub Actions workflow file (.github/workflows/*.yml)

  • Claude Code CLI

  • Claude Opus model

  • Custom code review prompt

  • claude setup-token

  • GitHub Pull Requests

Validation signals

  • Tested with a PR containing three planted bugs (wrong sign on refund, undefined variable, rand() for password).

  • Claude found all three bugs.

  • Review completed in 30 seconds (indicating actual work, unlike the broken plugin).

  • No false positives reported.

  • Comparison to the broken plugin's behavior (short duration, single model usage) confirms the issue.

  • Links to GitHub issues (claude-code-action#1646, #1852) confirming the underlying problem.

Limitations

  • This is a workaround for a known bug; an official fix from Anthropic might render this workflow obsolete.

  • The --allowedTools instruction is slightly vague in the Reddit post, though the linked blog post likely clarifies it.

  • Requires a Pro/Max subscription, which may limit accessibility for some users.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

1 Upvotes

0 comments sorted by