What this thread does
Do first: use add_messages for ordinary message state and compare every outgoing tool-result identifier with the immediately preceding assistant tool-call batch before making the next model request. In Python, import the reducer from langgraph.graph.message and declare the state field as messages: Annotated[list[AnyMessage], add_messages].
Short answer
As of November 2026, LangGraph 1.2.24 is a release reference. Separately, 1.2.15 release notes include the DeltaChannel replay-order correction from Elior Nataf Lackritz's PR.
Choose / don't choose
- Delta updates: return only each node's new
ToolMessagecontribution with stable message IDs; don't append the complete previous history again in every parallel branch.add_messagesappends new message IDs and updates an existing ID (Graph API). - Whole-history replacement: choose only a deliberate single-owner reset using an API intended to overwrite state; don't race full-history replacements from parallel workers or concatenate assistant messages with fresh IDs on retries. The Graph API names
Overwriteas the way to bypass a merging reducer and replace its value. - DeltaChannel replay: investigate when live execution is correct but resumed state reorders results. ErenAta16's report and Alejandro Sanchez C's follow-up describe this signature and an OCI provider rejection. Reordering a complete result batch can address that order-sensitive provider.
Not for: graph step-budget or concurrent last-value errors; see graphrecursionerror-invalidupdateerror-langchain-langgraph-fixes.
Settings that matter
| Setting or flag | Value / default | Applies to | Source |
|---|---|---|---|
messages / add_messages | Annotate message state with the message reducer, or use MessagesState; return only new updates | Current Python Graph API docs, November 2026 | Graph API |
ToolMessage.tool_call_id | Exactly match a call ID from the preceding assistant batch; one result per requested call | Current tool-results guidance | LangChain |
parallel_tool_calls | Set False in model.bind_tools(...) as a temporary diagnostic where the model/provider supports it | Current LangChain model docs, November 2026 | models |
DeltaChannel | If used, compare live and resumed message order; ordinary add_messages state is an alternative for new or migrated threads when delta storage is unnecessary | Reported replay failure; current release boundary above | runtime, release |
The LangChain INVALID_TOOL_RESULTS error identifier is currently documented as JavaScript/TypeScript-only. Its pairing rule explains provider requirements but is not a claim that Python emits that exact exception (guidance).
Order of operations
1. Capture a redacted structural view of the outgoing messages: roles, message IDs, assistant call IDs and tool-result IDs, without tool arguments or private content. Count requested and completed calls. 2. Finish every call in the assistant batch and merge one corresponding result per ID. Keep the original assistant message and its call IDs. Synchronize all tool branches before routing back to the model; an early branch must not trigger a model request on partial history (runtime phases). When every branch always runs, give add_edge a list of branch-end node names as its start argument so the destination waits for all of them. 3. Compare live output with checkpoint rehydration. For an order-sensitive endpoint, arrange each complete result batch in the preceding assistant-call order, without changing call IDs. Repair duplicates, orphans and missing results at the batch boundary; recover the actual pending result or restart from a consistent checkpoint instead of fabricating success (pairing guide). 4. For the historical DeltaChannel regression, upgrade core and checkpoint backends as a compatible set. The fix aligns live/replay sort keys and changes SQLite task-path persistence; it warns against swapping core without the corresponding checkpoint package. Exercise save/resume with synthetic parallel calls before moving existing threads. 5. If needed, disable model parallel tool calls temporarily and compare new batches. Re-enable only after both normal and resumed histories preserve every result exactly once.
Known failures and fixes
Diagnostic: 'tool_call_id' of '<id>' not found
| Error (short quote) | Cause | Fix | Source |
|---|---|---|---|
'tool_call_id' of '<id>' not found | OCI report rejects reordered results after DeltaChannel rehydration despite correct live order | Use the released replay fix with compatible backends, or ordinary message state for new or migrated threads; preserve batch order for that provider | Alejandro Sanchez C in #8382, fix release |
INVALID_TOOL_RESULTS | Missing, excess or orphan result messages; identifier documented for JS/TS | Require exactly one matching response for each assistant call; repair the conversation before retry | LangChain guide |
Missing
- No universal provider guarantee accepts arbitrary result order. Check the actual endpoint; the OCI report does not establish every OpenAI-compatible provider's behavior.
- A reducer does not enforce call/result pairing, and a new release does not reconstruct results lost by application logic.
Checked
2026-11-15; linked current/fix release notes, Graph API, model/tool-result docs, ErenAta16 and Alejandro Sanchez C reports, and Lackritz fix read. No model requests, graph runs or checkpoint migrations executed.
Started from a post by @ErenAta16, packaged by the editor. Original post