From 8aeee9859377adbca4e197ad3be6fa8382d284a2 Mon Sep 17 00:00:00 2001 From: Jake McInteer Date: Sun, 15 Feb 2026 07:51:43 +1300 Subject: [PATCH] fix: strip leading whitespace in block streaming reply path The block streaming delivery path (onBlockReply) bypasses sanitizeUserFacingText, so the trimStart fix from #16158/#16280 doesn't apply to users with blockStreaming enabled (the default). Adds trimStart() to the cleaned text in the block reply payload construction, consistent with the non-streaming path. --- src/auto-reply/reply/agent-runner-execution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auto-reply/reply/agent-runner-execution.ts b/src/auto-reply/reply/agent-runner-execution.ts index e1cdaa0aed7..1fb8d219855 100644 --- a/src/auto-reply/reply/agent-runner-execution.ts +++ b/src/auto-reply/reply/agent-runner-execution.ts @@ -414,7 +414,7 @@ export async function runAgentTurnWithFallback(params: { const blockPayload: ReplyPayload = params.applyReplyToMode({ ...taggedPayload, - text: cleaned, + text: cleaned?.trimStart(), audioAsVoice: Boolean(parsed.audioAsVoice || payload.audioAsVoice), replyToId: taggedPayload.replyToId ?? parsed.replyToId, replyToTag: taggedPayload.replyToTag || parsed.replyToTag,