Conversation
When a Claude assistant job is killed mid-execution (e.g., by cancel-in-progress), the process exits with code 0 and GitHub marks the job as "success" even though it didn't complete. Fix: - Add completion marker in index.ts after runClaude finishes - Verify marker exists in workflow steps before declaring success - Applies to review, manual-review, respond, and ci-fix jobs Tested: Verified old run 20726814304 has no completion marker in logs, confirming it was killed mid-execution.
The Claude review agent was getting lost because:
1. Workflow checked out main (default branch)
2. setupFixBranch created fix branch from current HEAD (main)
3. Agent tried to Read files that only exist on PR branch
4. Agent wasted turns trying to checkout/view from origin
Fix: Create fix branch from origin/${headBranch} so PR code is
checked out locally. Agent can now use Read tool directly.
Also updated prompt to clarify that PR code is available locally.
🔍 Claude ReviewSEVERITY: medium Findings[MEDIUM] - Stale branch reuse: When the fix branch already exists (line 128), the code checks it out without updating it to the latest Fix: After checking out an existing branch, reset it to if (branchExists(ctx.fixBranch)) {
log(`Branch ${ctx.fixBranch} already exists, checking out and updating`);
gitOrFail("checkout", ctx.fixBranch);
gitOrFail("reset", "--hard", `origin/${ctx.headBranch}`);
} else {
// Create fix branch FROM the PR branch, not from main
// This ensures Claude can read PR files locally with the Read tool
log(`Creating new branch ${ctx.fixBranch} from origin/${ctx.headBranch}`);
gitOrFail("checkout", "-b", ctx.fixBranch, `origin/${ctx.headBranch}`);
}SummaryThe core fix (creating branch from PR head instead of main) is correct and solves the immediate issue. However, there's a case where reusing an existing fix branch could leave Claude working on outdated code if the PR has been updated since the last run. Review by Claude | Run |
When a fix branch already exists from a previous Claude run, ensure it's updated to the latest commit on the PR branch. Without this, Claude would review/fix stale code if new commits were pushed to the PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🔧 Auto-Fix CreatedI found issues and created a fix PR: #111 Please review and merge the fix PR first, then this PR. |
fix: reset existing fix branch to latest PR head
🔍 Claude ReviewSEVERITY: medium Findings[MEDIUM] - Silent fetch failure: Line 125 uses
Impact: Claude could review outdated code or encounter unclear failures during branch setup. Fix: Use gitOrFail("fetch", "origin", ctx.headBranch);SummaryThe core fix and the stale branch issue (PR #111) are both properly addressed. However, the fetch operation should fail loudly rather than silently to prevent reviewing stale code. Review by Claude | Run |
Changes git("fetch") to gitOrFail("fetch") to prevent silent failures
that could lead to reviewing stale code or unclear errors during branch
checkout/reset operations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
🔧 Auto-Fix CreatedI found issues and created a fix PR: #119 Please review and merge the fix PR first, then this PR. |
fix: ensure fetch succeeds before branch setup
🔍 Claude ReviewSEVERITY: none FindingsNo issues found. All previously identified issues have been addressed:
The code correctly:
SummaryThe PR successfully fixes the Claude review agent's workflow issues. All code changes are correct and complete. Review by Claude | Run |
Create fix branch from PR branch, not main
Create fix branch from PR branch, not main
Summary
Fixes the Claude review agent getting lost trying to read files that don't exist locally.
Problem: The agent was wasting many turns doing:
Root cause: Workflow checks out
main, thensetupFixBranchcreates the fix branch frommain. But the PR code is onorigin/${headBranch}.Fix: Create fix branch from
origin/${headBranch}:Now the PR code is checked out locally and the Read tool works directly.
Test plan
Stacked on: ci-log-truncation-check (PR #109)