PlugWiki

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. 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. 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

  1. Requirements
  2. Basic Interrupt + Resume
  3. Approval Workflow
  4. Validation Loop
  5. Multiple Interrupts
  6. Side Effects Before Interrupt Must Be Idempotent
  7. Subgraph re-execution on resume
  8. Command(resume) Warning
  9. Fixes
  10. What You Should NOT Do

Key facts

Installs on skills.sh
17,596 (Nov 2, 2026)
Last commit
2026-10-29

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.

    Requirements

  • interrupt(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 resume

  • Show a draft, then route on the human's decision

    The pattern for approve or reject steps before an agent acts.

    Approval workflow

  • Re-ask until the human input passes a check

    The example asks for an age and asks again when the answer is not valid.

    Validation loop

  • Parallel 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 interrupts

  • Anything 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 effects

  • Only 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) warning

  • Wrong 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

Folder
config/skills/langgraph-human-in-the-loop

langchain-ai/langchain-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 4
  1. langgraph-human-in-the-loop SKILL.md · github.com
  2. langchain-skills README · github.com
  3. skills.sh listing · skills.sh
  4. langchain-ai/langchain-skills · github.com

Updated Nov 2, 2026.