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
fix(#2053): add pendingAssistantToolUse guard to beta message converter
The non-beta convertMessages has a pendingAssistantToolUse flag that
only includes tool_result user messages when they immediately follow
an assistant message with tool_use blocks. Orphan tool results from
corrupted session history are silently dropped.
The beta convertBetaMessages had no such guard — every tool role
message was unconditionally converted to a tool_result block. When
the session history contained orphan tool results (e.g. from
sub-agent messages that leaked into the parent session), they passed
straight through to the Anthropic API, causing:
"unexpected tool_use_id found in tool_result blocks"
Add the same pendingAssistantToolUse tracking to convertBetaMessages
to match the non-beta converter behavior.
Assisted-By: docker-agent
0 commit comments