Skip to content

agentop: Show tool calls and results in the message that holds them #1657

Closed

Description

@huang195

Problem

The agentop detail pane does not show a tool call and its result in the message that holds them.

On a Claude Code request, the last turn is usually:

  1. An assistant message that calls a tool.
  2. A user message that holds the tool result.

The detail pane shows these two messages like this:

  • The assistant message shows only toolCallNames: "Bash". The command is not there.
  • The user message shows only contentBytes: 1843. It looks empty.

Cause

  • Results: the parser puts tool_result blocks into inference.toolResults, not into messages. This is on purpose (Feat: Record Anthropic tool results in session events #1338): plugins read messages, and tool output must not reach them. But no message records which results it holds. So agentop shows the results as one folded list at the end of the event.
  • Calls: the parser keeps only the name of each tool_use block (Feat: Name the tools an assistant message called #1643). It drops the id and the input. The arguments are only on the earlier response row's toolCalls. view=summary drops toolCalls, so agentop does not have them.

Proposal

The request records what its own detail view needs. No plugin sees the new data.

  1. InferenceMessage.ToolUseIDs: the ids of the message's tool_use or tool_result blocks, joined by ", ". Same pattern as ToolCallNames.
  2. InferenceExtension.HistoryToolCalls: the tool_use blocks of the request (id, name, arguments). This is a new field, not ToolCalls, because OPA, SPARC, CPEX and lineage read ToolCalls as the calls the model asks for now. Same rules as ToolResults: no plugin reads it, view=summary drops it, the interner and the archive share its arguments.
  3. agentop: in the detail pane, show each message's calls and results under that message, matched by id.

Scope

  • Anthropic Messages and OpenAI Chat Completions.
  • Not the Responses API (Codex). Its tool calls are separate input items, not messages.

Activity

  1. self-assigned this
    on Nov 3, 2026
  2. added a commit that references this issue on Nov 4, 2026
    f96e82d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions