Skip to content

/chat summary omits toolCall parameters, results, and duration #43

Description

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):

  1. 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".

  2. 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\":\"...\"}"}
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions