You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: rawText empty on assistant_message_end after tool call with response > ~150 tokens (Google Gemini provider) #78838
Provider: google/gemini-2.5-flash AND gemini-3.1-pro-preview
OS: macOS Tahoe 26.4.1, Mac Studio M4 Max
Node: v25.9.0
Summary:
After a tool call (exec), when Gemini final response
exceeds ~150-200 tokens, rawText is empty in
assistant_message_end. This causes embedded run timeout.
Steps to reproduce
Enable OPENCLAW_RAW_STREAM=1
Send: "exec ls *.md and analyze each file in detail"
[assistant_message_end] rawText: '' ❌
→ embedded run timeout after 180s
OpenClaw version
OpenClaw: 2026.5.3 and 2026.5.6 (both affected)
Operating system
OS: macOS Tahoe 26.4.1, Mac Studio M4 Max
Install method
Node: v25.9.0
Model
Provider: google/gemini-2.5-flash AND gemini-3.1-pro-preview
Provider / routing chain
Provider: google/gemini-2.5-flash AND gemini-3.1-pro-preview
Additional provider/model setup details
NOT affected:
ollama/qwen3:14b (naxos-smart) → works correctly
→ Confirms bug is in Gemini-specific parser layer,
not in OpenClaw tool call orchestration layer
Thanks for the context here. I did a careful shell check against current main, and this is already implemented.
Close: current main addresses the reported Google/Gemini post-tool empty final turn by routing direct Google/Vertex Gemini reasoning to native mode, and the proof commit is contained in v2026.6.8-beta.1.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Keep the native-reasoning Google provider implementation and close this report as covered by current main and v2026.6.8-beta.1.
Do we have a high-confidence way to reproduce the issue?
Yes from source for the implicated shape: current comments and tests identify tagged Google reasoning as leaving a post-tool turn empty, matching the reported empty assistant end text. No live Gemini reproduction was run in this read-only review.
Is this the best way to solve the issue?
Yes: using native Gemini reasoning for direct Google/Vertex providers is a provider-owned fix that avoids tagged <think>/<final> prompt behavior while leaving Gemini CLI tagged.
Security review:
Security review: This is an issue triage with no patch under review and no security-sensitive report.
AGENTS.md: found and applied where relevant.
What I checked:
Repository policy read: Root and scoped extension AGENTS.md files were read and applied; provider runtime behavior belongs in the Google plugin and needs source, tests, current behavior, and history proof before close. (AGENTS.md:1, f1b8827d20c8)
Current source fixes the empty post-tool mode: Direct Google/Vertex Gemini now resolves reasoning output to native mode; the code comment documents tagged mode as opening before a tool call and leaving the post-tool turn empty. (extensions/google/provider-registration.ts:27, f1b8827d20c8)
Regression coverage for the routing decision: Google plugin tests assert direct Google Gemini resolves to native reasoning while Gemini CLI remains tagged, preserving the provider-specific fix boundary. (extensions/google/index.test.ts:37, f1b8827d20c8)
Raw stream projection path:assistant_message_end.rawText is derived from extractAssistantText(assistantMessage), so avoiding an empty assistant message is the relevant fix path for the reported raw-stream symptom. (src/agents/embedded-agent-subscribe.handlers.messages.ts:919, f1b8827d20c8)
Fix commit metadata: The proof commit is fix(auto-reply): deliver channel message-tool final replies, committed at 2026-06-14T18:18:20+05:30, and touched the Google provider registration/tests plus embedded message handling. (a15427d605fe)
Likely related people:
ragesaq: Blame attributes the current Google provider native-reasoning guard and the post-tool-empty comment to the proof commit. (role: recent current-main contributor; confidence: medium; commits: a15427d605fe; files: extensions/google/provider-registration.ts, extensions/google/index.test.ts, src/agents/embedded-agent-subscribe.handlers.messages.ts)
steipete: History shows repeated Google transport/provider work, including the move of Gemini transport into the Google plugin. (role: feature-history contributor; confidence: medium; commits: 85826c83e4a1, 1af8bd90c337; files: extensions/google/transport-stream.ts, extensions/google/index.test.ts)
vincentkoc: History shows adjacent Google/provider and shared transport test work on the same reviewed surfaces. (role: recent adjacent contributor; confidence: medium; commits: 8c802aa68351, c03f97f95411, 356110c52f79; files: extensions/google/transport-stream.ts, extensions/google/index.test.ts)
Activity
clawsweeper commentedon May 7, 2026
Thanks for the context here. I did a careful shell check against current
main, and this is already implemented.Close: current main addresses the reported Google/Gemini post-tool empty final turn by routing direct Google/Vertex Gemini reasoning to native mode, and the proof commit is contained in v2026.6.8-beta.1.
I found the merged PR that appears to have closed this: #92738: Forward suppressed-source progress for message-tool channel replies.
So I’m closing this as already implemented rather than keeping a duplicate issue open.
Review details
Best possible solution:
Keep the native-reasoning Google provider implementation and close this report as covered by current main and v2026.6.8-beta.1.
Do we have a high-confidence way to reproduce the issue?
Yes from source for the implicated shape: current comments and tests identify tagged Google reasoning as leaving a post-tool turn empty, matching the reported empty assistant end text. No live Gemini reproduction was run in this read-only review.
Is this the best way to solve the issue?
Yes: using native Gemini reasoning for direct Google/Vertex providers is a provider-owned fix that avoids tagged
<think>/<final>prompt behavior while leaving Gemini CLI tagged.Security review:
Security review: This is an issue triage with no patch under review and no security-sensitive report.
AGENTS.md: found and applied where relevant.
What I checked:
AGENTS.md:1, f1b8827d20c8)extensions/google/provider-registration.ts:27, f1b8827d20c8)extensions/google/index.test.ts:37, f1b8827d20c8)assistant_message_end.rawTextis derived fromextractAssistantText(assistantMessage), so avoiding an empty assistant message is the relevant fix path for the reported raw-stream symptom. (src/agents/embedded-agent-subscribe.handlers.messages.ts:919, f1b8827d20c8)extensions/google/provider-registration.ts:27, a15427d605fe)fix(auto-reply): deliver channel message-tool final replies, committed at 2026-06-14T18:18:20+05:30, and touched the Google provider registration/tests plus embedded message handling. (a15427d605fe)Likely related people:
extensions/google/provider-registration.ts,extensions/google/index.test.ts,src/agents/embedded-agent-subscribe.handlers.messages.ts)extensions/google/transport-stream.ts,extensions/google/index.test.ts)extensions/google/transport-stream.ts,extensions/google/index.test.ts)Codex review notes: model internal, reasoning high; reviewed against f1b8827d20c8; fix evidence: merged PR #92738, release v2026.6.8-beta.1, commit a15427d605fe.
barnacle-openclaw commentedon May 31, 2026
This issue has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.