[Bug]: Steering an Antigravity ACP turn during a pending ask_question/elicitation fails without session/cancel and permanently wedges the session
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 using the Antigravity ACP provider (
agy1.5.14). - Start an async delegated task (
delegate_task) from that thread so a completion notification will arrive asynchronously. - While the delegated task is still running, have the agent call
ask_question(ACPelicitation/create) so T3 Code displays a pending user-input prompt and the ACP turn waits for an answer. - Wait for the delegated task to finish while the
ask_questionprompt is still unanswered. - T3 Code attempts to steer the active turn with the delegated-task completion notification (
AcpAdapterV2.steerTurn->AcpAdapterV2.steerWithPrompt->session/prompt). - Once the turn fails and the question card is cancelled, send any new user message in the same thread.
Expected behavior
- Incoming steers (including delegated-task completion notifications) while an ACP session is blocked waiting on a pending permission or elicitation/question answer should be queued/deferred or declined without failing the active turn.
- Additionally, whenever T3 Code marks a turn failed or cancels a pending
user_input_requeston an ACP session, it should sendsession/cancel(or tear down the wedged ACP session) so subsequent turns do not reuse a session still waiting on the old elicitation.
Actual behavior
- When the delegated task completes while
ask_questionis open,AcpAdapterV2.steerWithPromptsendssession/promptto the Antigravity ACP session. - Antigravity ACP rejects it with:
Error: Can't add this prompt to session <session-id>: the running prompt is waiting for a permission or question answer; answer it or send session/cancel, then send this prompt again - T3 Code marks the run as
failed(Provider turn failed.), marks theuser_input_requestascancelled, and clearsactiveRunId(pendingRequestCount: 0), without sendingsession/cancelto the ACP session (confirmed viaserver.trace.ndjson). - Every subsequent user message on that thread immediately fails (~0.5 ms) in
AcpAdapterV2.startTurnwith the exact same error because the underlying ACP session is still stuck waiting for the cancelled elicitation. - Interrupting/stopping the thread is a no-op (
no_active_run), leaving the thread permanently wedged until the provider session is reset.
Impact
Major degradation or frequent failure
Version or commit
0.1.12-nightly.20261121.5051
Environment
macOS 27.2.1 (arm64, Build 26B131), T3 Code (Nightly) 0.1.12-nightly.20261121.5051, Antigravity ACP (agy 1.5.14, gemini-4-neon)
Logs or stack traces
# 1) Delegated task completion triggers steer while ask_question elicitation is pending:
span: session/prompt (exit: Failure, durationMs: 11.015)
Error: Can't add this prompt to session <session-id>: the running prompt is waiting for a permission or question answer; answer it or send session/cancel, then send this prompt again
at AcpAdapterV2.steerWithPrompt (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:26781:42)
at AcpAdapterV2.steerWithPrompt (definition) (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:26574:28)
at AcpAdapterV2.steerTurn (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:80489:116)
at AcpAdapterV2.steerTurn (definition) (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:26780:16)
at ProviderTurnControlService.steer (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:125494:59)
at OrchestrationEffectExecutorV2.execute (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:125760:30)
# 2) No session/cancel is sent. Every subsequent user message fails immediately on startTurn:
span: session/prompt (exit: Failure, durationMs: 0.652)
Error: Can't add this prompt to session <session-id>: the running prompt is waiting for a permission or question answer; answer it or send session/cancel, then send this prompt again
at AcpAdapterV2.startTurn (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:26572:54)
at AcpAdapterV2.startTurn (definition) (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:26302:30)
at AcpAdapterV2.startTurn.transition (definition) (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:26571:22)
at RunExecutionService.startRootRun (definition)
at ProviderTurnStartService.start (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:125381:67)
at OrchestrationEffectExecutorV2.execute (apps/server/dist/runtimeLayer-NnW-LAsK.mjs:125760:30)
Workaround
Starting a new provider context on the thread (/clear or t3_thread_send with freshContext: true) creates a fresh ACP session and unblocks the thread.
I tried to reproduce this on the current build and could not.
Commit c6ca01b373 (origin/main). (1) Failing test: added 'declines a steer while the agent waits on a question' to apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts (adapted from open PR #39799). Against the real Antigravity adapter and the shared ACP adapter with a mock agent, the agent raises a session/request_permission question, the question card appears, then steerTurn is called. On main the steer is sent as a second session/prompt to the waiting agent ('the steer must not reach the waiting agent: expected [...] to have a length of 1 but got 2'). With #39799's adapter change applied the test passes. (2) Live run attempt: T3CODE_DEV_SEED=0 GOOGLE_GEMINI_BASE_URL=<hub> vp run dev in a fresh worktree, Antigravity provider added in Settings > Providers with sign-in method 'Gemini API key', agy 1.5.14 on PATH, scratch git project added, then t3 thread start --provider antigravity --model <m> --wait with a prompt asking the agent to call ask_question. With gemini-4-neon, gemini-4-hydrogen and gemini-3.8-flash, each turn failed after ~1 s with 'Antigravity stopped this turn because of an error.' agy's own log shows 'Error 429 ... model_cooldown ... Individual quota reached ... Resets in ~115h' for all three, so the turn never reached ask_question and the steer could not be triggered live.
Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.
[!NOTE] 🤖 GPT-6.2-Sol responding on behalf of KyleDerZweite
Confirmed on T3 Code Desktop 0.1.11 on Linux with Antigravity (gemini-4-neon). A delegated review finished while ask_question was open. The server trace shows Antigravity rejected both the completion notification and the next user message because the previous prompt was still waiting for an answer.
Just ran into this issue.
Reproduced on T3 Code 0.1.12-nightly.20261120.5009 (headless server, Linux) with agy 1.5.14 and gemini-4-neon, without any delegated task involved.
A message sent by another T3 thread (t3_thread_send) arrived while ask_question was open.
Timeline (UTC, 2026-11-22):
| Time (UTC) | Event |
|---|---|
| 20:35:18.98 | session/prompt A started (user message). The agent calls ask_question, and the question card appears. agy log: Monitor agy_tool_safety FINISHED: triggered=false, reason="allowed_tool" at 20:35:33, then nothing more for that turn. |
| 20:36:23.43 | A message from another thread is steered into the turn: a second session/prompt B. |
| 20:36:23.50 | B fails after 65 ms with AcpRequestError. T3 marks the ask_question tool item failed, the user_input_request item cancelled, and the run failed ("Provider turn failed"). |
| 20:36:40.53 | A PR-watch notification starts a new run. Its session/prompt fails after 40 ms with AcpRequestError. |
| 20:37:16.43 | A user message starts a new run. Its session/prompt fails after 3 ms with AcpRequestError. |
Prompt A never got a response, and T3 never sent session/cancel. From agy's side the turn was still waiting for the answer, while T3 had already removed the card, so nothing could answer it. Every later prompt was rejected until the agy acp process was killed; the next message then spawned a fresh process and worked normally.
This matches the failing test described above (declines a steer while the agent waits on a question): the steer reaches the waiting agent as a second session/prompt. Any steer will trigger it, including PR-watch notifications and messages from other threads, not only delegate completions, so long-running orchestrator threads that use ask_question hit it regularly. Could this be reopened, and #39799 reviewed?