Repository navigation
Description
With an ACP registry agent, some tool rows show "Tool" after they finish, even though the agent named the call in its tool_call. The persisted dynamic_tool item has title: "Tool" and toolName: "Tool", so the name stays lost after a reload and in t3_thread_read.
On my install (0.1.11-nightly.20261118.4864, macOS arm64), one Claude Code-based ACP agent has 799 dynamic_tool items, and 15 of them have toolName: "Tool". Their stored inputs show what they were: Skill ({"skill":"dataviz"}), ToolSearch ({"query":"select:WebFetch"}) and Agent calls.
Expected: an update that carries no title keeps the title from the tool_call. ACP allows updates to omit unchanged fields ("only changed fields need to be included").
Cause, on main 5db8cca (2026-11-18). These functions are unchanged since at least b5554ac:
makeToolCallState(packages/provider-acp/src/server/runtimeModel.ts:823) builds a presentation whenever the update has text content, usingfallbackSummary: title ?? "Tool"(:911). For an update with notitleand nokind,deriveToolActivityPresentationreturns the summary "Tool", and that becomes the update'stitle.mergeToolCallState(:949) takesnext.title ?? previous.title, so "Tool" replaces the real name.- For tools that are not commands, the turn item sets
toolName: toolCall.title ?? toolCall.kind(packages/provider-acp/src/server/adapter.ts:4698). That stores the display fallback as the tool's identity.
Repro with vitest in packages/provider-acp (run at b5554ac, where the three functions are identical to main):
const toolState = (update) =>
parseSessionUpdateEvent({ sessionId: "s", update }).events.find((e) => e._tag === "ToolCallUpdated").toolCall;
const created = toolState({ sessionUpdate: "tool_call", toolCallId: "t1", title: "ToolSearch", kind: "other", status: "pending" });
const updated = toolState({
sessionUpdate: "tool_call_update", toolCallId: "t1", status: "completed",
content: [{ type: "content", content: { type: "text", text: "result text" } }],
});
mergeToolCallState(created, updated).title; // "Tool""Agent" and "mcp__srv__lookup" give the same result. An update without text content keeps the title. In recorded frames, claude-agent-acp's v1 output also sends completion updates with text content and no title (for example its Agent call, kind: "think"). I haven't checked what T3 shows for claude-acp over v2.
About the evidence: I don't have per-frame ACP captures for the 15 stored rows. Linking them to this path is an inference from the code and the repro above.
Fix direction: in mergeToolCallState, if the update carried neither title nor kind (next.data.title and next.data.kind both undefined), keep previous.title. I tried this locally: the repro passes, and the existing packages/provider-acp tests (110) still pass. It may also make sense to stop deriving toolName from the display title.
#20363 covered this ("keep agents' tool labels and command details"). It was closed on 11-12 because it had gone stale, not on its merits.
Activity