Claude AI workflows overwrite each other's PR comments (rollback-safety clobbers the code review)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem
On a PR that triggers more than one Claude workflow, the later workflow overwrites the earlier one's comment. Example: PR #36759 comment — the Rollback-Safety verdict replaced the AI code review in the same comment.
Edit history of that single comment proves it:
| time | run | content |
|---|---|---|
| 20:10:08 | Claude AI Orchestrator (30301039985) |
"Claude Code is working…" (creates comment) |
| 20:11:23 | same | Code Review: PR #36759 |
| 20:12:17 | Claude AI Rollback Safety Check (30301040015) |
reset to "Claude Code is working…" — code review gone |
| 20:13:50 | same | Rollback-Safety Analysis |
Root cause
anthropics/claude-code-action@v1 with use_sticky_comment: true looks up the comment to reuse with no per-workflow marker — src/github/operations/comments/create-initial.ts matches any comment whose author is the Claude app bot (user.id === 209825114, or any Bot login containing "claude") and takes the first one:
const existingComment = comments.data.find((comment) => {
const idMatch = comment.user?.id === CLAUDE_APP_BOT_ID;
const botNameMatch = comment.user?.type === "Bot" && comment.user?.login.toLowerCase().includes("claude");
...
});
So every workflow on the Anthropic path shares one "sticky" comment per PR. dotCMS/core runs three Claude commenters on pull_request: ai_claude-orchestrator.yml (code review, sticky by design), ai_claude-rollback-safety.yml, and ai_claude-backend-reviewer.yml. The Bedrock/Codex paths in ai-workflows already namespace their markers (sticky_namespace → <!-- dotcms-ai-review:v3:<ns> -->); the Anthropic path has no equivalent.
Fix
Only one workflow per PR should own an action-managed comment.
dotCMS/ai-workflows: plumbtrack_progressthroughclaude-orchestrator.yml→claude-executor.yml(currently hardcoded"true").dotCMS/core: settrack_progress: falseon rollback-safety and backend-reviewer. Neither needs the progress comment — rollback-safety posts its own comment only when a change is unsafe (plus a label), and the backend reviewer upserts its own<!-- dotcms-backend-review -->marker comment. The code-review orchestrator keeps the sticky comment.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with claude-orchestrator.yml and claude-executor.yml in dotCMS/ai-workflows, then inspect ai_claude-orchestrator.yml, ai_claude-rollback-safety.yml, and ai_claude-backend-reviewer.yml in dotCMS/core. Trace how track_progress is passed and how each workflow manages comments. Done means only the code-review orchestrator retains the sticky progress comment while the other workflows keep their own behavior without overwriting it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, yaml
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100