fix #76071: handle thoughtSignature-only parts to prevent Gemini stream hang#76080
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. for the transport liveness gap: current main parses signature-only Google SSE parts without yielding an event, while the idle watchdog only resets after yielded events. The full production hang still depends on live Gemini behavior, which was not rerun in this read-only review. Next step before merge Security Review detailsBest possible solution: Land the Google-owned transport fix once required CI is green, keeping the activity signal within the existing Do we have a high-confidence way to reproduce the issue? Yes for the transport liveness gap: current main parses signature-only Google SSE parts without yielding an event, while the idle watchdog only resets after yielded events. The full production hang still depends on live Gemini behavior, which was not rerun in this read-only review. Is this the best way to solve the issue? Yes. Handling signature-only chunks in the Google transport with an empty What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 473fc0aad84a. |
…eam hang Gemini 3.1 Pro Preview may emit parts with only thoughtSignature and no text content, causing the stream to stall. Emit a thinking_signature event to keep the stream active, and start a thinking block when these parts arrive before any text. Fixes openclaw#76071
obviyus
left a comment
There was a problem hiding this comment.
Verified the Google transport liveness bug: signature-only Gemini thinking chunks now flow through the existing thinking event protocol instead of the out-of-contract event added earlier.
Maintainer follow-up: simplified the stream path, removed the extra comment, normalized the changelog entry, and rebased onto current main.
Local gate: skipped tests per maintainer request; changelog formatting and attribution checks ran.
|
Landed on main. Thanks @zhangguiping-xydt. |
Summary
Fixes #76071 — Gemini 3.1 Pro Preview hangs in agent runtime
Issue
[Bug]: Gemini 3.1 Pro Preview hangs in agent runtime; direct API works in seconds, openclaw idle-times-out at full timeoutSeconds
Changes
fix(google): handle thoughtSignature-only parts to prevent Gemini stream hangChanged Files
Root Cause
Gemini 3.1 Pro Preview may emit parts with only
thoughtSignatureand no text content, causing the transport stream to stall atidle-timeout.Fix
Emit a
thinking_signatureevent forthoughtSignature-only parts to keep the stream active, and start a thinking block when these parts arrive before any text.