anthropics / anthropics/claude-code-action

experimental-review does not have access to CLAUDE_COMMENT_ID

Open
#465 2 comments 0 reactions 0 assignees View on GitHub
bug experimental-review mcp p3
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

Worflow file

```
name: Claude Code Review

on:
pull_request_review:
types: [submitted]
issue_comment:
types: [created]
pull_request:
types: [opened, ready_for_review]

jobs:
claude-review:
if: |
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '/review')) ||
(github.event_name == 'issue_comment' && github.event.issue.pull_request && contains(github.event.comment.body, '/review')) ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false)
runs-on: ubuntu-latest
timeout-minutes: 20
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
actions: read

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@beta
with:
mode: experimental-review
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
additional_permissions: |
actions: read
trigger_phrase: "/review"
# this should not be required but somehow claude loses the context...
allowed_tools: "Edit,View,Replace,Write,Create,BatchTool,GlobTool,GrepTool,Bash(gh pr:*),Bash(gh issue comment:*),mcp__*,mcp__github_comment__update_claude_comment"
custom_instructions: |
CRITICAL ADDITIONAL INSTRUCTIONS:
- Adopt a concise writing style.
- Review the code independently of other comments in or
- ONLY add inline comments to request or suggest changes
- DO NOT add inline comments to: highlight positives, show appreciation, say a change is good, acknowledge correct implementations, highlight good security practice, or anything that would NOT lead to the author making a change
- DO add inline comments to: suggest improvements, identify bugs, point out security issues, recommend refactoring, or flag potential problems
```

Logs:
```
Perfect! Now I have a complete understanding of the changes. Let me provide a comprehensive code review.

Token usage: 24907 input, 1 output

🔧 mcp__github_comment__update_claude_comment
Parameters:

{
"body": "# Code Review: ..."
}
❌ Error: Error: CLAUDE_COMMENT_ID environment variable is required

Token usage: 24907 input, 1 output
```

This is consistently happening.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.