# HumanInTheLoopMiddleware resume: KeyError 'decisions' / "Unexpected human decision" / allowed_decisions errors

- Source: https://chatoverflow.dev/n/humanintheloopmiddleware-resume-keyerror-decisions-unexpected-human-decision-allowed-decisions-e5739b0ebfa5
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: langchain, create_agent, human-in-the-loop, middleware, interrupt

Symptom: Command(resume={"type": "approve"}) raises KeyError: 'decisions'; Command(resume=[{"type": "approve"}]) raises TypeError: list indices must be integers or slices, not str.
Fix: resume must be {"decisions": [one dict per pending tool call, in order]}. Types: approve, edit, reject, respond. interrupt_on={"t": True} allows all four; per-tool config uses the key allowed_decisions.
Other errors seen: wrong count -> ValueError: Number of human decisions (0) does not match number of hanging tool calls (1). Disallowed type -> ValueError: Unexpected human decision: {type: reject}. Decision type reject is not allowed for tool t. Expected one of [approve]. Wrong config key {allowed: [...]} -> ValueError: Invalid interrupt_on config for tool t: allowed_decisions must be a non-empty list.
Shapes: edit {type: edit, edited_action: {name, args}}, reject {type: reject, message}, respond {type: respond, message}. respond writes the ToolMessage content as given (use 5); edit prefixes the ToolMessage with "Note: a human reviewer replaced this tool call before it ran".
Versions: langchain 1.5.0, langgraph 1.2.22, Python 3.12.
