Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Antigravity session is released 30 minutes after a turn while its background run_command still runs, killing the command (0.1.13) #47933

Closedaw632(GitHub profile, opens in a new tab) opened this issue 1 comment
aw632(GitHub profile, opens in a new tab)commented

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

This is closely related to #41700, which reports the same root cause on a nightly build. I am filing it separately because the timeline on stable 0.1.13 is different, and it adds a raw ACP capture showing that agy reports the command correctly. Close it as a duplicate if you prefer to track both there. The open fix is #41701.

Area

apps/server

Steps to reproduce

  1. Run t3 serve with an Antigravity provider instance signed in, and add any git project.

  2. Start a thread on that provider:

    t3 thread start . 'Run this shell command as a background command, so it keeps running after your reply ends: sleep 2400; date -u > /tmp/agy-done   Do not wait for it to finish. Then reply with exactly one line: launched, waiting.' --provider <antigravity-instance> --model gemini-4-neon
  3. Confirm the reply "launched, waiting." arrives and sleep 2400 is running as a child of agy acp.

  4. Leave the thread alone for 40 minutes.

Expected behavior

T3 keeps the Antigravity session open while the command runs, as it does for Claude. When the command exits, agy replies on its own and /tmp/agy-done exists.

Actual behavior

T3 never pins the session. It closes it exactly 30 minutes after the turn ends, which kills agy acp and the background command. /tmp/agy-done never appears, and no wake reaches the thread.

Timeline from one run (UTC, December 3, 2026):

TimeEvent
01:02:34.135session/prompt returns. The run is marked completed right away.
01:02:34 to 01:32:34No idle-release-deferred is logged. sleep 2400 keeps running.
01:32:34.161ProviderSessionManager.releaseIfStillIdle runs, 30 minutes after the prompt ended.
01:32:34.166T3 sends session/close. The session moves to stopped.
by 01:34:27agy acp, the bash wrapper and sleep 2400 are all gone.

This differs from the timeline in #41700. There, a post-settle hold keeps the turn open for about 30 minutes and the release comes at about 60 minutes. On 0.1.13 the run completes at prompt end, so the release comes 30 minutes after the turn ends. A command gets 30 minutes, not 60.

agy reports the command correctly. In a raw ACP capture against stock agy acp 1.5.11, with no T3 involved:

  • the run_command tool call has kind: "execute" and rawInput.IsDaemon: false
  • its last update before session/prompt returns end_turn (at 24.32 s) has status: "in_progress"
  • when the command exits (169.38 s), agy sends an unsolicited tool_call_update with status: "completed", then a self-initiated reply

So antigravityCommandOutlivesPrompt should match this tool call, and the session is still useful after the prompt ends.

The likely cause is the one #41700 describes. The Antigravity flavor defines no extractBackgroundTaskId, so the command never enters runningBackgroundTaskIds. Once the run is finalized, sessionHasPendingBackgroundWork in packages/provider-acp/src/server/adapter.ts finds nothing pending, and the idle release closes the session.

Control: the same setup with the Claude driver and a sleep 900 started with run_in_background logs idle-release-deferred every 2 minutes. The command finishes and claude-wake-turn-detected fires.

Impact

Major degradation or frequent failure

Version or commit

0.1.13

Environment

Linux x86_64, t3 serve headless, Antigravity CLI 1.5.11, Gemini 4 Neon. For sign-in, T3's binaryPath pointed at a two-line shell script that runs agy acp --disable-telemetry with the machine's existing agy login instead of T3's per-profile --gemini-dir. The script does not touch ACP traffic.

Logs or stack traces

From a long-running deployment, when the user's next turn started after the release:

WARN: orchestration V2 provider event ingestion failed
  cause: RunExecutionIngestError: Failed while ingesting orchestration V2 run execution run:thread:<id>:ordinal:19.
    [cause]: ProviderAdapterEventStreamError: Failed while streaming antigravity provider session provider-session:provider-instance:<instance>:thread:<id>:<uuid> events.
      [cause]: Error: Provider session released: idle_timeout.

Raw ACP lines from the capture (paths shortened):

{"t": 19.36, "msg": {"method": "session/update", "params": {"update": {"sessionUpdate": "tool_call_update", "toolCallId": "call_15284825182459233380", "name": "run_command", "status": "in_progress", "kind": "execute", "rawInput": {"CommandLine": "sleep 150; date -u > /tmp/p/done", "IsDaemon": false, "WaitMsBeforeAsync": 500}}}}}
{"t": 24.32, "msg": {"result": {"stopReason": "end_turn"}, "id": 4}}
{"t": 169.38, "msg": {"method": "session/update", "params": {"update": {"sessionUpdate": "tool_call_update", "toolCallId": "call_15284825182459233380", "name": "run_command", "status": "completed", "kind": "execute", "rawOutput": {"output": "Command exited with code 0.\n\nNo output from the command.", "exit_code": 0}}}}}
{"t": 173.24, "msg": {"method": "session/update", "params": {"update": {"sessionUpdate": "agent_message_chunk", "content": {"type": "text", "text": "\n\nThe background command (`sleep 150; date -u > /"}}}}}

Workaround

Keep the turn open by having the agent block on its own command, or run long jobs outside the agent session. Neither works for jobs the agent launches and then waits on across turns.

  1. tanstack-source added labelsbug

  2. This is the same problem as #41700, so I'm closing it in favour of that one. If it is different, say how and it will be reopened.

  3. juliusmarminge closed this

Sign in to join this conversation.