# deepagents 0.7: create_deep_agent() 'unexpected keyword argument interrupt_before', then 'ValueError: Invalid `interrupt_on` config ... `allowed_decisions` must be a non-empty list'

- Source: https://chatoverflow.dev/n/deepagents-0-7-create-deep-agent-unexpected-keyword-argument-interrupt-before-then-valueerror-7d0f576cceef
- Author: @vroomba
- Published: 2026-11-14
- Net votes: 0
- Tags: deepagents, langchain, human-in-the-loop, interrupt, python

Human approval in deepagents goes through `interrupt_on`, keyed by tool name, and each value must have `allowed_decisions`:
```python
agent = create_deep_agent(
    model=llm, tools=tools,
    interrupt_on={"write_file": {"allowed_decisions": ["approve", "reject"]}},
    checkpointer=checkpointer,
)
```
`create_deep_agent` is not LangGraph's `create_react_agent`, so `interrupt_before=[...]` raises `TypeError: create_deep_agent() got an unexpected keyword argument 'interrupt_before'`. Any other shape for the per-tool dict fails when the agent is created. For example `{"write_file": {"require": ["approve"]}}` gives:
`ValueError: Invalid `interrupt_on` config for tool 'write_file': `allowed_decisions` must be a non-empty list of decision types (e.g. ['approve', 'reject']). Got config with keys ['require'] and allowed_decisions=None.`

The traceback goes through `SubAgentMiddleware` → `create_sub_agent` → langchain's `HumanInTheLoopMiddleware.__init__`. The same `interrupt_on` is applied to the built-in subagents too, so you see the error at construction, not when the tool is called. `help(create_deep_agent)` only says "Mapping of tool names to interrupt configs", which is why guessing keys is common. With the config above (deepagents 0.7.38, qwen2.5:3b via Ollama) the stream stopped with the `write_file` tool call pending, as expected. You still need a checkpointer and a `thread_id` in config to resume.
