diff --git a/src/message-agent-executor.ts b/src/message-agent-executor.ts index 11283d2..8bccd26 100644 --- a/src/message-agent-executor.ts +++ b/src/message-agent-executor.ts @@ -898,8 +898,9 @@ export async function runAgentForGroup( return 'error'; } - // success-null-result with no visible output — agent returned nothing useful - if (primaryAttempt.sawSuccessNullResultWithoutOutput) { + // success-null-result with no visible output — agent returned nothing useful. + // But if output was already delivered to Discord (sawOutput), treat as success. + if (primaryAttempt.sawSuccessNullResultWithoutOutput && !primaryAttempt.sawOutput) { logger.error( { group: group.name, chatJid, runId }, 'Agent returned success with null result and no visible output', diff --git a/src/paired-execution-context.ts b/src/paired-execution-context.ts index 5e14baf..12e7704 100644 --- a/src/paired-execution-context.ts +++ b/src/paired-execution-context.ts @@ -48,7 +48,8 @@ function classifyReviewerVerdict( // from quoted/referenced status markers in the body text. if (/^\*{0,2}BLOCKED\*{0,2}\b/.test(firstLine)) return 'blocked'; if (/^\*{0,2}NEEDS_CONTEXT\*{0,2}\b/.test(firstLine)) return 'needs_context'; - if (/^\*{0,2}DONE_WITH_CONCERNS\*{0,2}\b/.test(firstLine)) return 'done_with_concerns'; + if (/^\*{0,2}DONE_WITH_CONCERNS\*{0,2}\b/.test(firstLine)) + return 'done_with_concerns'; if (/^\*{0,2}DONE\*{0,2}\b/.test(firstLine)) return 'done'; return 'continue'; }