Repository navigation
fix(acp): stop an agent's open question from wedging the thread - #208
nullStack65 wants to merge 2 commits into
Conversation
When an Antigravity agent waits on its own ask_question, it rejects every new session/prompt. A steer such as a delegated-task notification was sent anyway, failed the turn, and turn.terminal dismissed the question on the server while the adapter never answered the agent. The agent stayed blocked, and every later prompt failed with "Provider turn failed" until the session was torn down. - finalizeTurn now resolves the turn's pending runtime requests as cancelled, so the agent gets a native answer matching the server-side dismissal. - steerWithPrompt declines a steer while the turn has a pending request, so the orchestrator queues it after the active run instead of failing the turn. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
Checkpoint, head
|
Review follow-up. The server dismisses a turn's pending user-input requests at turn.terminal, not its approvals, so the adapter now answers only those. Approvals keep their existing behaviour. The regression test also checks for exactly one cancelled update per question. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Result, head
|
|
CHECKPOINT: head I reran the failed jobs (CI run 45548889249, attempt 2):
This PR changes only The same workflow passed on other PRs at 03:46, 04:16 and 04:23 UTC. That fits an intermittent Chromium-startup problem on the ARC runner, not a regression in this PR. Even so, this job has failed twice in a row here, so I'm holding the merge and not rerunning it again myself. I couldn't find a Linear issue tracking this browser-connect timeout, so it needs to go to ARC Ops (the CI runner owner). |
Problem
The CoS thread, running Antigravity on
gemini-4-neon, showed repeated "Provider error / Provider turn failed" on Nov 24 from 10:31 to 10:34 PM ET. Typing "continue" also failed.Root cause
ask_question. It arrives assession/request_permission, and T3 shows it as a question card.session/prompt, and an agent waiting on its own question rejects every prompt (AcpRequestError).turn.terminal, the server dismissed the pending question in the projection. The ACP adapter never resolved its own pending request, so no native answer went back to the agent.Evidence from the local agy ACP log: the
ask_questionfor step 3676 started at about 22:27:46 local. From 22:27:53, everysession/promptwas rejected. T3 logged 7AcpRequestErrors from 03:27:54Z to 03:34:10Z. The question was only answered at 22:36:08, during teardown.Fix (
packages/provider-acp/src/server/adapter.ts)finalizeTurnanswers the turn's pending runtime requests as cancelled, using a turn-scoped variant ofcancelPendingRuntimeRequests. The agent now gets a native answer matching the server-side dismissal, so it stops blocking.steerWithPromptdeclines a steer while the turn has a pending question or approval withProviderAdapterSteerDeclinedError. The orchestrator already handles that error by queueing the message after the active run (queue_after_active), as it does for the Cursor adapter.steerTurnnow passes the error through instead of wrapping it inSteerRunError.Tests
Two new tests in
AntigravityAdapterV2.test.ts:cancelled.Both tests fail without the adapter change: one on the assertion, one on the timeout.
Verified on
360c17710e:effect-tsgo tsrs --noEmitpasses, exit 0, inpackages/provider-acpandapps/server.AntigravityAdapterV2,AcpAdapterV2,AcpRegistryAdapterV2andSteeringCompletion.integrationtests: 304 tests.AcpAdapterV2tests passed.vp fmtandvp lintare clean on the changed files.Not verified: a live Antigravity session reproducing the incident end to end.
Fork-freeze note (CLO-1110, the fork freeze and upstream catch-up decision)
This is a reliability fix and adds no feature surface. Upstream
pingdotgg/t3codemain has the same code path, so this is a fork-only commit that the upstream catch-up must carry.Related
Deploy: fleet
🤖 Generated with Claude Code