When I test a CLI agent with /chat, the summary shows that a tool ran but not what the model sent to it or what came back. The runtime already streams that data.
Repro (mcs-assistant 1.0.2, GitHub Copilot harness agent with a flow tool):
-
Ask the agent something that calls the flow tool, for example node chat-with-agent.bundle.js --agent-dir <agent> --raw "Call GetPurchaseStatus with prNumber PR-1042".
-
In the --raw output, the tool call appears as two typing activities (streamType: informative), each with a toolCall entity:
{"type": "toolCall", "toolCallId": "toolu_01Q6...", "toolName": "GetPurchaseStatus",
"toolCategory": "Flow", "status": "started",
"filledParameters": {"prNumber": "PR-1042"}, "unfilledParameters": ["ticketId"]}
{"type": "toolCall", "toolCallId": "toolu_01Q6...", "toolName": "GetPurchaseStatus",
"toolCategory": "Flow", "status": "completed", "durationMs": 6302,
"filledParameters": {"prNumber": "PR-1042"}, "result": "{\"status\":\"...\"}"}
-
Run the same message without --raw. steps only contains Calling GetPurchaseStatus... and GetPurchaseStatus completed.
The cause is collectSteps in scripts/src/response-format.js, which keeps only the activity text.
Why it matters: when a flow tool gives a wrong answer, the first question is what the model passed in. On one project the model sent an object where the flow expected a string, and I only found that in the flow's trigger history after several redeploys.
Proposal: add a tool_calls array with one record per toolCallId, merging the started and completed events: toolName, toolCategory, status, filledParameters, unfilledParameters, result, durationMs. It needs to go into summarizeTurn and into the default JSON output in scripts/src/chat-with-agent.js, which lists its fields explicitly. Results can contain business data, so truncating long result strings would be reasonable.
When I test a CLI agent with
/chat, the summary shows that a tool ran but not what the model sent to it or what came back. The runtime already streams that data.Repro (mcs-assistant 1.0.2, GitHub Copilot harness agent with a flow tool):
Ask the agent something that calls the flow tool, for example
node chat-with-agent.bundle.js --agent-dir <agent> --raw "Call GetPurchaseStatus with prNumber PR-1042".In the
--rawoutput, the tool call appears as twotypingactivities (streamType: informative), each with atoolCallentity:{"type": "toolCall", "toolCallId": "toolu_01Q6...", "toolName": "GetPurchaseStatus", "toolCategory": "Flow", "status": "started", "filledParameters": {"prNumber": "PR-1042"}, "unfilledParameters": ["ticketId"]} {"type": "toolCall", "toolCallId": "toolu_01Q6...", "toolName": "GetPurchaseStatus", "toolCategory": "Flow", "status": "completed", "durationMs": 6302, "filledParameters": {"prNumber": "PR-1042"}, "result": "{\"status\":\"...\"}"}Run the same message without
--raw.stepsonly containsCalling GetPurchaseStatus...andGetPurchaseStatus completed.The cause is
collectStepsinscripts/src/response-format.js, which keeps only the activity text.Why it matters: when a flow tool gives a wrong answer, the first question is what the model passed in. On one project the model sent an object where the flow expected a string, and I only found that in the flow's trigger history after several redeploys.
Proposal: add a
tool_callsarray with one record pertoolCallId, merging thestartedandcompletedevents:toolName,toolCategory,status,filledParameters,unfilledParameters,result,durationMs. It needs to go intosummarizeTurnand into the default JSON output inscripts/src/chat-with-agent.js, which lists its fields explicitly. Results can contain business data, so truncating longresultstrings would be reasonable.