Skip to content

Delegated task completion steers ACP turn during a pending question, wedging the session #41049

Open

Description

@levelorbit

When an Antigravity ACP turn is paused on a pending user_input_request (question) and a delegated task finishes, T3 Code tries to deliver the completion by steering the running turn with session/prompt.

Antigravity rejects it:

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 then marks the turn failed and cancels the pending question on its side, without sending session/cancel to Antigravity. After that, the thread is wedged — every new message immediately fails on session/prompt with the exact same error.

Steps to reproduce

  1. Start a delegated task from an Antigravity thread.
  2. Have the parent thread pause on a pending user question before the delegated task finishes.
  3. Wait for the delegated task to complete without answering the question.
  4. Try sending another message in the parent thread.

Expected behavior

Either wait to deliver the completion notification until the pending question/permission is answered, or send session/cancel to the ACP session when cancelling the request and failing the turn so the thread can recover.

Version

T3 Code Nightly 0.1.12-nightly.20261122.5098 (macOS)

Activity

  1. benjamin-di commented on Nov 23, 2026

    @benjamin-di
    Contributor

    Confirmed on T3 Code 0.1.11 (Linux, Antigravity ACP).

    Same sequence: an active turn paused on an ask_question elicitation, a delegated task finished and triggered ProviderTurnControlService.steer -> AcpAdapterV2.steerWithPrompt, agy acp rejected the second session/prompt with the same error, T3 marked the turn failed and cancelled the question locally without sending session/cancel, and every subsequent message failed immediately with the same AcpRequestError.

    Workaround: terminating the antigravity-acp process serving that session allows the next message to spawn a fresh process and reload the conversation without losing context.

    Open PR #39799 looks like it already addresses this root cause: declining steerWithPrompt with ProviderAdapterSteerDeclinedError whenever pendingRuntimeRequests.size > 0 covers both user_input_request (elicitation/create) and approval_request, and EffectWorker already falls back to queue_after_active for delegated task completions when steerDeclined is set.

  2. braxtonkl commented on Nov 23, 2026

    @braxtonkl

    Note

    🤖 Gemini 4 Neon responding on behalf of braxtonkl

    Confirmed on T3 Code 0.1.11 (Linux, Antigravity ACP with gemini-4-neon, full-access mode).

    Exact same sequence:

    1. An Antigravity turn paused on an ask_question (elicitation) waiting for user input.
    2. A delegated child task completed and triggered ProviderTurnControlService.steer → AcpAdapterV2.steerWithPrompt → session/prompt.
    3. Antigravity rejected it with AcpRequestError:
      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
    4. T3 Code surfaced Provider turn failed. and marked the user_input_request as cancelled on T3's side without sending session/cancel to Antigravity.
    5. Every subsequent turn on the thread (user follow-up and 4 more delegated-task completion notifications) failed immediately (~1–20 ms) with the same error until starting a fresh session (freshContext: true).
  3. ricardo-calcina commented on Nov 24, 2026

    @ricardo-calcina

    Reproduced on 0.1.12-nightly.20261124.5178 (macOS, Antigravity gemini-4-neon).

    When an async delegate_task completed while an ask_question card was open, AcpAdapterV2.steerWithPrompt failed with:
    Can't add this prompt to session ...: the running prompt is waiting for a permission or question answer; answer it or send session/cancel, then send this prompt again

    T3 Code dismissed/cancelled the UI question card without sending session/cancel to Antigravity, leaving every subsequent run (remaining delegate completions + user messages) failing immediately in ~5–10ms until restarting T3 Code.

    Suggested fix: Either defer/queue delegate completion steers while a user_input_request is pending (don't call session/prompt mid-elicitation), or ensure session/cancel is sent before tearing down the run/question card so the ACP session doesn't wedge.

  4. sebstrgg-agent commented on Nov 24, 2026

    @sebstrgg-agent

    Still happens on 0.1.12-nightly.20261124.5209 (macOS 27.0.1, desktop app with its local server) with agy 1.5.16 and gemini-4-neon.

    Same sequence as above. Times are local, from server.trace.ndjson:

    • 23:02:49 The running prompt opens a question: session/request_permission, then AcpAdapterV2.requestUserInputWithAdmission starts.
    • 23:05:11 A delegated-task completion goes through Orchestrator.dispatchSteerIntoRun, then ProviderTurnControlService.steer, then AcpAdapterV2.steerWithPrompt. That session/prompt fails with Can't add this prompt to session <id>: the running prompt is waiting for a permission or question answer; answer it or send session/cancel, then send this prompt again. The run is marked failed, and ProviderEventIngestor.dismissNativeUserInputs dismisses the question on the T3 side.
    • 23:05:30 The next message's session/prompt is refused with the same error.
    • t3_thread_interrupt on the thread returns no_active_run.
    • The requestUserInputWithAdmission span stayed open for 1,046 s. It ended only when I killed the thread's agy process.

    Killing that thread's agy process and sending a new message recovered it. T3 started a fresh agy, which authenticated, ran session/load on the same session, and accepted the prompt. That matches the recovery path described in #42375.


    Claude Code (claude-opus-5-5), working in T3 Code on behalf of sebstrgg.

  5. Ozy-Viking commented on Nov 25, 2026

    @Ozy-Viking

    Confirming this still reproduces on 0.1.12-nightly.20261124.5209 (Linux).

    Environment

    • Version: 0.1.12-nightly.20261124.5209
    • OS: Linux x86_64 (kernel 7.2.15)
    • Runtime: Node v26.13.1 / Bun 1.3.12
    • Provider / Model: Antigravity (gemini-4-neon), with delegated child task (claude-opus-5-5)

    Observed timeline

    1. 03:15:44.447Z — Active Antigravity turn opened a pending user_input runtime request (elicitation).
    2. 03:17:08.747Z — A delegated task completed; T3 Code tried to deliver the completion by steering the active turn via AcpAdapterV2.steerWithPrompt → session/prompt.
    3. 03:17:08.798Z — Antigravity rejected session/prompt because the running prompt was still waiting for the question answer. T3 Code marked the turn failed, cancelled the user_input runtime-request locally, and returned the provider-thread to idle without sending session/cancel or marking runtimeRestartRequired.
    4. 03:18:59.223Z — The next user turn (AcpAdapterV2.startTurn → session/prompt) immediately failed with the exact same error, leaving the thread wedged.

    Redacted trace excerpts (server.trace.ndjson)

    # Delegated task completion steering active turn while user_input is pending
    2026-11-25T03:17:08.798Z session/prompt Failure:
    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 (<runtime>/0.1.12-nightly.20261124.5209/t3:250511:43)
        at AcpAdapterV2.steerTurn (...)
    
    # Subsequent user message failing immediately against the still-wedged ACP session
    2026-11-25T03:18:59.223Z session/prompt Failure:
    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 (<runtime>/0.1.12-nightly.20261124.5209/t3:250279:55)
        at AcpAdapterV2.startTurn.transition (...)
  6. mralbertchen commented on Nov 25, 2026

    @mralbertchen

    Note

    🤖 Gemini 4 Neon responding on behalf of mralbertchen

    Confirmed on T3 Code Nightly 0.1.12-nightly.20261124.5178 (Linux x86_64, Antigravity ACP with gemini-4-neon), triggered by t3_thread_send rather than a delegated task completion.

    1. Run 2 opened a pending ask_question (user_input_request) and paused for user input.
    2. Another thread sent a message via t3_thread_send (mode: "auto"). T3 Code routed it through ProviderTurnControlService.steer → AcpAdapterV2.steerWithPrompt → session/prompt.
    3. Antigravity rejected session/prompt with AcpRequestError: 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.
    4. T3 Code marked run 2 as failed and cancelled the user_input_request locally (pendingRequestCount: 0), with no session/cancel recorded in the provider event log.
    5. Three later turns (two more t3_thread_send messages and one mobile user retry) all failed in ~100 ms with the same AcpRequestError until we sent a message with freshContext: true.

    #39799 covers the prevention path by declining steerWithPrompt while a runtime request is pending, and #42375 covers recovery if the rejection still occurs.

  7. zhanglg12 commented on Nov 25, 2026

    @zhanglg12

    Confirmed on the T3 Code 0.1.12 release on macOS 26.7.3 (arm64), using the managed Antigravity ACP runtime 1.5.17 and Gemini 4 Neon. The child was an async T3 delegated task running on Codex.

    On 2026-11-25, the parent opened an ask_question card while the child task was still running. When the child finished, T3 steered the active turn via AcpAdapterV2.steerWithPrompt. Antigravity refused the new prompt because it was still waiting for the question answer. T3 marked the run failed and removed the question from the UI. The next ordinary user message failed with the same error in AcpAdapterV2.startTurn. The Antigravity log shows no session/cancel between the rejected steer and that retry.

    Selected events (UTC, redacted):

    14:02:21.091  T3 opens user_input_request
    14:02:45.195  T3 receives delegated-task completion
    14:02:45.215  session/prompt fails in steerWithPrompt (AcpRequestError)
    14:02:45.224  T3 marks user_input_request cancelled
    14:03:39.843  Next session/prompt fails in startTurn (same AcpRequestError)
    

    The error in both cases was Can't add this prompt to session <session-id>: the running prompt is waiting for a permission or question answer (excerpt).

    Verified workaround: In the affected thread, open the command palette and choose Restart agent session, then send a message. At 14:07:35 UTC, ACP reported session/resume succeeded on the same native session ID. The agent replied in the original thread and opened a fresh question card, which accepted a response. This recovered the thread without restarting the desktop app.

  8. Hasteroth commented on Nov 27, 2026

    @Hasteroth

    Note

    🤖 Written by an AI agent (Gemini 4 Neon) on behalf of @Hasteroth.

    Confirmed still reproducing on T3 Code 0.1.13 (Windows, Antigravity ACP with gemini-4-neon, full-access mode) — this time triggered by a manual user Steer rather than a delegated task completion or t3_thread_send.

    What happened

    The agent invoked ask_question (user_input_request / ACP elicitation) at the exact moment the user submitted a manual Steer message:

    16:52:07.250Z  User submits manual Steer message as ask_question pops up
    16:52:07.275Z  ProviderTurnControlService.steer -> AcpAdapterV2.steerWithPrompt -> session/prompt
    16:52:07.298Z  session/prompt fails (AcpRequestError: waiting for a permission or question answer; answer it or send session/cancel)
    16:52:07.305Z  T3 marks user_input_request cancelled (pendingRequestCount: 0) and fails the run — no session/cancel sent
    16:53:12.125Z  Next user message fails in ~1.5 ms in AcpAdapterV2.startTurn with the same AcpRequestError
    16:53:55.899Z  Another user retry ("test") fails in ~0.7 ms in AcpAdapterV2.startTurn with the same AcpRequestError
    

    Sharing as a data point that the same ACP session-wedging race occurs with interactive user steering (and is still present in 0.1.13), not only background/delegated task completion deliveries.

  9. shaomingbo commented on Nov 28, 2026

    @shaomingbo

    Still reproduces on the T3 Code v0.1.13 stable release (the current Latest), so this now affects the stable channel too. Setup: macOS 27.2.1 (arm64), desktop app, managed Antigravity ACP runtime 1.5.13, gemini-4-neon parent. The child was an async delegate_task on Codex.

    Timeline (UTC, 2026-11-28), taken from server.trace.ndjson and the thread's provider event log:

    • 01:27:46 The parent's session/prompt starts.
    • 01:30:24 The parent calls ask_question and the question card opens.
    • 01:30:28.03 The delegated task finishes. T3 delivers the completion via ProviderTurnControlService.steer → AcpAdapterV2.steerWithPrompt. The second session/prompt fails in about 3 ms with Can't add this prompt to 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 marks the run failed and cancels the question on its side. The provider log has no session/cancel.
    • 01:35:11 The user's next message fails in AcpAdapterV2.startTurn with the same error, in about 5 ms.
    • t3_thread_interrupt on the failed run returned status: failed and sent nothing to agy.
    • The original 01:27:46 session/prompt never completed. It ended only with AcpProcessExitedError at 01:36:25, when I killed the thread's antigravity acp process.

    Recovery: kill that process, then send the next message with freshContext: true. A new session/new follows and the prompt is accepted.

    #39799 (decline the steer while a runtime request is pending) and #42375 (recover a prompt agy still holds) are both still open, so any stable-channel user who combines ask_question with async delegates can hit this. It would help to get either one reviewed.

  10. slimelu commented on Nov 29, 2026

    @slimelu

    I verified the reported dispatch and recovery paths in T3 Code Desktop 0.1.13. With an Antigravity ACP question still pending, a delegated task finishing with completionWake: "always" can be promoted to steer_active in Orchestrator.dispatchMessage, which then calls dispatchSteerIntoRun without checking pending user input. AcpSessionRuntime.prompt releases its dispatch slot while the original session/prompt is still outstanding, so AcpAdapterV2.steerWithPrompt can send a second prompt before the first one settles. If the second request fails, the generic error branch in the followPrompt helper inside makeAcpAdapterV2 can finalize the visible turn without marking the runtime for restart, leaving later turns on the same busy session. An offline check against the 0.1.13 bundles exercised holding background completions in the queue while input is pending and rebuilding the ACP runtime after a failed steer with an outstanding prompt.

  11. aihehye commented on Dec 1, 2026

    @aihehye

    Still reproduces on 0.1.14-nightly.20261130.5508 (commit 0f7ae4e8, Windows x64 desktop app against local server, Antigravity ACP with gemini-4-neon-medium).

    Timeline (UTC, 2026-12-01, from server.trace.ndjson and provider event log)

    • 04:46:59.581Z — Parent turn starts (AcpAdapterV2.startTurn → session/prompt).
    • 04:47:52.498Z — Agent calls ask_question (AcpAdapterV2.requestUserInputWithAdmission), pausing the running prompt for user input.
    • 04:47:57.188Z–04:47:57.225Z — An async delegated task completes. Orchestration delivers the completion via AcpAdapterV2.steerTurn → AcpAdapterV2.steerWithPrompt → second session/prompt.
    • 04:47:57.266Z — Antigravity ACP rejects the steer prompt with AcpRequestError:
      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
      
    • 04:47:57.296Z–04:47:57.317Z — T3 Code cancels the user_input_request locally and finalizes the run as failed (Provider turn failed.) without sending session/cancel or restarting the runtime.
    • 04:48:29Z, 04:48:55Z, 04:50:19Z, 04:50:51Z, 04:51:48Z — Five consecutive follow-up user messages (AcpAdapterV2.startTurn → session/prompt) fail in 1–3 ms with the same AcpRequestError while the original 04:46:59Z prompt remains stuck in-flight.
    • 04:51:56.796Z–04:52:13.982Z — After the stuck prompt is interrupted and the runtime reopens (initialize → authenticate → resumeThread), the next turn succeeds.

    Environment

    • Version: T3 Code Desktop 0.1.14-nightly.20261130.5508 (0f7ae4e8)
    • OS: Windows 11 x64 (10.0.26220), Node v24.22.1
    • Provider / Model: Antigravity ACP (gemini-4-neon-medium)

    Triaged with Gemini 4 Neon (Medium) via Antigravity in T3 Code.

  12. arzat commented on Dec 1, 2026

    @arzat

    Still reproduces on today's nightly 0.1.14-nightly.20261201.5564 (Windows 11 x64, agy 1.5.21, gemini-4-neon high).

    Repro: an Antigravity thread starts 2 async delegate_task children that each sleep 60 s, then calls ask_question and leaves it unanswered. The first child's completion fails with the same Can't add this prompt … waiting for a permission or question answer error. The second completion and a plain follow-up message then fail the same way.


    Claude Code (claude-opus-5-5), working in T3 Code on behalf of arzat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions