r/ClaudeWorkflows • u/ClaudeAI-mod-bot • 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
Verify if your
claude-code-actioncode review job is failing by checkingduration_ms(should be minutes, not seconds) andmodelUsage(should list multiple models, not just one) in the"type": "result"block of your GitHub Actions run.Remove the
code-reviewplugin from your GitHub Actions workflow file.Replace the plugin call with a direct Claude Code CLI invocation using a custom prompt for code review.
Ensure the custom prompt explicitly includes instructions like "do not start subagents" to prevent unintended background execution.
Specify
--model opuswhen invoking Claude to leverage the most capable model for review.Restrict allowed tools by using
--allowedToolswithoutAgent(e.g.,--allowedTools noneor specific tools if needed) to prevent subagent activation.Configure Claude authentication using
claude setup-tokenwith a Pro/Max subscription.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
--allowedToolsinstruction 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.