fix(agent-worker): a Dev tool call's summary names what it acted on
Draft
SA
2d ago+22+22+01234567890123456789-0-0-0123456789
Summary
agent_turns.tool_calls[].summaryis empty for every Dev MCP tool call:callSummaryonly reads shell and file arguments (command,path,pattern,shell_id,description). In production, all 14 recorded Dev tool calls (13mcp__dev__reply, 1mcp__dev__list_work) have an empty summary. A reply that went to the wrong room looks the same as a good one.callSummarynow also readstarget,taskId,channel,routine_id,pageId,id,slug,titleandquery.descriptionmoves below them, so it is only used when nothing else fits.- Bulk text (
body,instructions,text,content,html) stays out. The summary is still cut to 200 characters.
Compatibility
The worker change only. settleTurn already takes summary: z.string(), and the stored JSON shape does not change. Nothing reads summary except people diagnosing turns.
Validation
- New test
settleTurn > records where a reply tool call went. It fails onmainand passes here.createActivitiessuite 15/15. bun run typecheckinapps/agent-workerandbiome checkare clean.
The Dev doctor opened this as a first step on rough edge 32 ("a turn's tool calls keep no input"). The end state is a short, size-capped input per call.
Summary by cubic
Fixes Dev tool call summaries so agent_turns.tool_calls[].summary names what the call acted on. Previously the summary only read shell and file arguments, so every Dev MCP tool call in production (13 replies, 1 list_work) had an empty summary and a reply sent to the wrong room looked like a good one.
callSummarynow also reads the reply target, task ID, channel, routine ID, page ID or slug, title, and query, withdescriptiondemoted to a last resort.- Bulk text (
body,instructions,text,content,html) stays out of the summary and the 200-character cap remains. - Only the worker changes;
settleTurnalready accepts a string summary and the stored JSON shape doesn't change. - Adds a test that a reply tool call records its channel, which fails on
mainand passes with this change.