Before submitting
Area
apps/server
Steps to reproduce
- In T3 Code desktop, start a session using the Antigravity provider.
- In a turn, execute a command that starts a continuous background server/process (e.g.
bun run dev or npm run dev), which gets captured as a running background task.
- The assistant finishes generating its text response.
- Notice that the turn/prompt remains active on the backend (duration keeps growing, e.g. awaiting background task events or I/O drain).
- Send a new prompt from the UI while the previous turn is in this state (the message is queued and then triggers
thread.turn-start-requested).
AntigravityAdapter.sendTurn attempts to interrupt/cancel the active turn by invoking session/cancel.
Expected behavior
The active turn should be cleanly and promptly cancelled, or interrupted without throwing a fatal transport exception. The queued user message should then proceed to start a new turn normally.
Actual behavior
The entire session crashes with:
ACP transport operation call-rpc failed for method session/cancel.
The session transitions into status: "error" and then status: "stopped", and the turn cannot be started without reinitializing the thread.
Root Cause Analysis
In apps/server:
AntigravityAdapter initializes its ACP runtime with cancelBehavior: "wait-for-prompt":
cancelBehavior: "wait-for-prompt"
- In
AcpSessionRuntime:
const defaultCancelTimeout = seconds(15);
// ...
if (options.cancelBehavior !== "wait-for-prompt") {
if (isSome(activePrompt)) yield* interrupt$1(activePrompt.value.fiber).pipe(ignore$1);
yield* acp.agent.cancel({ sessionId: started.sessionId }).pipe(ignore$1);
return;
}
yield* acp.agent.cancel({ sessionId: started.sessionId });
if (isNone(activePrompt)) return;
const completed = yield* gen$1(function* () {
const result = yield* await_(activePrompt.value.fiber);
yield* _await(activePrompt.value.completed);
if (isNone(yield* get$6(terminationErrorRef))) yield* drainEvents;
return result;
}).pipe(timeoutOption(options.cancelTimeout ?? defaultCancelTimeout));
if (isNone(completed)) {
const error = new AcpTransportError({
operation: "call-rpc",
method: "session/cancel",
detail: "The ACP agent did not finish cancellation. Its process was stopped.",
cause: void 0
});
yield* retireRuntime(error);
return yield* error;
}
- Because
cancelBehavior is "wait-for-prompt", T3 Code synchronously waits up to 15 seconds (defaultCancelTimeout) for activePrompt.value.fiber to complete.
- When a long-running background command was started during the turn, the Antigravity backend agent does not complete or acknowledge cancellation within 15 seconds.
- After exactly 15,019 ms,
timeoutOption returns None, creating an AcpTransportError, calling retireRuntime(error), and stopping the session.
Suggested fixes:
- Consider allowing a shorter non-blocking interrupt for Antigravity, or fallback to forced fiber interruption instead of hard-failing
retireRuntime when cancellation times out.
- Alternatively, handle timeout during
session/cancel gracefully without invalidating the entire adapter session runtime.
Impact
Major degradation or frequent failure
Version or commit
0.0.45-nightly.20261002.2584 (commit 54084ae)
Environment
Linux (x86_64), T3 Code Desktop AppImage (v0.0.45-nightly.20261002.2584), Antigravity ACP provider (agy_acp_server.par), Bun 1.2
Logs or stack traces
ProviderAdapterRequestError: ACP transport operation call-rpc failed for method session/cancel.
AcpTransportError: ACP transport operation call-rpc failed for method session/cancel.
detail: "The ACP agent did not finish cancellation. Its process was stopped."
From server.trace.ndjson:
{"level":40,"time":1759428618287,"pid":486518,"name":"AntigravityAdapter.sendTurn","durationMs":462564.6,"threadId":"c285cbba-ab4d-45f0-8123-ae9debb8d315","error":{"name":"ProviderAdapterRequestError","provider":"antigravity","method":"session/cancel","detail":"ACP transport operation call-rpc failed for method session/cancel."}}
From state.sqlite (orchestration_events):
--- thread.session-set 2026-10-02T18:10:03.255Z
{"threadId":"c285cbba-ab4d-45f0-8123-ae9debb8d315","session":{"status":"error","providerName":"antigravity","lastError":"ACP transport operation call-rpc failed for method session/cancel."}}
--- thread.activity-appended 2026-10-02T18:10:03.255Z
{"summary":"Provider turn start failed","payload":{"detail":"ACP transport operation call-rpc failed for method session/cancel."}}
--- thread.session-set 2026-10-02T18:10:18.349Z
{"status":"stopped","lastError":"ACP transport operation call-rpc failed for method session/cancel."}
Workaround
Avoid launching continuous dev servers via assistant run_command in the thread, or manually terminate the background task before sending subsequent prompts.
Before submitting
Area
apps/server
Steps to reproduce
bun run devornpm run dev), which gets captured as a running background task.thread.turn-start-requested).AntigravityAdapter.sendTurnattempts to interrupt/cancel the active turn by invokingsession/cancel.Expected behavior
The active turn should be cleanly and promptly cancelled, or interrupted without throwing a fatal transport exception. The queued user message should then proceed to start a new turn normally.
Actual behavior
The entire session crashes with:
ACP transport operation call-rpc failed for method session/cancel.The session transitions into
status: "error"and thenstatus: "stopped", and the turn cannot be started without reinitializing the thread.Root Cause Analysis
In
apps/server:AntigravityAdapterinitializes its ACP runtime withcancelBehavior: "wait-for-prompt":cancelBehavior: "wait-for-prompt"AcpSessionRuntime:cancelBehavioris"wait-for-prompt", T3 Code synchronously waits up to 15 seconds (defaultCancelTimeout) foractivePrompt.value.fiberto complete.timeoutOptionreturns None, creating anAcpTransportError, callingretireRuntime(error), and stopping the session.Suggested fixes:
retireRuntimewhen cancellation times out.session/cancelgracefully without invalidating the entire adapter session runtime.Impact
Major degradation or frequent failure
Version or commit
0.0.45-nightly.20261002.2584 (commit 54084ae)
Environment
Linux (x86_64), T3 Code Desktop AppImage (v0.0.45-nightly.20261002.2584), Antigravity ACP provider (
agy_acp_server.par), Bun 1.2Logs or stack traces
Workaround
Avoid launching continuous dev servers via assistant
run_commandin the thread, or manually terminate the background task before sending subsequent prompts.