openclaw - 💡(How to fix) Fix [Bug]: google provider stalls before first event with non-trivial prompts in 2026.5.7 (new @google/genai SDK)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

After Hostinger's auto-update bumped OpenClaw 2026.4.21 → 2026.5.7 (and Node 22.22.2 → 24.15.0), agent runs against google/gemini-* models stall before any first event when the prompt is non-trivial. The same model succeeds in seconds on a 50-char prompt. Direct curl and Node 24 fetch() to the same Gemini endpoint stream cleanly from inside the same container, so network, Node, and the Gemini API are healthy. The Google provider was rewritten in this version as a thin wrapper around @google/[email protected].

Error Message

  • Severity: blocks workflow. Cron status error, no delivery.

Root Cause

After Hostinger's auto-update bumped OpenClaw 2026.4.21 → 2026.5.7 (and Node 22.22.2 → 24.15.0), agent runs against google/gemini-* models stall before any first event when the prompt is non-trivial. The same model succeeds in seconds on a 50-char prompt. Direct curl and Node 24 fetch() to the same Gemini endpoint stream cleanly from inside the same container, so network, Node, and the Gemini API are healthy. The Google provider was rewritten in this version as a thin wrapper around @google/[email protected].

Fix Action

Fix / Workaround

Impact and severity

  • Affected: any agent run on google/gemini-* models with prompts above some threshold. In this deployment, a daily cron (~9k char payload + tool-call returns) has been failing on every fire since the 2026.5.7 image landed.
  • Severity: blocks workflow. Cron status error, no delivery.
  • Frequency: 3/3 observed attempts with full-size payload stalled; 1/1 succeeded with tiny payload; 1/1 succeeded after switching to anthropic/claude-sonnet-4-6.
  • Workaround: switch to the Anthropic provider, or keep prompts trivially small.

Code Example

[diagnostic] stalled session: sessionId=<id> state=processing age=124s
  reason=active_work_without_progress classification=stalled_agent_run
  activeWorkKind=model_call lastProgress=model_call:started ...

---

$ curl -sS -o /dev/null -w "http_version=%{http_version} time_starttransfer=%{time_starttransfer}s time_total=%{time_total}s\n" \
    --max-time 15 "https://generativelanguage.googleapis.com/v1beta/models?key=$GEMINI_API_KEY"
http_version=2 time_starttransfer=0.125431s time_total=0.127603s

---

session.started      ts=19:54:21.128Z
trace.metadata       ts=19:54:21.131Z
context.compiled     ts=19:54:21.135Z   data.sizeApprox=75129 chars
prompt.submitted     ts=19:54:21.138Z   inputApproxChars=40340
# no further events; killed at 15-min timeout

---

session.started      ts=20:11:49.374Z
trace.metadata       ts=20:11:49.376Z
context.compiled     ts=20:11:49.380Z
prompt.submitted     ts=20:11:49.382Z
model.completed      ts=20:11:55.414Z   ← +6.0s
session.ended        ts=20:11:55.414Z

---

import { GoogleGenAI } from "@google/genai";
function createGoogleGenAI(options) {
  return new GoogleGenAI(options);
}
export { createGoogleGenAI as t };
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked in 2026.4.21, fails in 2026.5.7)

Beta release blocker

No

Summary

After Hostinger's auto-update bumped OpenClaw 2026.4.21 → 2026.5.7 (and Node 22.22.2 → 24.15.0), agent runs against google/gemini-* models stall before any first event when the prompt is non-trivial. The same model succeeds in seconds on a 50-char prompt. Direct curl and Node 24 fetch() to the same Gemini endpoint stream cleanly from inside the same container, so network, Node, and the Gemini API are healthy. The Google provider was rewritten in this version as a thin wrapper around @google/[email protected].

Steps to reproduce

  1. Run OpenClaw 2026.5.7 from the Hostinger Docker image ghcr.io/hostinger/hvps-openclaw@sha256:cd1b3ce687567fcd05cca18346c82bd4fa875a1401083248de933dff4c97dc5e (Node 24.15.0, @google/[email protected]).
  2. Create or edit a cron job with model: google/gemini-3.1-pro-preview (also reproduces with google/gemini-3-flash-preview) and a payload.message around 9k chars.
  3. openclaw cron run <id>.
  4. Observe the trajectory writes session.started → trace.metadata → context.compiled → prompt.submitted and then no further events. Gateway logs [diagnostic] stalled session ... activeWorkKind=model_call lastProgress=model_call:started every 30s until the 15-min timeout.
  5. Replace payload.message with "Reply with exactly the word OK and nothing else." (~50 chars) and re-run. Completes in ~6s, model.completed emitted normally.

Expected behavior

In 2026.4.21 the same cron with the same ~9k-char prompt and the same Gemini model completed in ~30–60s and delivered the brief. Cron run history shows the last successful run at ts=1778500895140 (2026-05-11 14:01 UTC) on the prior image.

Actual behavior

