[Bug]: Required MCP startup failure is recorded as a completed Antigravity ACP run #20097
Required MCP startup failure becomes a completed ACP run#
This is a bug report and request for maintainer triage. No product-default change is proposed without agreement.
Observed on T3 Code nightly 0.0.46-nightly.20261014.3132, vendor revision 5a4e9980533705774dc3f45b35cacf76c3d78dbc, macOS, Antigravity ACP provider.
A run that could not initialize an MCP server produced only an assistant message describing the startup failure. T3 persisted the run as completed. The run lasted less than one second. The requested task made no useful progress.
Sanitized provider output:
The MCP server '' failed to initialize: ... connection closed ... calling "initialize": client is closing: EOF.
This report concerns a tool explicitly required for the assigned task. It does not propose making every configured MCP server mandatory or defining degraded operation through optional-tool failures.
Expected behavior:
- Represent declared required-tool readiness separately from dispatch acceptance and provider session creation.
- A failed required startup must remain a typed failure or named dependency hold.
- Preserve launch, tool initialization, quota, transient transport, authentication, security refusal and explicit user pause as distinguishable causes.
- Do not turn a security refusal or user pause into recoverable quota.
- Preserve task identity and completion evidence; a stopped turn is not task completion.
Candidate source boundary, not a proven root cause:
packages/provider-acp/src/server/adapter.ts, around line 7188, maps a resolved
prompt result to completed unless stopReason is cancelled. The failure
contract in packages/contracts/src/orchestrationV2.ts, around line 1352,
has generic failure classes and an additional code field. Determine whether
the provider must first emit a structured startup failure rather than an
ordinary assistant message. Do not classify arbitrary task prose by keywords.
Proposed isolated reproduction:
- Use the existing fake ACP session runtime in
AcpAdapterV2.test.ts. - Declare one required synthetic tool through the supported task/session contract.
- Have its initialization end in SSH-like EOF, with no real SSH or credentials.
- Exercise the adapter, run persistence and client projection together.
- Assert typed tool-init failure, no productive Working/completion, and a named owner/resume condition. Inspect the persisted event, not only an error string.
- Run a healthy initialization control that performs one harmless operation.
- Repeat with launch, quota/reset, transient, auth, security and user-pause fixtures.
Evidence limit: the captured real run proves the native completed/error-only mismatch. These proposed synthetic injection cases have not yet been executed. Rendered desktop/mobile behavior has not been verified. No live database, vendor bundle, provider selection, schedule or account was changed.
Delivery request: identify a supported task-specific required-tool declaration and runtime failure interface, or implement the contract in the upstream provider integration and publish it in an official release. Local adoption must then be qualified through the existing updater owner, followed by native/client readback.
Additional bounded provider proof#
Codex app-server 0.162.1 was separately tested with fresh temporary HOME and
CODEX_HOME directories, no credentials, a synthetic model endpoint, and no model
turns. With mcp_servers.nf2146_required.required = true, an EOF fixture made
thread/start return JSON-RPC error -32603, including required MCP servers failed to initialize. No thread-start or turn-start notification followed.
The healthy initialize/tools-list fixture created an idle thread and returned
runtimeStatus: connected with its synthetic ping tool.
This confirms a Codex-specific primitive, not an Antigravity fix or T3 client proof. The Antigravity historical raw ACP packet was not retained in this assessment. Its native T3 run and assistant message were read directly.
The required design question is how an explicitly required dependency reports a structured failure before productive execution. The ordinary optional T3 MCP behavior must remain supported. Please identify the intended provider/T3 boundary and approved scope before a substantial implementation.
juliusmarminge added labelsvia-triage
juliusmarminge added labelswontfix
juliusmarminge closed this
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
Thanks for the detailed write-up. After checking main, I'm closing this. T3 is working as intended here, and the rest is a feature request.
What T3 does on main. In
packages/provider-acp/src/server/adapter.ts(around line 7189), a finishedsession/promptis recorded ascompletedunless itsstopReasoniscancelled. The ACP spec defines stop reasons (end_turn,max_tokens,max_turn_requests,refusal,cancelled) to describe why the agent ended its turn. They aren't a verdict on whether the task worked. If Antigravity ends the turn withend_turnand only says in assistant text that an MCP server failed to start, T3 has nothing structured to act on. As you said, guessing failures from keywords in the prose isn't something we'd do.Where the signal would have to come from. As far as I can tell, ACP has no structured "MCP server failed to initialize" notification that T3 is ignoring. An agent can report a startup failure by returning an error from
session/new/session/prompt, and T3 already treats that as a failed run. Your Codex test shows that kind of signal (thread/startreturningrequired MCP servers failed to initialize), but that's Codex app-server behavior, not ACP. For Antigravity, please file this with Google so it returns an error instead of a normal turn. If you can capture a raw ACP log showing an error or structured failure that T3 still recorded as completed, reopen this with it and we'll look again.The required-tool declaration / typed failure taxonomy is a feature request: a way to declare tools as required per task, plus separate failure classes for launch, tool init, quota, auth and so on. Please open it in Ideas. Related: #16010, #17412, #19689, discussions #15932 and #16359.