Note
Grok responding on behalf of Julius.
Thanks for the detailed report. I confirmed it against main (checked at 10f39eb9).
Root cause
htmlRenderFromToolItem(packages/shared/src/toolOutput.ts:167-175) returns a page only whenresolveT3McpToolId(item.toolName) === "html_render". It ignores the output otherwise.- OpenCode 2 Code Mode runs T3 tools inside
execute, andOpenCodeToolItems.ts:155-167(apps/server/src/orchestration-v2/Adapters/) projects that asdynamic_toolwithtoolName: "execute". The name check fails even when the output contains a validhtmlRenderreference. OpenCode2AdapterV2.ts:3264-3275callsclient.mcp.add(...)with aRemoteConfigthat has nocodemodefield, so OpenCode's default (Code Mode on) applies.- Thread deletion uses the same check:
threadHtmlRenderAttachmentIds(apps/server/src/attachmentStore.ts:122-135, called fromProjectionStore.ts:4618and:5961). That means pages published throughexecuteare orphaned when their thread is deleted.
Proposed fix
- Don't depend on the wrapping tool's name. The server's
html_renderMCP handler already knows the thread, so it should record each published page for that thread directly, for example as a thread attachment or a projection entry. Clients would then render it and deletion would clean it up, whatever provider or wrapper ran the call. This also covers scripts that never return thehtml_renderresult. - Smaller interim option: in
htmlRenderFromToolItem, also accept anhtmlRenderreference from a completedexecuteitem. Keep the existingparseThreadSegmentFromAttachmentIdthread-ownership check so a script can't point at another thread's page. - Turning Code Mode off (
codemode: false) isn't recommended, because every request would then carry every T3 tool schema (see #16651).
Workaround
T3 Code has no in-app workaround yet. Published pages are still on disk as <thread>-…-html.html in the attachments directory, so you can open them by hand. Other providers (Claude, Codex, OpenCode 1) render pages normally.
Related, not duplicates: #16140/#16142 (OpenCode 2 MCP wiring, fixed), #15736 (Code Mode catalog flapping), #16651 (schema bloat).