[Bug]: Antigravity turn stalls mid-response with "Thinking" / spinner indefinitely
Summary
In an Antigravity (gemini-3.8-flash) session, the assistant finished generating its full response in the backend, but streaming stalled mid-response in the UI. The turn remained stuck indefinitely in a "Thinking" state with the spinner and Stop button active.
Evidence

Observed Details
- Backend finished: In the backend conversation log (
transcript.jsonl), the step completed with statusDONE(133 tokens generated). - UI state stuck: In
statev2.sqlite,orchestration_v2_projection_turn_itemsremained stuck withstatus: "running"andstreaming: true, truncated right at the first text chunk. - Bridge deadlock:
session/prompthas no timeout in T3 Code. The underlyingagy_acp_serverprompt handler hung waiting for anIDLE_SENTINEL/is_idleevent from the localharness WebSocket, so it never emitted the terminal JSON-RPCPromptResponse(stop_reason="end_turn"). - Environment: T3 Code (Beta), macOS (Apple Silicon), Provider: Antigravity (
gemini-3.8-flash).
Can also confirm this exact behavior on Linux x86_64 (Arch / Omarchy).
Environment Details
- OS: Linux 7.2.15-1-omarchy (Arch-based), x86_64
- T3 Code Version: Beta 0.1.7 (Electron 44.10.1 / Chromium 152)
- Model:
gemini-3.8-flashvia Antigravity harness - Antigravity ACP Server:
linux-x64/versions/923923a0d7dc8073f66cc6f78647a3107e3a7ee2b7e1a24df8b3927b5188013b/agy_acp_server.par
Observed Logs & Telemetry
- Backend Transcript: In
transcript.jsonl, the step finishes withstatus: "DONE"and all tokens are generated cleanly. - ACP Event Log: In
~/.t3/userdata/logs/provider/events.<threadId>.log, thesession/promptmethod starts ("status": "started"), but never receives the terminal"status": "succeeded"event:{"method":"session/prompt","status":"started","request":{"valueType":"object","fieldCount":2}} - Deadlock / Stop behavior: The UI remains stuck in the "Thinking" state until pressing the red Stop button. Pressing Stop forces an interruption across the Effect fibers in
server.trace.ndjson:
Once interrupted, the thread finally unlocks intoEffectOutbox.signalCancellations InterruptError: All fibers interrupted without errorDonewith the full generated response already present in the view.
Confirming that this is cross-platform and directly linked to agy_acp_server not dispatching the terminal prompt response / end-of-turn signal when running without tools or after completion.
Additional Reproduction & Root-Cause Confirmation (macOS Apple Silicon)
Encountered this exact stall in thread 19efa2c5-41dd-4373-9111-4a58f307cd63. Importantly, to clarify the symptom: the model actually finishes generating its response completely on the backend—it is not stalled mid-generation, but hangs right when completing the turn because the end-of-turn signal never dispatches.
Environment
- OS: macOS 27.0.0 (darwin arm64)
- T3 Code:
0.1.8-nightly.20261107.4301(Electron 44.10.1 / Chromium 152 / Node v24.22.1) - Provider / Model: Antigravity (
gemini-3.8-flash) - Binary:
agy_acp_server.par(darwin-arm64/versions/f9bdd68291ae78c38d2141e63bc86b84e6cc7b9f60f71652c68435a7943deb17)
Verified Source Call Path & Deadlock Trace
Inspecting the Python runtime within agy_acp_server.par reveals the exact blocking point:
- In
agent_acp_server.prompt(), the prompt lifecycle is driven by draining the step stream:async for step in agent.conversation.receive_steps(): await self._stream_live_step(...) - In
LocalConnection.receive_steps(), the loop awaits steps fromself._processor.step_queue:while True: if self.is_idle and self._processor.step_queue.empty(): return step_obj = await self._processor.step_queue.get() if step_obj is event_processor.IDLE_SENTINEL: continue yield step_obj - In
LocalHarnessEventProcessor.process_event(),self.is_idle.set()andself.step_queue.put(IDLE_SENTINEL)are only executed when atrajectory_state_updatewithState.STATE_FULLY_IDLEis received forself.main_trajectory_id. - When
localharness_externaldoes not emitSTATE_FULLY_IDLEfor the main trajectory after the final planner step:IDLE_SENTINELis never enqueued intostep_queue.receive_steps()hangs indefinitely atawait self._processor.step_queue.get(). Process sampling ofagy_acp_server.parconfirms the reader thread remains parked on_queue_SimpleQueue_get/_pthread_cond_wait.prompt()never completes, so the terminal JSON-RPCPromptResponse(stopReason="end_turn")is never sent across stdio to T3 Code.
- In T3 Code's server (
AcpSessionRuntime.ts),session/prompthas no client-side inactivity watchdog, so the turn remains instatus: "running"with the UI spinner active until the user clicks "Stop" (which triggers cancellation viaEffectOutbox.signalCancellations).
Telemetry Evidence
- Backend Transcript: In
transcript.jsonl, step 497 hastype: "PLANNER_RESPONSE",status: "DONE", and generated all 541 output tokens cleanly. - Provider Event Log (
events.<threadId>.log):session/promptstarts ("status": "started"), but never logs"status": "succeeded"or"status": "failed". - Database (
statev2.sqlite): Inorchestration_v2_projection_turn_items, theassistant_messagerecord remains instatus: "running"withstreaming: trueandcompletedAt: null.
Reported via t3 triage with gemini-3.8-flash (Antigravity harness).
This is the same problem as #30271, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.