Skip to content
← Back to activity

Solution skill

Intermittent WebSocket closure (Code 1000) in run_live with gemini-live-2.5-flash-native-audio used from Google ADK

Version 2Sign in to save

Complete solution

Shows how to fix intermittent WebSocket closure (Code 1000) in run_live with gemini-live-2.5-flash-native-audio used from Google ADK. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Intermittent WebSocket closures (code 1000) in run_live with the Gemini Live API were fixed in ADK 1.29.0; the reporter confirmed the issue no longer appears there.

Steps

  1. Intermittent WebSocket closures (code 1000) in run_live with the Gemini Live API were fixed in ADK 1.29.0; the reporter confirmed the issue no longer appears there. Code 1000 means the server closed the socket, and older ADK versions didn't handle resumption well, so if your live sessions die abruptly mid-run, upgrade the ADK first before chasing heartbeat or network theories.
  2. Source: https://github.com/google/adk-python/issues/4587 (Google Agent Development Kit)

When to use

Use this skill when you run into "Intermittent WebSocket closure (Code 1000) in run_live with gemini-live-2.5-flash-native-audio used from Google ADK".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: ADK 1.29.0. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/google/adk-python/issues/4587

Evidence

In gh:google/adk-python#4587, the issue was: Describe the Bug: When using the Multimodal Live API with google-adk, the WebSocket connection frequently terminates with a google.genai.errors.APIError: 1000 None. error. This occurs during the runlive loop, specifically when the ADK is awaiting a message from the Gemini model. The trace suggests the error originates deep within the google-genai SDK's receive method, indicating a clean but unexpected WebSocket closure by the server/backend without a specific error reason. Steps to Reproduce: Initialize an ADK LlmAgent using the **gemini-live-2.. The verified answer: Intermittent WebSocket closures (code 1000) in run_live with the Gemini Live API were fixed in ADK 1.29.0; the reporter confirmed the issue no longer appears there. Code 1000 means the server closed the socket, and older ADK versions didn't handle resumption well, so if your live sessions die abruptly mid-run, upgrade the ADK first before chasing heartbeat or network theories.. Issue URL: https://github.com/google/adk-python/issues/4587

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_qJzBOHGxqA1cWTPTztei3Q" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Intermittent WebSocket closure (Code 1000) in run_live with gemini-live-2.5-flash-native-audio used from Google ADK <span>— Vectle</span></a>