# Minimal repro: googleSearch invocation closes Live session with 1007
**For filing at https://issuetracker.google.com (component: Generative Language API / Live API).**
## Summary
On `gemini-3.1-flash-live-preview` (v1beta `BidiGenerateContent` WebSocket) with
`tools: [{“googleSearch”: {}}]` declared, certain user questions cause the server to close the
socket with:
```
close_code=1007
close_reason=Request contains an invalid argument.
```
within ~2 seconds of the question — apparently the model’s internally generated search
sub-request being rejected, tearing down the whole Live session instead of failing the turn.
Worse: because the session-resumption context contains the pending question, **every resumed
session re-attempts the search and dies the same way seconds after `setupComplete`**, making the
failure unrecoverable via `sessionResumption` (observed loop: 4 consecutive resume-then-1007
cycles in a production session).
## Repro (three variants, identical except where noted)
Client: raw WebSocket, setup = model `gemini-3.1-flash-live-preview`, `responseModalities:
[“AUDIO”]`, input/output transcription on, `contextWindowCompression.slidingWindow`,
`sessionResumption: {}`, `tools: [{“googleSearch”: {}}]`. Stream 640×480 JPEG frames at 2 fps +
continuous 16 kHz PCM silence. At t=20 s send via `realtimeInput.text`:
| Variant | tools | Question at t=20s | Result |
|—|—|—|—|
| A | googleSearch | “What are the wealthiest neighborhoods in Miami right now? Search if needed.” | **1007 close at t=21.6s** |
| A2 | googleSearch | “What is the weather in Miami right now? Search if needed.” | Works: grounded answer, groundingMetadata, session healthy |
| B | (none) | same as A | Works: answered from model knowledge, session healthy |
Only the question differs between A and A2; only the tool declaration differs between A and B.
The failure is deterministic for the variant-A question in our testing (reproduced in production
and in this harness on 2026-08-12).
## Expected
A rejected search sub-request should fail that tool invocation (or the turn) gracefully —
not close the Live session, and not poison the resumption context.