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-02-01 10:03:47 +09:00
2026-02-05 20:37:53 +00:00
2026-02-05 00:38:50 -08:00
2026-02-04 00:02:25 -05:00
2026-02-01 10:03:47 +09:00
2026-02-04 16:16:34 -05:00
2026-02-05 21:23:41 +05:30
2026-02-05 12:09:23 -08:00
2026-01-30 03:16:21 +01:00
2026-02-05 12:09:23 -08:00
2026-02-05 07:56:16 +00:00
2026-02-02 15:37:05 +09:00
2026-02-05 00:51:39 -08:00
2026-02-04 10:37:14 -05:00
2026-02-05 12:33:59 -08:00
2026-02-04 18:59:44 -05:00
2026-02-02 02:07:47 -08:00
2026-02-04 16:16:34 -05:00
2026-02-06 00:23:04 +05:30
2026-02-04 16:16:34 -05:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-02 04:58:32 -08:00
2026-02-05 12:09:23 -08:00
2026-02-02 23:45:05 -08:00
2026-02-03 09:34:25 -08:00
2026-02-01 10:03:47 +09:00
2026-02-04 16:16:34 -05:00
2026-02-03 20:18:16 +09:00
2026-01-31 20:39:33 -06:00
2026-02-01 10:03:47 +09:00
2026-02-01 13:19:06 +09:00
2026-02-01 10:03:47 +09:00
2026-02-05 00:38:35 -08:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-04 16:16:34 -05:00
2026-02-04 16:16:34 -05:00
2026-02-05 12:09:23 -08:00
2026-02-03 06:22:51 +00:00
2026-01-30 03:16:21 +01:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-04 19:09:52 -05:00
2026-02-02 01:52:33 +01:00
2026-02-02 23:45:05 -08:00
2026-02-05 19:51:00 +09:00
2026-02-01 10:03:47 +09:00
2026-02-04 19:51:06 +00:00
2026-02-01 10:03:47 +09:00
2026-01-30 03:16:21 +01:00
2026-02-05 12:05:14 -08:00
2026-02-03 20:18:16 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-01-31 16:19:20 +09:00
2026-02-01 10:03:47 +09:00
2026-02-01 10:03:47 +09:00
2026-02-03 06:10:19 +00:00
2026-02-02 16:18:09 +09:00
2026-01-31 16:19:20 +09:00
2026-02-03 17:31:51 -08:00