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(mcp): ensure tool_result blocks for all tool_use blocks to prevent API errors
Fixes critical issue where tool_use blocks could be orphaned without
corresponding tool_result blocks, causing Claude API 400 errors:
"tool_use ids were found without tool_result blocks immediately after"
Changes:
- Collect tool results atomically before adding to messages
- Add error recovery to append tool_result for any orphaned tool_use blocks
- Ensures 1:1 pairing of tool_use and tool_result even on exceptions
Location: hanzo_mcp/tools/agent/agent_tool_v1_deprecated.py:449-603
0 commit comments