LangGraph Human-in-the-Loop Skill for Claude Code
Teaches Claude the right way to pause a LangGraph agent for human approval and resume it, in Python and TypeScript.
- Installs
- 17.6K
- on skills.sh
- Stars
- 1.3K
- on GitHub
- Updated
- Oct 2026
- last repo commit
This is a reference skill with no scripts. It gives the assistant the LangGraph patterns for pausing a run with interrupt(), showing a value to the user, and continuing with Command(resume=...). It covers a basic pause, an approval workflow, a validation loop, several interrupts at once, and side effects that must be safe to repeat. Each pattern has Python and TypeScript code.
Its description tells the agent to load it when you are implementing human-in-the-loop, pausing for approval, or handling errors in LangGraph. The most useful warning: when a graph resumes, the node restarts from its beginning, so code before interrupt() runs again. It also says a checkpointer and a thread ID are required.
Good for
- Developers adding approval steps or input checks to a LangGraph agent
- Teams whose paused graphs create duplicate records or seem stuck after resume
- Python or TypeScript users of LangGraph with a coding assistant
Install langgraph-human-in-the-loop
Claude Code
- 1
Copy this prompt.
Install the langgraph-human-in-the-loop skill in Claude Code. Run this command: npx skills add https://github.com/langchain-ai/langchain-skills --skill langgraph-human-in-the-loop Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
From its listing on skills.sh. Source.
What's in the skill
When it loads
INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval/validation workflows, and the 4-tier error handling strategy.
Sections in SKILL.md
- Requirements
- Basic Interrupt + Resume
- Approval Workflow
- Validation Loop
- Multiple Interrupts
- Side Effects Before Interrupt Must Be Idempotent
- Subgraph re-execution on resume
- Command(resume) Warning
- Fixes
- What You Should NOT Do
Key facts
- Author
- langchain-ai
- License
- MIT (as listed by the crawl)
- Installs on skills.sh
- 17,596 (Nov 2, 2026)
- GitHub stars
- 1,320 (repo, Nov 2, 2026)
- Last commit
- 2026-10-29
- Files
- 1 file: SKILL.md
What it includes
A checkpointer, a thread ID and a JSON-serializable payload are all required
InMemorySaver for development, PostgresSaver for production. Every invoke or stream call needs the same thread_id.
Requirementsinterrupt(value) pauses; Command(resume=value) continues with that value
The paused value appears under __interrupt__ in the result. The resume value becomes the return value of interrupt().
Basic interrupt and resumeShow a draft, then route on the human's decision
The pattern for approve or reject steps before an agent acts.
Approval workflowRe-ask until the human input passes a check
The example asks for an age and asks again when the answer is not valid.
Validation loopParallel nodes can pause at once; resume them together with a map of id to value
Each pending interrupt has an ID, and you answer all of them in one resume.
Multiple interruptsAnything before interrupt() runs again on resume, so use upserts or move it after
Inserts and list appends before an interrupt create duplicates every time the graph resumes. Subgraphs re-run both the parent node and the subgraph node.
Idempotent side effectsOnly Command(resume=...) should be passed as invoke input, never Command(update=...)
Passing update as input resumes from the last checkpoint and the graph looks stuck.
Command(resume) warningWrong and correct code for a missing checkpointer, a changed thread ID and resume syntax
Short before-and-after snippets in Python and TypeScript.
Fixes
From the official docs
Questions
What does the LangGraph human-in-the-loop skill do?
It gives the assistant correct, working patterns for pausing a LangGraph run and resuming it with human input. It covers approvals, input validation, parallel interrupts and the traps that cause duplicate records or a stuck graph.
How do I install it?
Use the install box above for this one skill. The README also shows installing every skill in the repo with npx skills add langchain-ai/langchain-skills --skill '*' --yes, and a Claude Code plugin route.
Does it work in Claude Code, Cursor and Codex?
The README says the skills install through the skills CLI for any agent that supports the Agent Skills spec, and names Claude Code, Cursor and Windsurf. It gives install commands for Claude Code, Codex and GitHub Copilot.
Do I need an API key?
No key is mentioned in SKILL.md. The skill is plain instructions and code samples with no bundled files. Your own LangGraph project will need whatever model keys it uses.
Why does my code before interrupt() run twice?
When the graph resumes, the node restarts from its beginning, so everything before interrupt() runs again. Use upserts or check-before-create, or put the side effect after the interrupt or in its own node.
Why does my graph look stuck after I resume?
SKILL.md lists passing Command(update=...) as invoke input as a cause. Resume with Command(resume=...) and the same thread_id instead.
Does it cover error handling?
Only one tier of it. Errors the user can fix are handled by pausing with interrupt(). For the full four-tier strategy the skill points to the fundamentals skill, which the README lists as langgraph-fundamentals.
Is it safe?
It is a single instruction file with code examples and bundles no scripts. Our advice: review the code it makes the assistant write, especially anything that acts after an approval.
Information
updated Nov 2, 2026
- Repository
- langchain-ai/langchain-skills
- Folder
config/skills/langgraph-human-in-the-loop
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- langgraph-human-in-the-loop SKILL.md · github.com
- langchain-skills README · github.com
- skills.sh listing · skills.sh
- langchain-ai/langchain-skills · github.com