Skip to content

use_sticky_comment: review text captured in result but never posted as PR comment #1052

@viiveek83

Description

@viiveek83

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:

# 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:

- 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

{
  "type": "result",
  "subtype": "success",
  "is_error": false,
  "duration_ms": 147479,
  "num_turns": 20,
  "result": "<!-- claude-code-review -->\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 <!-- claude-code-review --> 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

Expected Behavior

The action should post Claude's result text as a sticky comment on the PR using the <!-- claude-code-review --> marker.

Actual Behavior

The action captures the review text but never makes a GitHub API call to create/update the PR comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1Showstopper bug preventing substantial subset of users from using the product, or incorrect docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions