anthropics / anthropics/claude-code-action
use_sticky_comment: review text captured in result but never posted as PR comment
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.1k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
## Description
When using `use_sticky_comment: true` on `pull_request` events, Claude runs successfully and produces a complete review in the SDK `result` field, but the action never posts it as a PR comment. The action saves the result to a log file, revokes the app token, and exits — skipping the sticky comment posting step entirely.
## Environment
- **Action version**: Both `@v1` (SHA `5d0cc74`, SDK 0.2.73) and pinned SHA `26ec041` (SDK 0.2.70)
- **Runner**: Self-hosted (`arc-runner-set`)
- **Trigger**: `pull_request` → reusable workflow (`workflow_call`)
- **App token**: OIDC exchange succeeds, `claude[bot]` app token obtained
## Workflow Configuration
Reusable workflow called from:
```yaml
# Caller
jobs:
claude-review:
uses: OurOrg/shared-config/.github/workflows/claude-code-review-reusable.yml@master
with:
shared_config_path: '.claude/shared'
secrets:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
gh_submodule_token: ${{ secrets.GH_SUBMODULE_TOKEN }}
```
Reusable workflow step:
```yaml
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.anthropic_api_key }}
use_sticky_comment: true
prompt: |
Please review this pull request...
Write your review as your response. It will be automatically posted as a PR comment.
Do NOT use any tool to post comments yourself.
claude_args: --model claude-sonnet-4-6 --allowed-tools "Read,Grep,Glob,Bash(git diff:*),Bash(git log:*),Bash(git show:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
```
## Evidence
Enabled `show_full_output: true` to capture Claude's full response. Here's what happens:
### 1. App token obtained successfully
```
OIDC token successfully obtained
Exchanging OIDC token for app token...
App token successfully obtained
Using GITHUB_TOKEN from OIDC
```
### 2. Claude produces a complete review
```json
{
"type": "result",
"subtype": "success",
"is_error": false,
"duration_ms": 147479,
"num_turns": 20,
"result": "\n🤖 **Applying Capsule Code Review guidelines**...\n\n## ⚠️ Concerns (2)\n\n### 1. DRY violation...\n### 2. Hardcoded SAME_DAY_MAX_RETRIES...\n\n## 💡 Suggestions (1)\n...",
"stop_reason": "end_turn",
"total_cost_usd": 1.22
}
```
The `result` field contains the full review with `` marker, concerns, suggestions — exactly what should be posted as a sticky comment.
### 3. Action immediately exits without posting
After the SDK result, the action log shows:
```
Log saved to /home/runner/_work/_temp/claude-execution-output.json
Set session_id: b73b5b7e-ae73-46b2-b597-6b70cecbee4f
## curl -X DELETE ... /installation/token ← revokes app token
Post job cleanup.
```
**No GitHub API call to create or update a PR comment.** The action goes straight from saving the log to revoking the token.
## What We Tried
1. `@v1` (SHA `5d0cc74`, SDK 0.2.73) — no comment
2. Pinned to SHA `26ec041` (SDK 0.2.70) — no comment
3. Added `classify_inline_comments: 'false'` — no comment
4. Multiple re-runs across 2 different repos — no comment
## What DID Work Previously
The same workflow with the same configuration posted `claude[bot]` review comments successfully on March 10-11 using SHA `26ec041`. Multiple PRs received reviews. Something changed between March 11 and March 13 that broke it, but pinning to the exact same SHA doesn't fix it.
## Possibly Related
- #891 — Same symptom (runs but doesn't post) for issues
- #602 — Not updating PR comments
- #419 — Sticky comment for review mode
- #1044 — Claude reacts with eyes emoji but never posts review
## Expected Behavior
The action should post Claude's `result` text as a sticky comment on the PR using the `` marker.
## Actual Behavior
The action captures the review text but never makes a GitHub API call to create/update the PR comment.
Contributor guide
Research direction
Start at the action's pull_request workflow path and the handling of the SDK result after claude-execution-output.json is saved; compare it with the sticky-comment behavior referenced by #602, #419, and #1044. Reproduce with use_sticky_comment: true and verify that a result containing the marker creates or updates a PR comment before token cleanup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github, github-actions, typescript
- Domain
- ci-cd, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100