Files
Moltbot/src
Christian Klotz f32eeae3bc fix: remove orphaned tool_results during compaction pruning
When pruneHistoryForContextShare drops chunks of messages, it could drop
an assistant message with tool_use blocks while leaving corresponding
tool_result messages in the kept portion. These orphaned tool_results
cause Anthropic's API to reject the session with 'unexpected tool_use_id'.

Fix by calling repairToolUseResultPairing after each chunk drop to clean
up any orphaned tool_results. This reuses existing battle-tested code
from session-transcript-repair.ts.

Fixes #9769, #9724, #9672
2026-02-05 20:37:53 +00:00
..
2026-01-30 03:16:21 +01:00
2026-02-05 07:56:16 +00:00
2026-02-04 10:37:14 -05:00
2026-02-05 12:33:59 -08:00
2026-02-02 04:58:32 -08:00
2026-02-02 23:45:05 -08:00
2026-01-30 03:16:21 +01:00
2026-02-04 19:09:52 -05:00
2026-02-02 23:45:05 -08:00
2026-02-05 19:51:00 +09:00
2026-02-03 06:10:19 +00:00