Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: acp-mcp-call html_render succeeds on Antigravity ACP (Windows) but never renders the inline HTML card #38434

Closedtravelvector(GitHub profile, opens in a new tab) opened this issue 0 comments

Before submitting

  • I searched existing issues and did not find a duplicate. (Checked #38123, #33667, #29130, #28230. #38123 covers Antigravity dropping oversized T3 MCP tools; this issue reports the separate acp-mcp-call html_render failure on Windows/Antigravity even when T3_ACP_MCP_NODE is present.)
  • I included enough detail to reproduce or investigate the problem.

Area

apps/server

Steps to reproduce

  1. On Windows (0.1.11-nightly.20261117.4851), start a thread using Google Antigravity (acpRegistry_google_antigravity, Antigravity ACP Server 1.5.10).
  2. Because html_render (1,668 B in mcp/t3-code/html_render.json) is omitted by Antigravity's eager schema cutoff (related: #38123), the agent follows <t3_code_instructions> and invokes the documented acp-mcp-call terminal fallback via T3_ACP_MCP_NODE (T3 Code (Nightly).exe) + T3_ACP_MCP_ENTRYPOINT (resources\server.asar\apps\server\dist\bin.mjs):
    • Case A (bare command per instructions): ELECTRON_RUN_AS_NODE=1 "$T3_ACP_MCP_NODE" "$T3_ACP_MCP_ENTRYPOINT" acp-mcp-call html_render '{"title":"...","height":982,"path":"..."}'
    • Case B (redirecting to a file then reading it): ... acp-mcp-call html_render $payload 2>&1 | Out-File ...; Get-Content ...
    • Case C (single-line pipe to preserve ACP_MCP_FALLBACK_CALL match): ... acp-mcp-call html_render $payload 2>&1 | Out-String -Width 4096

Expected behavior

Calling acp-mcp-call html_render renders the inline HTML card above the assistant reply in the thread timeline (or returns a clear failure if unsupported).

Actual behavior

html_render silently produces no inline HTML card in all three cases:

  1. Case A (bare command): On Windows, T3 Code (Nightly).exe is a GUI-subsystem binary (IMAGE_SUBSYSTEM_WINDOWS_GUI). Running it in pwsh without piping/redirection drops stdout/stderr completely (No output from the command.), so item.output contains no htmlRender payload (and htmlRenderFromToolItem returns undefined).
  2. Case B (multi-line redirect + Get-Content): Captures stdout ({"structuredContent":{"htmlRender":{"attachmentId":...}}}), but ACP_MCP_FALLBACK_CALL (packages/provider-acp/src/server/runtimeModel.ts#L1823-L1825) ends with (?:\s+(.+?))?\s*$ (single-line end-of-string), so trailing lines prevent extractMcpToolCallIdentity from matching; the step is stored as command_execution instead of dynamic_tool, and session-logic.ts ignores it.
  3. Case C (single-line 2>&1 | Out-String -Width 4096): Correctly classifies the item as type: "dynamic_tool" (toolName: "t3-code.html_render") and receives the server's isError: false response ("message":"Shown to the reader above your reply..."), yet still renders no HTML card in the UI:
    • Antigravity's shell runner wraps stdout with a header ("Created At: ...\nCompleted At: ...\nCommand exited with code 0.\n\nCommand output:\n{...}").
    • readResult() in packages/shared/src/toolOutput.ts#L93-L129 passes that string straight to JSON.parse(value), which throws SyntaxError and returns { failed: false } (htmlRenderFromToolItem returns undefined).
    • Meanwhile apps/server/src/htmlRender/HtmlRender.ts#L1001-L1021 already stores the rendered attachment in McpProviderSessions.recordHtmlRender(...), but acp-mcp-call html_render never triggers takeHtmlRender(...) on the ACP adapter path.

Because html_render returns isError: false with "Shown to the reader above your reply...", the agent assumes the card is visible and omits the data from its text reply.

Impact

Major degradation or frequent failure

Version or commit

0.1.11-nightly.20261117.4851

Environment

Windows x64 (pwsh), T3 Code 0.1.11-nightly.20261117.4851, acpRegistry_google_antigravity (Antigravity ACP Server 1.5.10, gemini-4-hydrogen)

Logs or stack traces

Observed thread activity item (`t3_thread_read`, view="activity"):
- type: "dynamic_tool", status: "completed", toolName: "t3-code.html_render"
- output.output:
  Created At: 2026-11-18T10:59:35+08:00
  Completed At: 2026-11-18T10:59:52+08:00
  Command exited with code 0.

  Command output:
  {"content":[],"structuredContent":{"htmlRender":{"attachmentId":"<threadId>-<id>-html","title":"<title>","height":982,...},"message":"Shown to the reader above your reply. Don't mention or describe the page; reply with only what it doesn't already say."},"isError":false}

Suggested fix

  1. Extract trailing JSON in readResult() (packages/shared/src/toolOutput.ts) or consume McpProviderSessions.takeHtmlRender() for acp-mcp-call html_render fallback calls so wrapped shell output (Created At: ... Command output:\n{...}) still yields htmlRender.
  2. Windows T3_ACP_MCP_NODE stdout: When running acp-mcp-call via Electron's GUI binary on Windows (or via a dedicated console shim / node), ensure stdout reaches the ACP shell without requiring 2>&1 | Out-String.
  3. Prevent html_render from needing fallback on Antigravity: Trim HtmlRenderTool's embedded layout/theme guides (apps/server/src/mcp/toolkits/html/tools.ts#L140-L169, currently 1,668 B) below Antigravity's eager threshold (see update on #38123: agy 1.5.10 drops tools >= 847 B).

Workaround

Use html_preview (694 B, which loads natively as mcp_t3-code_html_preview), save/copy the rendered PNG, and embed it via Markdown image syntax (![title](abs/path.png)).

  1. tanstack-source added labelsbug

  2. juliusmarminge closed this

Sign in to join this conversation.