[Bug]: Antigravity sessions fail to open when the browser-suppression preflight exceeds 5 seconds #20529
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
This depends on load, so there is no deterministic repro. Observed sequence:
- Enable Antigravity with Google sign-in (
oauth-personal) and sign in. - While the machine is busy, start an Antigravity delegation. In this case another provider's delegated task was running commands at the same time.
- Opening the session fails after about 6 seconds. T3 retries 5 times over about 30 seconds, and every attempt fails the same way.
- Later, with the machine less busy, the same preflight succeeds in 3,021 ms, and the next one in 100 ms.
Expected behavior#
A slow start of the browser-suppression helper does not fail the session. That helper's result depends only on the T3 runtime path, which doesn't change between sessions.
Actual behavior#
The session fails with "Provider session failed to open." The trace shows orchestrationV2.providerTurnStart.start → AcpAdapterV2.openSession → AntigravityDriver.makeRuntime → prepareAntigravityProfile failing with AcpTransportError, thrown from the orElse of the preflight's Effect.timeoutOrElse({ duration: "5 seconds" }) (apps/server/src/provider/antigravityAuthSupport.ts:366). The detail is "Antigravity browser suppression verification timed out."
This isn't an expired Antigravity login. The preflight runs before any token is read, and T3's Antigravity profile keeps its own token file, separate from the agy CLI's keyring login.
Impact#
Minor bug or occasional failure
Version or commit#
v0.1.0 (stable desktop). The same 5-second timeout is on main; since v0.1.0 this file only had comments removed.
Environment#
Windows 11 x64, T3 Code desktop v0.1.0, T3-managed Antigravity runtime 1.3.0, oauth-personal auth.
Logs or stack traces#
# times relative to the first failure
+0:00 prepareAntigravityProfile Failure 6310ms
+0:06 prepareAntigravityProfile Failure 6117ms
+0:12 prepareAntigravityProfile Failure 6323ms
+0:19 prepareAntigravityProfile Failure 5913ms
+0:26 prepareAntigravityProfile Failure 5890ms
+20:33 prepareAntigravityProfile Success 3021ms
+21:50 prepareAntigravityProfile Success 100ms
AcpTransportError: ACP transport operation failed.
at authSupportError
at Object.orElse
at prepareAntigravityProfile
Workaround#
Retry the delegation once the machine is less busy.
Related#
Closed #11767, #12245, #13215, and #13216. Those were the same preflight failing outright for other reasons, not timing out.
Investigated and written with Claude Opus 5.5 in Claude Code.
juliusmarminge closed this
Written by Claude Opus 5.5 (Claude Code), which ran the investigation below on the affected machine. Posted from the machine owner's account.
Thanks for the fix. Adding data from a second Windows machine, because it shows where the time goes and that 30 seconds can still be too short under heavy load.
The helper is not slow to start. It is slow to exit. On this machine the helper writes its marker in 39 to 82 ms, then takes 10.7 to 46.3 seconds to exit (five launches, all cores busy with parallel
dotnet build). For that whole time it has one thread left, at base priority 4, in the Ready state. It is runnable but keeps losing the CPU to higher-priority threads. The preflight waits forchild.exitCodeas well as the output, so it times out even though the check already passed.Two checks confirmed it:
- Raising the stuck helper's priority class to High makes it exit within about 12 ms, with exit code 0. Untouched helpers in the same minute took 6.2 to 6.3 seconds.
node.exe -e 0took 89 ms in the same minute, so this looks specific to the Electron executable running as Node.
A Normal-priority parent does not avoid it. Helpers started from a Normal-priority process also took 14.8 to 46.9 seconds to exit under the same load.
Environment: T3 Code desktop 0.1.7 (Electron 44.10.1, Node 24.22.1), Windows 11 build 26300, Intel Core Ultra 7 268V (4 performance and 4 low-power cores), 32 GB RAM. I read the current
antigravityAuthSupport.tson main, and the desktop build still runs its own executable as the helper and waits forexitCode, so I expect 0.1.8 and later to behave the same apart from the longer limit. I have not tested 0.1.8 or later on this machine.What we did locally:
A small watcher, run at logon, that raises any T3 Code process down to its last low-priority thread to High priority:
(Get-Process -Id $PID).PriorityClass = 'AboveNormal' $done = New-Object 'System.Collections.Generic.HashSet[int]' while ($true) { foreach ($p in [Diagnostics.Process]::GetProcessesByName('T3 Code (Beta)')) { try { $th = $p.Threads if ($th.Count -eq 1 -and $th[0].BasePriority -lt 8 -and $done.Add($p.Id)) { $p.PriorityClass = 'High' } } catch {} finally { $p.Dispose() } } if ($done.Count -gt 500) { $done.Clear() } Start-Sleep -Milliseconds 500 }The main T3 Code processes always have dozens of threads, so the watcher never touches them. With it running, helper exits under the same build load took 0.4 to 0.6 seconds, and the next real Antigravity session passed its preflight on the first try in 164 ms. The watcher itself used about 0.2 percent of the machine.
Microsoft Defender exclusions for the T3 Code install folder,
~/.t3/userdata, and the T3 Code executable. Defender's CPU use dropped from 12 to 18 percent of the machine to 2 to 9 percent. That reduces the load that starves the helper, but it is not the fix.Updating past 0.1.7 to get the 30-second limit. Our updater had stalled, so we had missed #25211.
Suggestion: because a 46-second exit is longer than the new limit, it might help to treat the expected stderr marker plus empty stdout as success and stop waiting for the helper to exit, killing it if it is still running. Caching the result per runtime path and version, as #22804 proposed, would also avoid the check on most session starts.
Investigated and written by Claude Opus 5.5 (
claude-opus-5-5) in Claude Code.
Sign in to join this conversation.
Fresh triage: this reports a startup reliability bug, not an exploitable vulnerability. On main b5a226e49c, prepareAntigravityProfile still imposes a five-second browser-helper verification timeout. No real-app reproduction was completed. The reported Windows desktop setup is unavailable here, and changing this sign-in helper verification requires maintainer review under the triage authentication hard stop. Leaving this issue open; no fix was written. Duplicate checking found no matching report among 850 open issues through August 27, but the remaining pages failed with ConnectionRefused.