mirror of
https://github.com/patriceckhart/zot.git
synced 2026-06-26 21:36:31 +02:00
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. |
||
|---|---|---|
| .. | ||
| agent | ||
| core | ||
| provider | ||
| tui | ||