You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log every message an agent sends, and which way in it came
An agent's session kept the calls that reached a tool. So a refused
`conclude` was a row with no answer under it, and a call to a tool that
does not exist, a method this build has never heard of and a line that
was not JSON were not rows at all — which is exactly the traffic somebody
opens that screen to look at, since the question it gets opened for is
usually why nothing happened.
Now every line goes down: `tool` is null for the ones that reached no
tool and `method` says what arrived instead, `output` is what went back
whatever that was, and `error` is separate from `refused` because they
are opposite claims — a refusal is the method working and an error is
this app failing. `AgentSession.toolCalls` is the subset that got as far
as a tool, which is what the eval counts and what the screen's `n
call(s)` says, so a command line's handshake per call doesn't read as
twice the work.
And a line records whether it came in over MCP or from `--agent` at a
shell. Told to `McpSession` at construction rather than worked out: past
the handshake the two are the same protocol on the same socket, which is
the point of them, so the door is the only place that knows. It travels
as the last word of the handshake line, and a connection that says
nothing is MCP.
Leaving `output` null for a refusal was a deliberate call — the refusal
was already in `refused`, so writing it twice looked like the same
paragraph on disk twice. From outside it looked like a call the app
answered and did not log.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
0 commit comments