code-review plugin: run ends silently when Claude yields its turn waiting on an async sub-agent
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
This is about anthropics/claude-code-action@v1 running the code-review plugin, not the CLI.
Automated PR reviews intermittently terminate having done nothing, while reporting success. The tracking comment (track_progress: true) is left with an unfinished checklist, no findings are posted, and the workflow check goes green — so from the outside it is indistinguishable from "reviewed, found nothing".
With show_full_output: true on a failing run, the final assistant turn is:
"text": "I'll wait for this eligibility check to complete before proceeding further."
"subtype": "task_started"
"stop_reason": "end_turn"
Claude launches the eligibility check as an async sub-agent, states it will wait for it, and then ends its turn. Nothing resumes it, so the process exits:
"is_error": false
"num_turns": 6
"subtype": "success"
The model appears to be allowed to yield while an async task is still outstanding, with no mechanism to resume it when that task completes.
Impact
- Reviews silently do not happen; the green check implies they did.
- Usage is consumed with no output ($0.12–$2.46 per failed run in our case).
- We rolled this out to ~40 repositories across 6 organizations; without reading each tracking comment individually there is no way to tell a stalled review from a clean one.
Frequency scales with PR size. Small PRs usually complete. A 92-file PR failed on every automatic attempt (6+ runs), with the tracking comment stopping at "Run parallel review agents (CLAUDE.md compliance x2, bug scan x2)" — consistent with more async agents meaning more chances to lose the race.
Workaround: requesting the review on demand via an @claude comment completes reliably, including on the 92-file PR that never succeeded automatically. That path appears to review the diff directly rather than fanning out to async agents.
What Should Happen?
The run should either complete the review and post findings (or an explicit "no issues found" summary), or fail visibly.
Specifically, one of:
- Outstanding async tasks are awaited before the turn is allowed to end, so the review always runs to completion; or
- A run that ends with unfinished todos and outstanding async tasks is reported as a failure rather than
subtype: success/is_error: false, so the check goes red and the problem surfaces instead of looking like a clean review.
The current behaviour is the worst case for a reviewer tool: it silently does nothing while signalling that it did.
Error Messages/Logs
Final assistant turn on a failing run (show_full_output: true):
"text": "I'll wait for this eligibility check to complete before proceeding further."
"subtype": "task_started"
"stop_reason": "end_turn"
Result block for that same run — note it reports success:
"is_error": false
"num_turns": 6
"total_cost_usd": 0.119781
"subtype": "success"
"permission_denials_count": 0
Tracking comment left behind (track_progress: true):
### Code Review in progress
- [x] Check PR eligibility for review (not closed/draft/trivial)
- [ ] Gather context (CLAUDE.md, diff, changed files)
- [ ] Run code review (`/code-review:code-review --comment`)
- [ ] Post findings
On larger PRs the checklist typically stops one step later, at:
- [ ] Run parallel review agents (CLAUDE.md compliance x2, bug scan x2)
Steps to Reproduce
- Add a reusable workflow calling the action with the
code-reviewplugin:
on:
workflow_call:
secrets:
CLAUDE_CODE_OAUTH_TOKEN: { required: true }
jobs:
review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
issues: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
plugin_marketplaces: "https://github.com/anthropics/claude-code.git"
plugins: "code-review@claude-code-plugins"
track_progress: true
prompt: "/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}"
claude_args: >-
--model claude-sonnet-5
--max-turns 30
--allowedTools "mcp__github_inline_comment__create_inline_comment,Skill,Task,Read,Grep,Glob,Bash"
- Call it from a repo on
pull_request(opened,reopened,ready_for_review). - Open a PR — ours was 6 files, +63/-44, in a pnpm monorepo.
- Close and reopen the PR repeatedly to re-trigger the review.
- Observe that some runs complete a full review and others exit after ~6-8 turns having posted only the checklist — with no error and a green check.
Same PR, same commit, same config, five consecutive runs:
| Run | show_full_output | Turns | Cost | Outcome |
|-----|------------------|-------|-------|------------------------|
| 1 | false | 7 | $0.15 | stalled, 0/6 checklist |
| 2 | true | 16 | $2.05 | completed, full review |
| 3 | false | 8 | $0.16 | stalled, 0/4 checklist |
| 4 | true | 6 | $0.12 | stalled, 1/4 checklist |
| 5 | true | 25 | $0.54 | completed (via @claude) |
Intermittent and independent of show_full_output (runs 2 and 4 differ with the flag identical), which is what points at a race on whether the async task returns before the model yields its turn.
Note: permission_denials_count is 0 in the failing runs, so this is not a tool-permission problem. (We did separately need Skill and Bash in --allowedTools for the plugin's sub-agents — without those the review fails much earlier, with 30+ denials. That is a different problem and is already reflected in the config above.)
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
N/A - this is the GitHub Action, not the CLI: anthropics/claude-code-action@v1 with code-review@claude-code-plugins
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Note on the environment fields above: this form is oriented towards the Claude Code CLI, and several required fields do not map cleanly to the GitHub Action. To be explicit:
- Component:
anthropics/claude-code-action@v1withplugins: code-review@claude-code-plugins— not the CLI. - Runner:
ubuntu-lateston GitHub-hosted Actions (so "Operating System: macOS" and "Terminal: Terminal.app" are just the form defaults, not our setup). - Auth: a Claude subscription OAuth token via
claude_code_oauth_token(claude setup-token), not an API key — "Platform: Anthropic API" is likewise a default. - Model:
claude-sonnet-5via--model. - Regression: unknown. We deployed this for the first time in the last few days, so we have no earlier working version to compare against. The form required an answer here.
Scale of observation: rolled out to ~40 active repositories across 6 GitHub organizations, all calling one shared reusable workflow, so the configuration is identical everywhere. The behaviour is consistent across organizations and across languages (Kotlin, Scala, Swift, Vue/TypeScript).
Happy to provide full run logs privately if that would help — they contain our source, so I have not attached them here.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