[Bug]: Antigravity /swarm worker conversations time out after 60s waiting for tool approval even when thread runtimeMode is full-access
Before submitting
- [x] I searched existing issues and did not find a duplicate.
- [x] I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Start a thread in T3 Code using the Antigravity provider (
gemini-4-neon) withruntimeMode: "full-access"andinteractionMode: "default". - Confirm that tool calls (
run_command,write_file,edit_file) executed directly by the parent thread succeed immediately without prompting. - Invoke
/swarmand spawn one or more workers viaswarm{action:"add", ...}whose tasks requirewrite_file,edit_file, orrun_commandinside the project workspace. - Wait ~60 seconds for the workers to attempt their first write or shell tool call.
Expected behavior
Swarm workers spawned from a full-access Antigravity thread should inherit the thread's auto-approval policy (or, when approvals are required, surface interactive approval prompts in T3 Code so the user can approve them).
Actual behavior
Every swarm worker blocks on its first write_file, edit_file, or run_command call and fails after 60 seconds with a permission-prompt timeout error. Meanwhile, t3_pending_request returns {"requestIds": []} and no approval dialog ever appears in the T3 Code UI.
In our session, 5 out of 5 implementation workers (frontend_sprint, srs_core, frontend_app, backend, engine) hit this exact 60s timeout independently while the parent coordinator thread had runtimeMode: "full-access" and could execute run_command and write_file without issue.
Impact
Blocks work completely (native /swarm cannot edit files or run commands under T3 Code).
Version or commit
0.1.12-nightly.20261123.5138
Environment
- OS: Linux
7.2.15-1-omarchy x86_64 - Provider: Antigravity (
agyCLI1.5.15,antigravity-acp), modelgemini-4-neon(High) - Thread config:
runtimeMode: "full-access",interactionMode: "default"
Logs or stack traces
Verbatim tool error recorded in worker conversation transcript (step_index: 21):
permission check failed for write_file "/home/codrin/Bacalaureat/Romana/atelier/static/srs.js": Permission prompt for action 'write_file' on target '/home/codrin/Bacalaureat/Romana/atelier/static/srs.js' timed out waiting for user response after 60s; the user did not respond, which is not an explicit denial.
Same 60s timeout occurred on edit_file and run_command across all 5 workers (frontend_sprint, srs_core, frontend_app, backend, engine), while t3_pending_request(action="list") returned {"requestIds": []}.
Diagnosis notes
Native /swarm creates separate Antigravity-internal worker conversations (distinct conversation_ids outside T3 Code's thread lifecycle). It appears that either:
- The parent session's
full-access/ auto-approve setting is not propagated to newly spawned swarm worker conversations in the ACP adapter, and/or - Permission prompt requests emitted by child swarm conversations are not forwarded/auto-approved by T3 Code's ACP client, causing them to hang until Antigravity's 60s approval timeout fires.
Related Antigravity swarm/ACP issues: #39886, #41529.
Workaround
Execute edits directly in the main thread or use T3 Code's delegate_task (which creates T3-managed child threads with explicit runtimeMode).
Hi! I'd like to take a stab at this one. Thanks for the detailed report and diagnosis.
Before I start, a couple of quick questions:
- Is this considered a bug in T3 Code's ACP adapter (auto-approve / approval forwarding not applied to swarm worker conversations), rather than expected Antigravity behavior?
- Are #39886 and #41529 the same root cause, or already being worked on? I don't want to duplicate a fix.
My plan is to look at how permission requests from child conversations are handled in apps/server and make them follow the parent thread's runtimeMode (auto-approve under full-access, otherwise forward the request to the UI). I'd cover it with a unit test using a mocked ACP agent that sends a permission request from a non-parent conversation.
If that direction sounds right, I'll open a draft PR with "Closes #41534". Happy to adjust based on your feedback.
I hit the same failure on macOS arm64 (27.2), T3 Code Nightly 0.1.12-nightly.20261125.5230, installed agy CLI 1.5.16. This adds a macOS case on a newer nightly to the existing Linux report.
Observed in one run
- The Antigravity server log shows
session/newcreating the coordinator conversation, followed bysession/promptand successful tool confirmations (approved=true) for that conversation. - Native
/swarmcreated separate Antigravity conversation IDs for the workers. Four implementation worker transcripts independently record a 60-second permission timeout on read-only Git commands. A worker transcript also records the same timeout forwrite_file. - One redacted worker tool error:
Permission prompt for action 'command' on target 'git status --short && git diff --stat' timed out waiting for user response after 60s. The write result has the same wording for actionwrite_file(path omitted). This places the failure at permission resolution, before command execution.
Where to look
On current main, the adapter keeps full-access/auto-edit sessions in native default mode and answers permission requests using the T3 runtime policy. This makes delivery and routing of the approval request essential. The shared ACP handler can return cancelled before policy evaluation when detached-request handling is active and the request session ID differs from the active session ID. The Antigravity adapter enables detached-request handling.
That branch is a concrete candidate if Antigravity emits worker requests with their own IDs. The logs I have show worker-side timeouts and coordinator-side approvals. They do not capture the worker request/response pair on the ACP wire, so this does not yet establish whether the request was never emitted, was rejected by session routing, or whether its response was lost. The decisive trace is the worker tool call followed by the ACP session/request_permission (request ID and session ID), T3's response, and Antigravity's application of that response.
A small repro is to use a disposable Git repo, run git status --short directly in the coordinator, then have a single native Swarm worker run the exact same command. A regression test should cover a recognized worker request under full-access and the corresponding prompt under approval-required, while retaining rejection for unrelated session IDs.
Follow-up with a direct ACP wire A/B on the same Mac. Version correction: the affected T3 instance was configured to launch an ACP binary that reports 1.5.9 in the historical initialize reply. The separately installed agy CLI reports 1.5.16. My preceding comment listed the installed CLI, not the binary that served the affected session.
I used a minimal JSON-RPC stdio client, fresh profiles and disposable Git repositories. T3's ACP adapter and UI were out of the loop. The client answered allow_once for the exact read-only command git status --short, and listened for permission requests for both coordinator and worker. On 1.5.9 I ran the pinned executable itself, without the local launcher wrapper, and kept the transport open through the worker timeout.
| ACP binary | Coordinator | Native Swarm worker |
|---|---|---|
| 1.5.9 | Client received session/request_permission, returned allow_once, and the command completed. |
Worker transcript recorded the command and then timed out waiting for user response after 60s. No corresponding session/request_permission reached the same stdio client before the timeout. |
| 1.5.16 | Same successful approval round trip. | Client received the worker's command approval with the coordinator's ACP session ID. Returning allow_once produced approved=true against the worker's internal conversation in the ACP server log. Worker command exited 0. |
For this reproduced 1.5.9 case, the first missing hop is Antigravity's native worker permission prompt → outbound ACP session/request_permission. The host never had a worker approval to answer. This supersedes my earlier adapter session-ID-rejection hypothesis for this Mac case. The original reporter's 1.5.15/Linux case still warrants its own wire capture. I confirmed the 1.5.16 provider round trip in the minimal ACP client, not yet in the T3 Code UI.
Thanks @NguyenDinhKhoi213 and @samwang0041-star for the thorough investigation! Answering the open questions and sharing a fresh Linux ACP wire capture:
1. Answers to @NguyenDinhKhoi213
- Bug vs. expected behavior: Definitely a bug — under
runtimeMode: "full-access",/swarmworkers should not silently hang for 60s on tool approvals without either auto-approving or surfacing a prompt. - Are
#39886and#41529duplicates? No — both are already closed and covered different lifecycle issues:#39886was T3 killing delegated swarm workers when the coordinator's turn ended.#41529was delegated Antigravity child threads finalizing mid-wake after 2 minutes of silence. Neither addressed swarm worker tool-permission routing/auto-approval.
2. Linux binary & ACP wire capture (for @samwang0041-star)
- Binary check: Unlike the macOS split setup, T3 Code on this Linux machine launches the single mise-installed binary directly (
~/.local/share/mise/installs/antigravity-cli/latest/agy acp ...), which was1.5.15at report time and has since updated to1.5.17. - Direct JSON-RPC stdio wire capture on Linux (
agy 1.5.17, fresh disposable Git repo, T3 out of the loop):initializereportedAntigravity ACP Server 1.5.17(mode: default).- Coordinator (
sessionId: 50824de7-...) rangit status --short→ emittedsession/request_permissionwithsessionId: 50824de7-...,toolCallId: "call_14790897175090925373"→ client answeredallow→ exited0. - Native
/swarmworkerw1rangit status --short→ did emitsession/request_permissionon the wire with the same coordinatorsessionId(50824de7-...) and a worker-prefixedtoolCallId("9259a964-7b2f-4e51-9e65-e10519ce33f8:call_4521658022838340446") → client answeredallow→ exited0and reported back cleanly.
Takeaway for the fix / regression test
- Older
agyACP builds (1.5.9–1.5.15) appear to have dropped outbound worker permission prompts before they ever hit ACP;1.5.16+/1.5.17do emit them on the coordinator'ssessionIdwith a<workerConversationId>:<callId>toolCallId. - On T3 Code's side, it's still worth ensuring
adapter.tshandles worker-prefixedtoolCallIdrequests under the parent thread'sruntimeModeboth during an active coordinator turn and when a worker requests permission while the coordinator is idle/waiting between turns (detached-request path), with regression coverage forfull-accessandapproval-requiredwhile keeping genuinely foreignsessionIds rejected.
Adding a fresh reproduction on agy 1.5.20 (macOS arm64), which suggests the 60s timeout still occurs on 1.5.16+ when workers execute while the coordinator is idle between turns.
Environment
- T3 Code:
0.1.11(macOS arm64 Desktop + bundled server) - Antigravity CLI:
agy 1.5.20(single binary onPATH) - Provider / Model:
antigravity/gemini-pro-orchestrator-neon(coordinator),gemini-flash-worker-agy(native/swarmworkers) - Thread config:
runtimeMode: "full-access",interactionMode: "default"
Observed behavior
- In the parent coordinator thread,
run_commandandwrite_fileexecuted directly with no approval prompts. - After invoking
/swarmand callingswarm{action:"add"}(workspace: "inherit"), the coordinator ended its initial turn (per the native swarm flow, waiting for workers) so the workers ran while the coordinator was idle between turns. - Both active workers hit a 60s timeout on their very first
run_commandcall, including read-only commands inside the repository (pwd && git branch --show-current && git status --shortandls -la):
permission check failed for unsandboxed "...": Permission prompt for action 'command' ... timed out waiting for user response after 60s
- No approval prompt surfaced in the T3 Code UI.
- By contrast,
delegate_taskchild threads launched from the exact same parent thread inheritedruntimeMode: "full-access"and ran shell commands cleanly without prompting.
Relevance to #41534
Since this reproduces on agy 1.5.20 (past the 1.5.16 / 1.5.17 threshold noted above) specifically during the post-swarm add idle-coordinator window, it supports the hypothesis that T3 Code's ACP adapter drops or fails to auto-approve detached worker permission requests emitted while the coordinator turn is not active.