Skip to content

[Bug]: Steering an Antigravity ACP turn during a pending ask_question/elicitation fails without session/cancel and permanently wedges the session #40534

Closed as not planned

Description

@tengdaGH

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

  1. Start a thread using the Antigravity ACP provider (agy 1.5.14).
  2. Start an async delegated task (delegate_task) from that thread so a completion notification will arrive asynchronously.
  3. While the delegated task is still running, have the agent call ask_question (ACP elicitation/create) so T3 Code displays a pending user-input prompt and the ACP turn waits for an answer.
  4. Wait for the delegated task to finish while the ask_question prompt is still unanswered.
  5. T3 Code attempts to steer the active turn with the delegated-task completion notification (AcpAdapterV2.steerTurn -> AcpAdapterV2.steerWithPrompt -> session/prompt).
  6. 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_request on an ACP session, it should send session/cancel (or tear down the wedged ACP session) so subsequent turns do not reuse a session still waiting on the old elicitation.

Actual behavior

  1. When the delegated task completes while ask_question is open, AcpAdapterV2.steerWithPrompt sends session/prompt to the Antigravity ACP session.
  2. 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
  3. T3 Code marks the run as failed (Provider turn failed.), marks the user_input_request as cancelled, and clears activeRunId (pendingRequestCount: 0), without sending session/cancel to the ACP session (confirmed via server.trace.ndjson).
  4. Every subsequent user message on that thread immediately fails (~0.5 ms) in AcpAdapterV2.startTurn with the exact same error because the underlying ACP session is still stuck waiting for the cancelled elicitation.
  5. 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.

Activity

  1. juliusmarminge commented on Nov 21, 2026

    @juliusmarminge
    Member

    I tried to reproduce this on the current build and could not.

    Commit c6ca01b (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.

  2. KyleDerZweite commented on Nov 22, 2026

    @KyleDerZweite

    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.

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