From 53868d6a49d05c5b63e1d43269e6ef84ebbc821d Mon Sep 17 00:00:00 2001 From: iliya Date: Tue, 7 Apr 2026 13:06:56 +0300 Subject: [PATCH] fix(team): suppress no-op lead inbox replies --- src/main/services/team/TeamProvisioningService.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/services/team/TeamProvisioningService.ts b/src/main/services/team/TeamProvisioningService.ts index 1bf08701..4285cc46 100644 --- a/src/main/services/team/TeamProvisioningService.ts +++ b/src/main/services/team/TeamProvisioningService.ts @@ -5703,7 +5703,8 @@ export class TeamProvisioningService { !permanentlyIgnoredIds.has(m.messageId) && !nativeMatchedMessageIds.has(m.messageId) && !deferredIds.has(m.messageId) && - !permissionRequestIds.has(m.messageId) + !permissionRequestIds.has(m.messageId) && + !isInboxNoiseMessage(m.text) ); // Layer 3: schedule retry timers. @@ -5730,7 +5731,11 @@ export class TeamProvisioningService { `You have new inbox messages addressed to you (team lead "${leadName}").`, `Process them in order (oldest first).`, `If action is required, delegate via task creation or SendMessage, and keep responses minimal.`, - `IMPORTANT: Your text response here is shown to the user. Always include a brief human-readable summary (e.g. "Delegated to carol." or "No action needed."). Do NOT respond with only an agent-only block.`, + `IMPORTANT: Your text response here is shown to the user.`, + `If you actually take action, include a brief human-readable summary (e.g. "Delegated to carol.").`, + `If there is no action to take, produce ZERO text output. Do NOT write "No action needed.", status echoes, or any other no-op summary.`, + `For pure system notifications, comment notifications, or routine teammate availability updates that require no reply/comment/action, say nothing.`, + `Do NOT respond with only an agent-only block.`, AGENT_BLOCK_OPEN, `Internal note: for task assignments, prefer task_create and rely on the board/runtime notification path instead of sending a separate SendMessage for the same assignment.`, `When creating a task from a user message that has a MessageId field, prefer task_create_from_message with that exact messageId for reliable provenance. Only use task_create_from_message when you have an explicit MessageId — never guess or fabricate one.`,