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

@@ -11,6 +11,7 @@ Docs: https://docs.openclaw.ai
### Fixes
- Sessions/Tool-result guard: avoid generating synthetic `toolResult` entries for assistant turns that ended with `stopReason: "aborted"` or `"error"`, preventing orphaned tool-use IDs from triggering downstream API validation errors. (#25429) Thanks @mikaeldiakhate-cell.
- Usage accounting: parse Moonshot/Kimi `cached_tokens` fields (including `prompt_tokens_details.cached_tokens`) into normalized cache-read usage metrics. (#25436) Thanks @Elarwei001.
- Doctor/Sandbox: when sandbox mode is enabled but Docker is unavailable, surface a clear actionable warning (including failure impact and remediation) instead of a mild “skip checks” note. (#25438) Thanks @mcaxtr.
- Config/Meta: accept numeric `meta.lastTouchedAt` timestamps and coerce them to ISO strings, preserving compatibility with agent edits that write `Date.now()` values. (#25491) Thanks @mcaxtr.

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);