anthropics / anthropics/claude-code-action
PR-triggered workflows produce no visible output when Claude has no inline diff comments
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.1k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
## Problem
When using `claude-code-action` in a PR-triggered workflow (e.g., automated review on `pull_request` events), the action only posts **inline review comments** on specific diff lines. If Claude's analysis has no line-specific feedback — for example, a general review summary, eval results, or a "looks good" confirmation — **nothing gets posted to the PR at all**.
The action logs show `No buffered inline comments` and the workflow completes successfully, but there's zero visible output.
## Expected behavior
When the prompt instructs Claude to "post a review as a PR comment", Claude should be able to post a general PR comment (not just inline diff comments). At minimum, there should be a way to configure the action to always post a summary comment.
## Current workaround
Instruct Claude in the prompt to use `gh pr comment` directly:
```yaml
prompt: |
Review this PR...
IMPORTANT: Post your review using the gh CLI:
gh pr comment ${{ github.event.pull_request.number }} --body ""
```
This works but feels fragile — it depends on Claude following the instruction and having `gh` available with the right permissions.
## Suggestion
Consider adding an option like `post_summary_comment: true` that captures Claude's final output and posts it as a PR comment automatically, similar to how other CI bots (e.g., Codecov, SonarQube) always post a summary.
Alternatively, document this behavior explicitly so users don't expect general PR comments from PR-triggered workflows.
## Environment
- `anthropics/claude-code-action@v1`
- Triggered by `pull_request` event
- `use_sticky_comment: false`
- `classify_inline_comments: true`
Contributor guide
Assessment
This issue has not been assessed yet.