Three consecutive runs on 2026.5.7 stalled identically:

  • Scheduled run 08:00 ET on google/gemini-3-flash-preview — killed at 15-min timeout, lastDiagnostics.summary: "cron: job execution timed out".
  • Manual cron run on google/gemini-3-flash-preview — same pattern.
  • Manual cron run after cron edit --model google/gemini-3.1-pro-preview — same pattern.

Then with the SAME model and a 48-char message: completed in 6s. Then with anthropic/claude-sonnet-4-6 and the FULL 9k-char message: completed in 3m37s.

Representative stall:

[diagnostic] stalled session: sessionId=<id> state=processing age=124s
  reason=active_work_without_progress classification=stalled_agent_run
  activeWorkKind=model_call lastProgress=model_call:started ...

OpenClaw version

2026.5.7 (regression from 2026.4.21)

Operating system

Ubuntu 24.04 (Hostinger VPS), Docker

Install method

Docker — Hostinger HVPS managed image. Auto-updated 2026-05-12 09:46 UTC from sha256:65648773caab6a45afc00a218e13568c8798f2722f970a56e1bdb5dac9172ba5 (2026.4.21 + Node 22.22.2) to sha256:cd1b3ce687567fcd05cca18346c82bd4fa875a1401083248de933dff4c97dc5e (2026.5.7 + Node 24.15.0).

Model

google/gemini-3.1-pro-preview and google/gemini-3-flash-preview (same symptom on both)

Provider / routing chain

openclaw → google (@google/[email protected] SDK → https://generativelanguage.googleapis.com/v1beta)

Additional provider/model setup details

  • API key auth via GEMINI_API_KEY env var.
  • No proxy.
  • thinking: "medium" in payload.
  • Anthropic provider on the same image works for the same prompt content.

Logs, screenshots, and evidence

Network from inside the container is healthy (HTTP/2, 125ms TTFB):

$ curl -sS -o /dev/null -w "http_version=%{http_version} time_starttransfer=%{time_starttransfer}s time_total=%{time_total}s\n" \
    --max-time 15 "https://generativelanguage.googleapis.com/v1beta/models?key=$GEMINI_API_KEY"
http_version=2 time_starttransfer=0.125431s time_total=0.127603s

SSE streaming via curl returns a full Gemini response in ~0.55s.

Native Node 24 fetch() to the same endpoint: status=200, first byte in 585ms, chunks delivered.

Trajectory for the stalled run (large prompt, gemini-3.1-pro-preview):

session.started      ts=19:54:21.128Z
trace.metadata       ts=19:54:21.131Z
context.compiled     ts=19:54:21.135Z   data.sizeApprox=75129 chars
prompt.submitted     ts=19:54:21.138Z   inputApproxChars=40340
# no further events; killed at 15-min timeout

Trajectory for same model, tiny prompt (succeeds):

session.started      ts=20:11:49.374Z
trace.metadata       ts=20:11:49.376Z
context.compiled     ts=20:11:49.380Z
prompt.submitted     ts=20:11:49.382Z
model.completed      ts=20:11:55.414Z   ← +6.0s
session.ended        ts=20:11:55.414Z

dist/google-genai-runtime-CLWhR3E0.js is a 7-line wrapper:

import { GoogleGenAI } from "@google/genai";
function createGoogleGenAI(options) {
  return new GoogleGenAI(options);
}
export { createGoogleGenAI as t };

i.e. streaming is delegated entirely to @google/[email protected].

Impact and severity

  • Affected: any agent run on google/gemini-* models with prompts above some threshold. In this deployment, a daily cron (~9k char payload + tool-call returns) has been failing on every fire since the 2026.5.7 image landed.
  • Severity: blocks workflow. Cron status error, no delivery.
  • Frequency: 3/3 observed attempts with full-size payload stalled; 1/1 succeeded with tiny payload; 1/1 succeeded after switching to anthropic/claude-sonnet-4-6.
  • Workaround: switch to the Anthropic provider, or keep prompts trivially small.

Additional information

  • Last known good: 2026.4.21 + Node 22.22.2 (Hostinger image sha256:65648773caab...).
  • First known bad: 2026.5.7 + Node 24.15.0 (Hostinger image sha256:cd1b3ce687567fcd...).
  • The Google provider was rewritten in this release onto @google/[email protected]; the old custom HTTP/streaming files (e.g. gemini-web-search-provider-*, magic-string.es-*) are gone and the new entry point is the thin google-genai-runtime-*.js wrapper shown above.
  • May be related to #80926 — same "stalls before first event" signature in 2026.5.x — though the trigger there is the OpenAI memory tools, not prompt size, and the provider is Azure OpenAI Responses rather than Google.
  • Happy to attach OPENCLAW_DEBUG_MODEL_TRANSPORT=1 OPENCLAW_DEBUG_SSE=events OPENCLAW_DEBUG_MODEL_PAYLOAD=summary logs if a maintainer needs them.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

In 2026.4.21 the same cron with the same ~9k-char prompt and the same Gemini model completed in ~30–60s and delivered the brief. Cron run history shows the last successful run at ts=1778500895140 (2026-05-11 14:01 UTC) on the prior image.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: google provider stalls before first event with non-trivial prompts in 2026.5.7 (new @google/genai SDK)