fix: ensure agents respond to comments on in_review tasks

Root cause: when someone commented on an in_review task, the heartbeat
wakeup was triggered but the agent couldn't re-checkout the task because
expectedStatuses only included todo/backlog/blocked. The in_review status
was never handled in the checkout flow or the heartbeat procedure.

Changes:
- Add wakeCommentId to issue_commented and issue_reopened_via_comment
  context snapshots (consistent with issue_comment_mentioned)
- Add in_review to checkout expectedStatuses in heartbeat skill
- Update Step 3 fallback query to include in_review status
- Update Step 4 to prioritize in_review tasks when woken by comment
- Add explicit issue_commented wake reason handling in Step 4

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Devin Foley
2026-04-03 09:19:48 -07:00
parent 6c2c63e0f1
commit 258c7ccd21
2 changed files with 7 additions and 4 deletions
+2
View File
@@ -1591,6 +1591,7 @@ export function issueRoutes(db: Db, storage: StorageService) {
issueId: currentIssue.id,
taskId: currentIssue.id,
commentId: comment.id,
wakeCommentId: comment.id,
source: "issue.comment.reopen",
wakeReason: "issue_reopened_via_comment",
reopenedFrom: reopenFromStatus,
@@ -1614,6 +1615,7 @@ export function issueRoutes(db: Db, storage: StorageService) {
issueId: currentIssue.id,
taskId: currentIssue.id,
commentId: comment.id,
wakeCommentId: comment.id,
source: "issue.comment",
wakeReason: "issue_commented",
...(interruptedRunId ? { interruptedRunId } : {}),