1. Habit
  2. Skills
  3. LangGraph Human in the Loop skill
langchain-ai · 17K installs

LangGraph Human in the Loop skill
Runs by itself, PR touches graph code.

Paused graphs resume without duplicates.

Install the LangGraph Human in the Loop skill and make it a habit: follow https://gethabit.dev/skills/langchain-ai/langgraph-human-in-the-loop.md

  1. 1Copy
  2. 2Paste into Claude Code, Codex or Cursor
  3. 3It runs by itself

17K installs1K starsMIT licenceSource on GitHub ↗

LangGraph Human in the Loop

by langchain-ai · 17K installs

The skill

The langgraph human in the loop skill shows developers how to pause a LangGraph graph with interrupt(), resume it with Command(resume=...), build approval and validation flows, and keep side effects safe on resume.

Only when you ask.

The habit

Paused graphs resume without duplicates.

↻ Runs by itselfPR touches graph code

How the habit works.
You don't have to.

Three questionsWhen does it start? How does it check its work? What does it remember?

One run, step by step.
Then it stops.

Stop ruleStops after one pull request and at most 10 graph files per run.

  1. 01

    Find interrupts

    The agent lists every node that calls interrupt().

  2. 02

    Check checkpointer

    Each such graph must compile with InMemorySaver or PostgresSaver.

  3. 03

    Check resume

    Resume must use Command(resume=...) with the same thread_id.

  4. 04

    Check payloads

    Values passed to interrupt() must be JSON-serializable.

  5. 05

    Check side effects

    Code before interrupt() must use upsert or check-before-create, or move after it.

  6. 06

    Run tests

    It runs the tests and logs any node that fails a check.

What it may do.
Nothing more.

Safe by defaultIt writes only in its own folder and asks you before anything goes out.

Is it for you?
Use it when it fits.

Quick checkRead both lists. If the left one sounds like you, the LangGraph Human in the Loop skill helps.

Use it when

  • ✓ Adding an approval step to a graph
  • ✓ Validating human input in a loop
  • ✓ Resuming parallel interrupts

Skip it when

  • – Graphs with no human step
  • – Projects without LangGraph

Questions

LangGraph Human in the Loop skill, answered.

Why does code before interrupt() matter?

On resume the node restarts from its beginning, so everything before interrupt() runs again.

What about subgraphs?

Both the parent node and the subgraph node run again on resume, so both need idempotent side effects.

Does this loop pause for a human?

No. It checks your code that pauses for humans; the loop itself runs unattended.

How do I install the LangGraph Human in the Loop skill?

Copy the prompt at the top into your agent. It installs the skill from langchain-ai/langchain-skills and sets up the habit. Or run npx skills add langchain-ai/langchain-skills --skill langgraph-human-in-the-loop.

Is the LangGraph Human in the Loop skill free?

Yes. It is published under MIT. Habit is free too.

LangGraph Human in the Loop. Now as a habit.

Install the LangGraph Human in the Loop skill and make it a habit: follow https://gethabit.dev/skills/langchain-ai/langgraph-human-in-the-loop.md

  • Free
  • No account
  • Undo in one line

All langchain-ai skills →More code skills →

Works in

  • Claude Code
  • Codex
  • Cursor
  • ChatGPT
  • Claude app

Made by langchain-ai, published under MIT. Habit links to the original and never changes it. Is this your skill?

Copying didn't work here. Select the line and copy it by hand.