# How do I test a LangGraph agent that pauses for human approval?

Resume the paused graph with `Command(resume=...)` on the same `thread_id` the run paused under, and hand it the approve, edit, reject, or respond value your test wants instead of waiting for a person to click anything. LangGraph's human-in-the-loop pattern treats that value the same way it treats any other resumed state: the graph picks up exactly where `interrupt()` left it, with your supplied decision standing in for whatever a person would have given it.

That turns every branch of an approval flow into something a test can drive directly: script an approve to check the happy path, a reject with a message to check how the agent handles pushback, or an edit to check whether it actually uses the changed value instead of the one it first proposed. It's [the same problem a CI gate has to solve for any check that would otherwise need a person watching](/answers/deploy-gates/what-is-a-deploy-gate-for-an-ai-agent), aimed at the one node built to wait for one.

---

Sources:
- LangChain docs: Human-in-the-loop: https://docs.langchain.com/oss/python/langchain/human-in-the-loop (fetched 2026-09-25)

Source: https://tessary.ai/answers/langgraph-evals/how-do-i-test-a-langgraph-human-in-the-loop-pause
More on Langgraph evals: https://tessary.ai/answers/langgraph-evals
From Tessary, agent reliability for AI agents in production: https://tessary.ai
