Repository navigation
Conversation
|
Thanks for this. T3 Code's ACP Registry support follows the ACP spec: the code every agent shares takes no changes that are specific to one agent, and the special cases already there are not a precedent for more (how providers are integrated). The result-capture mechanism is broadly reusable, but its shared input matcher also strips Antigravity’s synthetic toolSummary argument and expands Antigravity’s marked-tail truncation workaround beyond HTML. That carries provider-specific handling into the shared ACP recovery path, contrary to the integration policy. Please report the altered arguments to Antigravity’s maintainer with a minimal transcript: ACP defines rawInput as the input actually sent to the tool in its Tool Calls section. The generic result capture and OpenCode recovery can come back without those conventions; any Antigravity normalization should stay in its existing dedicated driver. If Antigravity is not following the ACP spec here, the fix belongs with Antigravity: please file an issue with its maintainers and include a minimal ACP transcript that shows the behaviour and the section of the spec it breaks. Once it follows the spec, T3 Code needs no special case. Closing. |
|
Cheers, will do |
|
Hopefully Google will fix - this is an annoying one. Messages from agents to T3 during conversations get swallowed. |
Problem
On ACP providers such as Antigravity and Kiro, calling
send_to_userreturns"Shown to the user. Don't repeat it."to the model, yet nothing is displayed to the user on web, desktop, or mobile.The underlying root cause affects every T3 Code MCP tool on ACP runtimes:
rawOutputcompletely (agy 1.5.8+) or replaces it with a plain summary string (agy 1.3/1.4), and Kiro replacesrawOutputwith{ response, imageBase64Urls, message }.send_to_userrenders by readingitem.output.sentMessageviasentMessageFromToolItem, every ACPt3-code.send_to_useritem arrives with nosentMessageand falls into the collapsed work log instead of rendering inline.delegate_tasklosestaskId(so web and mobile fail to deduplicate it against its child subagent card),preview_recording_stoploses its recordingid(breaking attachment retention), thread/batch tools lose summary IDs and counts, and server-side MCP errors (isError: true) look like silent successes. Previously onlyhtml_renderhad a per-tool workaround inMcpProviderSessions.execute), nestedsend_to_usercalls whose results are not returned by the script are also dropped even though nestedhtml_rendercalls are recovered frommetadata.toolCalls.Change
Capture compact T3 MCP tool results once at the MCP server boundary and recover them generically in the ACP adapter (plus nested
send_to_userin OpenCode 2 Code Mode), rather than adding another per-tool special case:packages/shared/src/toolOutput.ts: AddcompactT3McpToolOutput(toolName, value)returning the existing boundedcompactDynamicToolOutputmetadata (sentMessage,taskId,threadId,messageId,scheduledTaskId,status,thread,threads,linkedCount,unlinkedCount,isError) pluspreview_recording_stop'sid.packages/provider-core/src/server/McpProviderSessions.ts: Add bounded per-threadrecordToolResult/takeToolResult(capped at 64 entries per thread, cleared on session change/clear) alongside the existinghtml_renderpath/hash buffer. Matches by canonical tool name and canonical input hash (stripping Antigravity's synthetictoolSummaryfield that is never forwarded to T3's MCP server) with[Earlier output truncated]\n\ntail matching for truncated long string arguments such asdelegate_task.task.apps/server/src/mcp/McpHttpServer.ts: AddwithToolResultCapturetotoolkitRegistrationandimageToolRegistration(skippinghtml_render, which keeps its own publish/cleanup lifecycle inHtmlRender). Records each thread-scoped T3 MCP call's compact output — including{ isError: true }on declared, validation, or unexpected failures — synchronously inEffect.onExitbefore the MCP response returns to the provider.packages/provider-acp/src/server/adapter.ts: Recover missing or replaced results for allresolveT3McpToolId(toolName)tools across ACP providers (Antigravity, Kiro, Grok, Fx, ACP Registry):claimedToolResultsanddrainedToolResultIdsbytoolCallIdso repeated completions, interleavedin_progressreplays, and late-confirmed outputs followed by summary replays neither lose confirmed outputs nor steal a sibling call's recorded result.projectedStatus === undefinedso unfinished calls synthesized at turn end do not claim unverified outputs.{ isError: true }whenacpMcpToolCallOutputunwraps{ result: { isError: true, content: [] } }.packages/provider-opencode/src/server/toolItems.ts&packages/provider-opencode/src/server/v2/adapter.ts: Recover nestedsend_to_usercalls from Code Modemetadata.toolCallsviamcpSessions.takeToolResult, deduplicating against anysentMessagealready returned directly by theexecutescript.Scope
Bug fix for one underlying problem: T3 MCP tool outputs lost when ACP runtimes strip or replace
rawOutput(observed directly on a live Antigravity0.1.12-nightlythread wheret3-code.send_to_userand every siblingt3-code.*item persisted withoutput: undefinedand mobile reported"t3code-sendtouser didn't work").Related to open PR #38956 (757 commits behind
main), which special-cases onlysend_to_useron Antigravity; this PR generalizes result capture and recovery to all T3 MCP tools at theMcpHttpServer/ ACP adapter boundary, includes Kiro and OpenCode 2 Code Mode, and addresses the edge cases noted in #38956's review threads (interleavedin_progressreplays, late-reported outputs before summary replays, turn-endprojectedStatusgating, and unwrapped empty-content error markers). No client UI or contract changes were needed because web, desktop, mobile, and guest timelines already projectsentMessageFromToolItemonceoutput.sentMessageis present.Verification
0.1.12-nightlyrun (toolName: "t3-code.send_to_user",status: "completed",inline_work_output: 1,input: { message, toolSummary },output: undefined), along with 30 siblingt3-code.*items in the same thread that all persisted withoutput: NULL.apps/server/src/orchestration-v2/Adapters/AntigravityAdapterV2.test.ts(36 passed): drives realsend_to_usercalls throughMcpHttpServer.layerMessageToolkitintoAntigravityAdapterV2and asserts on emitted turn items acrossagy 1.5.xoutput-less completions withtoolSummary, back-to-back identical messages with interleavedin_progress+ summary replays, unpublished calls, failed/retried calls, MCP validation errors (isError: true), unwrapped empty-content errors, late-confirmed outputs followed by summary replays, unfinished turn-end projected calls, truncateddelegate_taskprompts (taskId), andpreview_recording_stop(id).apps/server/src/orchestration-v2/Adapters/KiroAdapterV2.test.ts(22 passed): verifies@t3-code/send_to_userrecoverssentMessagewhen Kiro replacesrawOutputwith plain confirmation text.apps/server/src/orchestration-v2/Adapters/OpenCode2AdapterV2.test.ts(195 passed): verifies Code Modeexecutescripts sending twosend_to_usermessages (returning the first, discarding the second) render both without duplication.apps/server/src/mcp/toolkits/core.test.ts(31 passed): verifieswithToolResultCapturerecords compact outputs forsend_to_user(matching with Antigravity's extratoolSummary) and records{ isError: true }onInvalidParams.packages/shared/src/toolOutput.test.ts(13 passed): verifiessentMessageFromToolItemacrossmcp__t3-code__send_to_user,t3-code.send_to_user,t3-code-thread_1_send_to_user,send_to_user, andexecute.apps/server/src/htmlRender/HtmlRender.test.ts(13 passed, 3 skipped without headless shell): confirms existinghtml_renderrecovery is unaffected.vp run check:changedpassed (format,lint,knip1/2 & 2/2,graphql,typecheckacross 37 packages, and 347/347 tests across 8 files).sentMessageFromToolItemis unchanged and covered by existing web/mobile timeline tests.Written with Gemini 4 Neon in T3 Code (Antigravity harness).