anthropics / anthropics/claude-code-action

code-review plugin completes review but produces empty result — no PR comment posted

Open
#1,087 7 comments 13 reactions 0 assignees View on GitHub
bug p2 provider:1p
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

# Describe the bug
The `code-review@claude-code-plugins` plugin successfully performs a full code review (spawns parallel review agents, validates findings, outputs a formatted summary), but the session ends with `"result": ""`, so no comment is ever posted to the PR.

The root cause appears to be that the plugin's final turn is a `TodoWrite` tool call (marking its last checklist item as "completed") rather than a text message. The actual review summary was generated as a text content block in an earlier turn, but the result capture doesn't pick it up.

Post-processing logs confirm nothing was posted:
`No buffered inline comments`

## To Reproduce
1. Configure the `code-review@claude-code-plugins` plugin as shown in the workflow below.
2. Open a PR with non-trivial code changes (mine had ~1000 lines across migrations, API hooks, and components).
3. Add a label to trigger the workflow.
4. The action runs for ~7 minutes, completes successfully (exit code 0, 24 turns).
5. No comment appears on the PR.

## Expected behavior
The review summary should be posted as a PR comment. The plugin generates a thorough review (in my case it correctly identified 2 real bugs with file/line references), but the output is lost because the session result is empty.

## Workflow yml file
```yaml
name: Claude Code Review

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened, labeled]

jobs:
claude-review:
if: contains(github.event.pull_request.labels.*.name, 'claude-review')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Run Claude Code Review
id: claude-review
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](https://github.com/anthropics/claude-code.git)'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
claude_args: "--allowedTools Bash(gh:*)"
show_full_output: true
```

Additional context

Key details from the session log with show_full_output:
true:

- Claude Code v2.1.79, models: claude-opus-4-6 (outer),
claude-sonnet-4-6 + claude-opus-4-6 (review agents)
- Session completed normally: "stop_reason": "end_turn",
24 turns, ~7 min
- The review text was output in message
msg_01A2MbGXySsa12kEoF6QZHZ4 as a text content block, but
that same message also contained a TodoWrite tool call.
The plugin's final message was the TodoWrite response,
leaving "result": "".
- The --allowedTools Bash(gh:*) flag was added to grant gh
CLI access, which resolved an earlier permission denial
issue — but the plugin never reaches the point of calling
gh to post comments because it ends on the TodoWrite
instead.

Contributor guide

Open the contributing guide

Research direction

Start with the claude-code-action entry point that captures the session result and the code-review plugin invocation described in the workflow YAML. Reproduce the run with show_full_output enabled, then trace how text content is selected when the final turn also contains a TodoWrite call. Done means the generated review summary is captured and posted as a pull request comment.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.