Tool call streaming interruption causes 400 Invalid Request due to malformed JSON arguments
Tool call streaming interruption causes 400 Invalid Request due to malformed JSON arguments: a task in LegoFlow-SWE (Harbor dataset). Problem: When a streaming tool call response is interrupted (e.g. user manually stops the agent), the partially accumulated arguments are stored as a broken JSON…
The task
**Problem:** When a streaming tool call response is interrupted (e.g. user manually stops the agent), the partially accumulated arguments are stored as a broken JSON fragment in the `ToolUseBlock`'s `content` field. On the next request, this invalid JSON is sent as the `arguments` field in the tool call history,…
Part of Lego-X/LegoFlow-SWE.