@devries-cameron20 / t3code-1 / commits / a308715773
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(provider-acp): Hermes html_render pages show in the thread (#29141)

Julius Marminge committed Nov 11, 2026 at 15:23 UTC a308715773b66f1de9403039b6f359bab1961388
2 files changed +32
packages/provider-acp/src/server/runtimeModel.test.ts
+23
@@ -1366,6 +1366,29 @@ describe("extractMcpToolCallIdentity", () => {
1366 }
1367 });
1368
1369 + it("recovers T3 identity from Hermes editor-renamed MCP tool titles", () => {
1370 + const identityFor = (title: string) =>
1371 + extractMcpToolCallIdentity(
1372 + toolCallFromUpdate({
1373 + sessionUpdate: "tool_call",
1374 + toolCallId: "hermes-1",
1375 + kind: "other",
1376 + title,
1377 + status: "pending",
1378 + rawInput: { title: "Chart", html: "<p>hi</p>", height: 320 },
1379 + }),
1380 + );
1381 +
1382 + expect(identityFor("mcp__editor_t3_code_f6129534__html_render")).toEqual({
1383 + server: "t3-code",
1384 + tool: "html_render",
1385 + });
1386 + expect(identityFor("mcp__editor_github_1234abcd__html_render")).toEqual({
1387 + server: "editor_github_1234abcd",
1388 + tool: "html_render",
1389 + });
1390 + });
1391 +
1392 it("recovers T3 identity from Kiro's @-scoped titles", () => {
1393 for (const tool of ["html_render", "t3_thread_read", "delegate_task"]) {
1394 const toolCall = toolCallFromUpdate({
packages/provider-acp/src/server/runtimeModel.ts
+9
@@ -1161,6 +1161,15 @@ export function extractMcpToolCallIdentity(
1161 for (const candidate of candidates) {
1162 const trimmed = candidate.trim();
1163 const qualified = /^mcp__(.+?)__(.+)$/i.exec(trimmed);
1164 + // Hermes renames client MCP servers to editor_<sanitized name>_<8 hex of a per-session hash>.
1165 + if (
1166 + qualified?.[1] &&
1167 + qualified[2] &&
1168 + /^editor_t3_?code_[0-9a-f]{8}$/.test(qualified[1]) &&
1169 + T3_MCP_TOOL_NAMES.has(qualified[2])
1170 + ) {
1171 + return { server: "t3-code", tool: qualified[2] };
1172 + }
1173 if (qualified?.[1] && qualified[2] && !/^t3[-_ ]?code$/i.test(qualified[1]))
1174 return { server: qualified[1], tool: qualified[2] };
1175 const match =