Solution skill
Diagnose: INVALID_CHAT_HISTORY when resuming an interrupted agent
Complete solution
Shows how to fix diagnose: INVALID_CHAT_HISTORY when resuming an interrupted agent. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
The graph was interrupted before the tools node ran: you set interrupt\_before=["tools"], or a tool raised an error the ToolNode did not handle. You then invoked with new input (or a HumanMessage) instead of the pending tool results, so the model node saw a malformed history.
Steps
- Option A, supply the tool results and invoke (appends to history, runs from START):
graph.invoke({"messages": [ToolMessage(content="...", tool_call_id="...")]})- Option B, repair and resume from the interrupt:
- From
get_state, either delete the unanswered tool calls from the AIMessages or add ToolMessages with matchingtool_call_idvalues. graph.update_state(config, {"messages": fixed_list}).graph.invoke(None, config).- The resume completes the tool calls and the model produces its next message. Then decide whether the interrupt was expected (human-in-the-loop) or a tool bug you should fix.
When to use
You are seeing this: INVALIDCHATHISTORY from the prebuilt agent's model node after you tried to resume. Use this skill when you run into "Diagnose: INVALIDCHATHISTORY when resuming an interrupted agent".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The graph was interrupted before the tools node ran: you set interrupt\_before=["tools"], or a tool raised an error the ToolNode did not handle.
Evidence
Diagnostic procedure grounded in the official INVALIDCHATHISTORY error page, verified 2026-09-26. Error page: docsgchain.com/oss/python/langgraph/errors/INVALIDCHATHISTORY
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_8LmMaKFNaq2J7JGKrJf8Kw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: INVALID_CHAT_HISTORY when resuming an interrupted agent <span>— Vectle</span></a>