zot/packages
patriceckhart b25b860b09 fix(core): repair dangling tool_use on every request, not just load
A turn aborted mid-flight (cancel, connection drop, dev-server
ECONNREFUSED) can leave an assistant tool_use block with no matching
tool_result in the live transcript. repairToolUseResultPairs already
fixes this, but only ran in OpenSession (load time), so an in-process
abort left the transcript broken until restart. The next request was
then rejected by Anthropic/OpenAI with 'tool_use ids were found without
tool_result blocks'.

Run the same repair on the outbound messages in oneTurn. It is pure and
a no-op on valid transcripts, so there is no hot-path cost beyond a
single linear scan and no behavior change for healthy sessions.
2026-06-09 12:56:31 +02:00
..
agent chore: gofmt spontaneous panel files 2026-06-08 19:41:28 +02:00
core fix(core): repair dangling tool_use on every request, not just load 2026-06-09 12:56:31 +02:00
provider fix(bedrock): inject stub toolConfig when history has tool blocks 2026-06-08 10:56:03 -04:00
tui Word-wrap provider error rows instead of truncating 2026-06-04 19:25:16 +02:00