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
google/gemini-3.1-pro-preview (thinkingLevel: high) reliably hangs after a few tool-call rounds in any flow where conversation history was authored by a different provider/model — e.g. subagents spawned from a Claude or GPT orchestrator. Failure mode: gateway logs LLM idle timeout (600s): no response from model and the run dies. Trivial single-turn calls to the same model with the same key work in 3 seconds.
This is the bug reported in #74244 and #72127 (and several earlier #58235, #63397). All were autoclosed by the clawsweeper bot citing a "no longer reproducible" or "already fixed" rationale. Original reporter @YouFoundJK pushed back in #74244 with a screenshot reproduction on gemini-3.1-pro-preview and posted a verified-working blueprint fix on 2026-04-29. No human maintainer ever responded; no PR was opened. The bug persists in 2026.5.3-1, which is the current latest stable release.
Status in shipped 2026.5.3-1
The exact code path @YouFoundJK identified as the problem is still present in the shipped dist:
isSameProviderAndModel gates signature forwarding. For any conversation where assistant turns were authored by a different provider or model than the one currently being called (subagents, model switches, fallback chains), thoughtSignature is silently dropped from the outbound functionCall parts. Gemini 3.x then hangs (per Google docs, missing-signature should be a 400 INVALID_ARGUMENT, but in practice it manifests as a silent stall).
The recommended fallback string "skip_thought_signature_validator" (per Google's thought-signatures docs) is not present anywhere in /app/dist/ of 2026.5.3-1, so neither the original-signature path nor the fallback path covers cross-provider replay.
Reproduction fingerprint (5 captured runs)
Five subagent runs on google/gemini-3.1-pro-preview with thinkingLevel: high and a multi-step exec-tool task. All five hung identically. Captured directly from gateway-persisted JSONL transcripts:
Every persisted thinking content block in the failing transcripts has type: "thinking" (native, not text-tagged), 300–600 chars of text, and no signature / thoughtSignature / thinkingSignature field on the persisted block.
Not auth / quota / billing. A trivial single-turn probe to gemini-3.1-pro-preview (one-word reply, no tools) returns in 3s.
Not the surrounding pipeline. The same orchestrator → subagent code path with claude-opus-4-7 instead of Gemini completes cleanly with similar tool-call counts. Two such transcripts captured (11 assistant turns, 18 tool calls, 6–8 thinking blocks each, no errors).
This narrows the failure to the Gemini transport's outbound serialization of cross-provider assistant history — exactly what @YouFoundJK identified.
Asks
Re-open [Bug]: Gemini API error (400): missing thought_signature #74244 (or supersede with this one). The clawsweeper autoclose was incorrect — code review missed the isSameProviderAndModel gate that strips signatures on cross-provider replay, and ignored the original reporter's request for human verification. Consider requiring a human re-check before autoclosing Gemini 3.x bug reports going forward.
Land @YouFoundJK's blueprint fix (or an equivalent maintainer-cleaned version) covering all three gaps:
transport-message-transform.ts — stop stripping thoughtSignature from cross-provider history; let downstream transports decide.
transport-stream.ts — always include thoughtSignature on functionCall parts; use "skip_thought_signature_validator" fallback (per Google docs) when no captured signature is available.
openai-transport-stream.ts — collect signatures from all history (not just same-model).
Make the failure mode loud. A silent 600 s idle timeout with no diagnostic about a known protocol gap is very hard to root-cause downstream. Either surface Google's 400 INVALID_ARGUMENT: missing thought_signature to the gateway log/error path, or fast-fail when an outbound Gemini call would emit a functionCall part with no signature.
Environment
OpenClaw 2026.5.3-1 (release tag, latest stable as of 2026-05-04)
google/gemini-3.1-pro-preview via Google AI Studio API key (no Vertex, no proxy)
Linux container, Node 24.14.0
thinkingDefault: medium globally; the affected reviewer agents run with thinkingLevel: high
Summary
google/gemini-3.1-pro-preview(thinkingLevel: high) reliably hangs after a few tool-call rounds in any flow where conversation history was authored by a different provider/model — e.g. subagents spawned from a Claude or GPT orchestrator. Failure mode: gateway logsLLM idle timeout (600s): no response from modeland the run dies. Trivial single-turn calls to the same model with the same key work in 3 seconds.This is the bug reported in #74244 and #72127 (and several earlier #58235, #63397). All were autoclosed by the
clawsweeperbot citing a "no longer reproducible" or "already fixed" rationale. Original reporter @YouFoundJK pushed back in #74244 with a screenshot reproduction ongemini-3.1-pro-previewand posted a verified-working blueprint fix on 2026-04-29. No human maintainer ever responded; no PR was opened. The bug persists in2026.5.3-1, which is the current latest stable release.Status in shipped 2026.5.3-1
The exact code path @YouFoundJK identified as the problem is still present in the shipped dist:
isSameProviderAndModelgates signature forwarding. For any conversation where assistant turns were authored by a different provider or model than the one currently being called (subagents, model switches, fallback chains),thoughtSignatureis silently dropped from the outboundfunctionCallparts. Gemini 3.x then hangs (per Google docs, missing-signature should be a400 INVALID_ARGUMENT, but in practice it manifests as a silent stall).The recommended fallback string
"skip_thought_signature_validator"(per Google's thought-signatures docs) is not present anywhere in/app/dist/of 2026.5.3-1, so neither the original-signature path nor the fallback path covers cross-provider replay.Reproduction fingerprint (5 captured runs)
Five subagent runs on
google/gemini-3.1-pro-previewwiththinkingLevel: highand a multi-stepexec-tool task. All five hung identically. Captured directly from gateway-persisted JSONL transcripts:thoughtSignature<think>text tagsLLM idle timeout (600s)LLM idle timeout (600s)request timed outLLM idle timeout (600s)LLM idle timeout (600s)Persisted gateway error record from one run:
{ "type": "custom", "customType": "openclaw:prompt-error", "data": { "provider": "google", "model": "gemini-3.1-pro-preview", "api": "google-generative-ai", "error": "LLM idle timeout (600s): no response from model" } }Every persisted thinking content block in the failing transcripts has
type: "thinking"(native, not text-tagged), 300–600 chars of text, and nosignature/thoughtSignature/thinkingSignaturefield on the persisted block.What was checked / ruled out
HTTP_PROXY/HTTPS_PROXYare unset on both host and gateway, so [Bug]: CLI and WebUI silent failure/hang when calling Gemini via HTTP proxy (v2026.4.21) #70453 / commitca620fb(env-proxy provider routing, shipped in 2026.5.3-1) does not apply.<think>text-tag bug from Gemini text-tag reasoning conflicts with native thinking — produces unclosed <think>, empty post-tool turn, payloads=0 #69220. No<think>/</think>/<final>tags appear anywhere in the failing transcripts; the model is emitting native thinking parts, not text-tagged ones. (Note:BUILTIN_REASONING_OUTPUT_MODES["google-generative-ai"] = "tagged"is still in/app/dist/provider-utils-*.js, so Gemini text-tag reasoning conflicts with native thinking — produces unclosed <think>, empty post-tool turn, payloads=0 #69220 may still bite other users on lower thinking levels.)gemini-3.1-pro-preview(one-word reply, no tools) returns in 3s.claude-opus-4-7instead of Gemini completes cleanly with similar tool-call counts. Two such transcripts captured (11 assistant turns, 18 tool calls, 6–8 thinking blocks each, no errors).This narrows the failure to the Gemini transport's outbound serialization of cross-provider assistant history — exactly what @YouFoundJK identified.
Asks
thought_signature#74244 (or supersede with this one). The clawsweeper autoclose was incorrect — code review missed theisSameProviderAndModelgate that strips signatures on cross-provider replay, and ignored the original reporter's request for human verification. Consider requiring a human re-check before autoclosing Gemini 3.x bug reports going forward.transport-message-transform.ts— stop strippingthoughtSignaturefrom cross-provider history; let downstream transports decide.transport-stream.ts— always includethoughtSignatureonfunctionCallparts; use"skip_thought_signature_validator"fallback (per Google docs) when no captured signature is available.openai-transport-stream.ts— collect signatures from all history (not just same-model).400 INVALID_ARGUMENT: missing thought_signatureto the gateway log/error path, or fast-fail when an outbound Gemini call would emit afunctionCallpart with no signature.Environment
2026.5.3-1(release tag, latest stable as of 2026-05-04)google/gemini-3.1-pro-previewvia Google AI Studio API key (no Vertex, no proxy)24.14.0thinkingDefault: mediumglobally; the affected reviewer agents run withthinkingLevel: high