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.

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