From b2ff4be4c6990bbad2576a13c13dba83245c89e0 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Wed, 15 Oct 2025 13:00:26 -0500 Subject: [PATCH] fix: Text content blocks must contain non-whitespace text (#3194) --- packages/opencode/src/session/message-v2.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/opencode/src/session/message-v2.ts b/packages/opencode/src/session/message-v2.ts index 8dc059ca..81b4158d 100644 --- a/packages/opencode/src/session/message-v2.ts +++ b/packages/opencode/src/session/message-v2.ts @@ -513,6 +513,8 @@ export namespace MessageV2 { } if (msg.info.role === "assistant") { + const hasEmptyTextPart = msg.parts.some((part) => part.type === "text" && part.text.trim() === "") + if (hasEmptyTextPart) continue result.push({ id: msg.info.id, role: "assistant",