From 5dfd9a2429e93e8a452edfd089af3fdf5b1366ac Mon Sep 17 00:00:00 2001 From: Chris Schneider Date: Fri, 6 Mar 2026 19:21:08 +0000 Subject: [PATCH] skip agent self-wake on comment and closed-issue wake without reopen --- server/src/routes/issues.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/routes/issues.ts b/server/src/routes/issues.ts index 88070293..fe855f38 100644 --- a/server/src/routes/issues.ts +++ b/server/src/routes/issues.ts @@ -588,6 +588,7 @@ export function issueRoutes(db: Db, storage: StorageService) { for (const mentionedId of mentionedIds) { if (wakeups.has(mentionedId)) continue; + if (actor.actorType === "agent" && actor.actorId === mentionedId) continue; wakeups.set(mentionedId, { source: "automation", triggerDetail: "system", @@ -899,7 +900,10 @@ export function issueRoutes(db: Db, storage: StorageService) { void (async () => { const wakeups = new Map[1]>(); const assigneeId = currentIssue.assigneeAgentId; - if (assigneeId) { + const actorIsAgent = actor.actorType === "agent"; + const selfComment = actorIsAgent && actor.actorId === assigneeId; + const skipWake = selfComment || isClosed; + if (assigneeId && (reopened || !skipWake)) { if (reopened) { wakeups.set(assigneeId, { source: "automation", @@ -958,6 +962,7 @@ export function issueRoutes(db: Db, storage: StorageService) { for (const mentionedId of mentionedIds) { if (wakeups.has(mentionedId)) continue; + if (actorIsAgent && actor.actorId === mentionedId) continue; wakeups.set(mentionedId, { source: "automation", triggerDetail: "system",