Antigravity threads looked like they stopped at random. Two bugs caused it:
- The agent woke up and T3 Code was not listening. agy ends its prompt while a backgrounded command still runs. When the command finishes, agy starts a reply by itself with no prompt open: it streams output, runs tools, and asks for permissions. T3 Code had no active turn, so it dropped the output and failed the permission request with
ACP agent requested input without an active turn. The thread stayed idle until the next user message.
html_render pages never showed. agy 1.5.8+ titles T3 tool calls Run mcp_t3-code_<tool>. T3 Code did not recognize the title, so the call became a plain row with no page.
Fixes #36105. Related: #30082, #16442.
Fix#
- The built-in Antigravity adapter now uses the post-settle continuation that Hermes already uses. Output that arrives after the prompt ends starts a continuation run, and a permission request waits for that run.
- agy ends each reply with
usage_update and never sends a prompt response for a reply it started itself. The continuation run now waits for that marker (2 minute limit) instead of the 3 s debounce. In live captures the model was silent for 3.2 to 6.7 s before its first token, which split one reply across several runs.
- T3 tool titles with the
Run / Running prefix are recognized again.
- The registry
agy path gets the same behavior.
No change for other providers: the new behavior is behind flavor flags that only Antigravity and registry agy set.
Proof#
Real agy 1.5.11 through vp run dev. The prompt starts a 20 s background command and ends its turn. Run 1 completed at 02:52:13. Run 2 started by itself at 02:52:27 when the command finished, ran a second command (its permission request was answered inside the run), rendered the page after an 8 s model silence, and completed at 02:52:43.

Before the fix, the native agy log of the affected thread shows the wake-up dying on T3 Code's answer:
17:40:58 (background task finished, agy starts a reply)
17:41:11 session/request_permission RPC failed: JSON-RPC error: ACP request handler failed for method 'session/request_permission' (code -32603)
17:41:11 Tool confirmation ... step 14 (approved=false)
Tests:
AntigravityAdapterV2.test.ts "continues in one run when a finished background command wakes the agent" replays the captured frames. It fails on main with the same requested input without an active turn error.
AcpRegistryAdapterV2.test.ts covers a reply that ends before the continuation starts, and a run woken by a permission request alone.
vp run check:changed passes. vp test run src/orchestration-v2/Adapters: 12 files, 1139 tests pass.
Credit#
This PR takes over work from three open PRs and keeps their commits or credit:
- #36138 by @Codder13: the tool title fix (commit kept).
- #37485 by @drstrangerujn: continuation and detached permission requests for registry
agy (commit kept).
- #30083 by @vedmalex: post-settle continuation for the built-in adapter.
- #35073 by @juliusmarminge: turns with a launched subagent batch still settle.
Not in this PR: #38834 and #37489 fix the same stop by re-prompting agy or polling its native database. The captures show agy already replies by itself, and its database shows no in-flight step while the model thinks, so this PR listens instead.
Known limits: the first run still ends when agy ends its prompt, so the thread shows idle while the background command runs. Stop does not end a command that agy left running (#35073 covers that).
Reviewed with sol-loop: 3 passes with GPT-6.2 Sol. Sol verdict: approved
Created with Claude Fable 5.2 in Claude Code, running in T3 Code. Diagnosis started with Claude Opus 5.5.
🤖 Generated with Claude Code
Thread transfer impact#
✅ Thread transfer remains within every enforced ceiling.
Other scenarios#
All 64 scenario measurements match
main.All 64 scenario measurements
short turn resumeWebSocket decodedshort turn resumeWebSocket messageslong turn running, cold openHTTP decodedlong turn running, cold openrowslong turn running, history pageHTTP decodedlong turn running, history pagerowslong turn finished, cold openHTTP decodedlong turn finished, cold openrowslong turn finished, socket cold openWebSocket decodedlong turn finished, socket cold openWebSocket messageslong turn finished, socket cold openrowslong turn finished, work pageHTTP decodedlong turn finished, work pagerowsidle thread resumeWebSocket decodedidle thread resumeWebSocket messagesfleet shell snapshotHTTP decodedfleet shell snapshotrowsfleet shell subscribeWebSocket decodedfleet shell subscribeWebSocket messagesfleet shell resume checkHTTP decodedfleet shell resume checkrowsstale shell reloadHTTP decodedstale shell reloadrowsstale shell resumeWebSocket decodedstale shell resumeWebSocket messagesstale todo list cold openHTTP decodedstale todo list cold openrowsstale todo list cold opennodesstale todo list cold opensubagentsstale todo list cold openplansstale todo list cold openproviderTurnsstale todo list cold opencheckpointsshort turn resumeWebSocket decodedshort turn resumeWebSocket messageslong turn running, cold openHTTP decodedlong turn running, cold openrowslong turn running, history pageHTTP decodedlong turn running, history pagerowslong turn finished, cold openHTTP decodedlong turn finished, cold openrowslong turn finished, socket cold openWebSocket decodedlong turn finished, socket cold openWebSocket messageslong turn finished, socket cold openrowslong turn finished, work pageHTTP decodedlong turn finished, work pagerowsidle thread resumeWebSocket decodedidle thread resumeWebSocket messagesfleet shell snapshotHTTP decodedfleet shell snapshotrowsfleet shell subscribeWebSocket decodedfleet shell subscribeWebSocket messagesfleet shell resume checkHTTP decodedfleet shell resume checkrowsstale shell reloadHTTP decodedstale shell reloadrowsstale shell resumeWebSocket decodedstale shell resumeWebSocket messagesstale todo list cold openHTTP decodedstale todo list cold openrowsstale todo list cold opennodesstale todo list cold opensubagentsstale todo list cold openplansstale todo list cold openproviderTurnsstale todo list cold opencheckpointsBaseline:
8729bdd· PR result:c707ae2· Source CI: successScenario and decoded snapshot size
10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.