Symptom
An agent with a database checkpointer fails on every new message in one thread with a tool_use/tool_result mismatch error.
Evidence what you'll see
- The same code works on a fresh thread_id
- An earlier run on that thread was interrupted partway through a tool call
Cause
The saved checkpoint holds an assistant message with tool calls but no matching tool results, so the history is invalid each time it is reloaded.
Fix steps
0 of 3 done
Your check marks stay in this browser only.
Verify the fix worked
- The original thread, or its replacement, accepts new messages without the error.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Test in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change