fix(provider-acp): Kiro's html_render pages show in the thread#28253

merged4
main
fix/issue-28230
opened8d agobyJJulius Marminge
View on GitHubTwo-way sync enabledPR last imported 5d ago

Problem

Kiro (an ACP registry agent) titles T3 tool calls @t3-code/<tool> and sends rawInput { tool_id: "t3-code::<tool>", arguments } with no _meta. extractMcpToolCallIdentity has no pattern for the leading @, so the ACP adapter never takes its T3 MCP path. As a result, html_render pages never appear in Kiro threads: the agent is told the page is shown, but the user sees nothing. Every other T3 tool call is also stored as a generic dynamic_tool named @t3-code/<tool>.

Reproduction on main (15fe283272): call extractMcpToolCallIdentity with Kiro's tool_call shape. It returns undefined for @t3-code/html_render, @t3-code/t3_thread_read and @t3-code/delegate_task. The same call without the @ resolves to { server: "t3-code", tool }.

Change

T3_MCP_TITLE_CALL now accepts an optional leading @ before the t3-code server name. Only names in the known T3 tool list are accepted, as before, so other servers' @<server>/<tool> titles still don't match. Once the call is recognised, the adapter's existing MCP branch reads Kiro's rawInput.arguments and recovers the published html_render page with takeHtmlRender.

Scope and approval

Fixes pingdotgg/t3code#28230

Verification

  • New test extractMcpToolCallIdentity > recovers T3 identity from Kiro's @-scoped titles in packages/provider-acp/src/server/runtimeModel.test.ts. On main it fails with html_render: expected undefined to deeply equal { server: 't3-code', tool: 'html_render' }. With the fix, the whole file passes (52/52), and so does vp test run packages/provider-acp (151 tests).

  • vp run check:changed passes: format, lint, knip, typecheck (13 packages) and tests.

  • Regex: still linear time. The only change is one optional single-character alternative, and there are no nested quantifiers. On malformed inputs of about 3000 tokens, each match took under 0.03 ms.

  • Runtime transcript from a driver script that calls extractMcpToolCallIdentity with Kiro-shaped tool_calls. The script is not committed; it's included here because the upload tool was unavailable:

    1# main 15fe283272 (before)
    2"@t3-code/html_render" -> undefined
    3"@t3-code/t3_thread_read" -> undefined
    4"@t3-code/delegate_task" -> undefined
    5"t3-code/html_render" -> {"server":"t3-code","tool":"html_render"}
    6"@github/create_issue" -> undefined
    7
    8# fix/issue-28230 e9c4e8f12c (after)
    9"@t3-code/html_render" -> {"server":"t3-code","tool":"html_render"}
    10"@t3-code/t3_thread_read" -> {"server":"t3-code","tool":"t3_thread_read"}
    11"@t3-code/delegate_task" -> {"server":"t3-code","tool":"delegate_task"}
    12"t3-code/html_render" -> {"server":"t3-code","tool":"html_render"}
    13"@github/create_issue" -> undefined
    Driver
    js
    1import { extractMcpToolCallIdentity } from "./packages/provider-acp/src/server/runtimeModel.ts";
    2const kiro = (title, tool) => ({ toolCallId: "k1", kind: "other", status: "completed", data: { toolCallId: "k1", title, kind: "other", rawInput: { tool_id: `t3-code::${tool}`, arguments: { title: "Card", html: "<p>hi</p>" } } } });
    3for (const [title, tool] of [["@t3-code/html_render","html_render"],["@t3-code/t3_thread_read","t3_thread_read"],["@t3-code/delegate_task","delegate_task"],["t3-code/html_render","html_render"],["@github/create_issue","create_issue"]]) {
    4 console.log(JSON.stringify(title).padEnd(28), "->", JSON.stringify(extractMcpToolCallIdentity(kiro(title, tool))));
    5}
  • Evidence: this is a server-only fix with no client code changed, so there are no before/after captures. The proof is the red test plus the transcript above.

  • Not checked: a live Kiro turn, because no Kiro account or kiro-cli was available. Tool rows already stored as @t3-code/<tool> keep their old projection.

Claude Opus 5.5 (Claude Code, T3 Code automated issue triage); reviews by GPT-6.1 Sol (Codex) and Claude Opus 5.5.

🤖 Generated with Claude Code

Checks

21 successful · 18 skipped
All checks passed
5c23715

Added 2 commits

  • fix(provider-acp): recognise Kiro's @-scoped T3 MCP tool titlese9c4e8f
  • test(provider-acp): reproduce #28230 Kiro @-scoped MCP titles losing T3 identityeff60ba
Synced from GitHub

Approvability

Verdict: Approved at e9c4e8f

Macroscope's review found this PR approvable — Recognizes Kiro’s @t3-code tool titles so existing MCP presentation, including HTML-render pages, works in threads. Recognition remains restricted to known tools and retains existing provenance checks.

No code changes detected at 5c23715. Prior analysis still applies.

You can add or adjust custom eligibility rules. Learn more.

Synced from GitHub

Thread transfer impact

âś… Thread transfer remains within every enforced ceiling.

ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

ProviderMetricMain baselineThis PRImpactPR ceiling
CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiBâś…
CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiBâś…
CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiBâś…
CodexLive turn WebSocket decoded21.6 KiB21.6 KiB0 B (0.0%)24.4 KiBâś…
CodexLive turn messages220 (0.0%)8âś…
ClaudeTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiBâś…
ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiBâś…
ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiBâś…
ClaudeLive turn WebSocket decoded21.9 KiB21.9 KiB0 B (0.0%)24.4 KiBâś…
ClaudeLive turn messages220 (0.0%)8âś…

Baseline: 42ca7c0 · PR result: 5c23715 · Source CI: success

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 108.5 KiB
  • Claude decoded thread snapshot: 108.8 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Synced from GitHub

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between 219f04d660b5f3a1d620a02ba5735235506011a5 and 5c237155528f71d4ec1c64f0c5cefcd96ebdfec4.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The ACP runtime’s T3 MCP title matcher now accepts an optional leading @. Tests cover identity extraction for html_render, t3_thread_read, and delegate_task.

Changes: Kiro T3 tool title matching

Layer / File(s)Summary
Match Kiro T3 titles and verify identity
packages/provider-acp/src/server/runtimeModel.ts, packages/provider-acp/src/server/runtimeModel.test.ts
The title pattern accepts an optional leading @. Tests check that three Kiro-style titles extract the expected t3-code server and tool identity.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: maria-rcks

Merge Risk: External image Minimal · previous review 219f0

The focused source and test coverage support merging this matcher change; live Kiro validation remains optional follow-up.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check nameStatusExplanationResolution
Out of Scope Changes checkWarningThe current head also changes unrelated ACP plan behavior by adding cancelled plan-step status handling. It removes state_update idle usage-event generation and changes its test to expect no event…Remove the unrelated cancelled plan-step changes and the state_update usage-event removal from this pull request, or link them to a separate active coding requirement and provide the corresponding scope.
Passed Passed checks: 3 passed
Check nameStatusExplanation
Title checkPassedThe title clearly and concisely describes the primary fix: making Kiro html_render pages appear in the thread.
Description checkPassedThe description covers the problem, change, scope, verification results, regression coverage, and the untested live Kiro scenario. It is mostly complete and directly aligned with the pull request.
Linked Issues checkPassedIssue #28230 requires Kiro calls titled @t3-code/<tool> to use the T3 MCP path so html_render pages appear in the thread. The PR adds the optional @ matcher and focused regression coverage for `…
Full details: Linked Issues check

Explanation

Issue #28230 requires Kiro calls titled @t3-code/&lt;tool&gt; to use the T3 MCP path so html_render pages appear in the thread. The PR adds the optional @ matcher and focused regression coverage for html_render, t3_thread_read, and delegate_task. The current code also recovers Kiro identity from rawInput.tool_id when Kiro metadata is present. These changes support the required server behavior. The reported lack of a live Kiro turn does not block the coding assessment.

Full details: Out of Scope Changes check

Explanation

The current head also changes unrelated ACP plan behavior by adding cancelled plan-step status handling. It removes state_update idle usage-event generation and changes its test to expect no events. These changes do not support issue #28230, which concerns Kiro T3 tool identity and html_render recovery.

Resolution

Remove the unrelated cancelled plan-step changes and the state_update usage-event removal from this pull request, or link them to a separate active coding requirement and provide the corresponding scope.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
External image Recent review info
External image Run configuration
External image Commits

Reviewing files that changed from the base of the PR and between e9c4e8f12cec16b6ef74d29dc2d33efbfb8b50c9 and 219f04d660b5f3a1d620a02ba5735235506011a5.

External image Files selected for processing: 2
  • packages/provider-acp/src/server/runtimeModel.test.ts
  • packages/provider-acp/src/server/runtimeModel.ts

Limit details: You’ve used all 10 included reviews currently available.

Added 2 commits

  • Merge branch 'main' into fix/issue-28230219f04d
  • Merge branch 'main' into fix/issue-282305c23715