fix: add changelog and clean regression comment for tool-result guard (#25429) (thanks @mikaeldiakhate-cell)

This commit is contained in:
Peter Steinberger
2026-02-24 14:41:46 +00:00
parent 8db7ca8c02
commit 6da03eabe2
2 changed files with 2 additions and 3 deletions

View File

@@ -358,11 +358,9 @@ describe("installSessionToolResultGuard", () => {
});
});
// Regression test for orphaned tool_result bug
// See: https://github.com/clawdbot/clawdbot/issues/XXXX
// When an assistant message with toolCalls is aborted, no synthetic toolResult
// should be created. Creating synthetic results for aborted/incomplete tool calls
// causes API 400 errors: "unexpected tool_use_id found in tool_result blocks"
// causes API 400 errors: "unexpected tool_use_id found in tool_result blocks".
it("does NOT create synthetic toolResult for aborted assistant messages with toolCalls", () => {
const sm = SessionManager.inMemory();
installSessionToolResultGuard(sm);