-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Describe the bug
use_sticky_comment: true does not find existing comments when github_token is provided. A new comment is created on every workflow run instead of updating the existing one.
The root cause is in src/github/operations/comments/create-initial.ts. The sticky search checks three criteria:
comment.user?.id === CLAUDE_APP_BOT_ID(209825114, i.e.claude[bot])comment.user?.login.toLowerCase().includes("claude")comment.body === initialBody
When github_token is provided, comments are posted as github-actions[bot] (user ID 41898282). None of the three criteria match:
- ID 41898282 !== 209825114
- "github-actions" does not contain "claude"
- The previous comment body has been updated with review content, so exact body match fails
To Reproduce
- Configure a workflow with
use_sticky_comment: trueandgithub_token: ${{ github.token }} - Open a PR and let the review run
- Push another commit to the same PR
- A second comment is created instead of updating the first
Expected behavior
The action should find and update the existing comment from the previous run.
Workflow yml file
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ github.token }}
prompt: "/review"
track_progress: true
use_sticky_comment: trueAPI Provider
- Anthropic First-Party API (default)
- AWS Bedrock
- GCP Vertex
Additional context
Possibly related to #714 and #759, but those cover different aspects of the bot ID issue. A potential fix would be to also match on the github-actions[bot] user ID or use a hidden HTML marker in the comment body instead of relying on author matching.