---
name: "langgraph-human-in-the-loop"
description: "Pause agent execution before sensitive actions to await explicit human review."
metadata:
  author: "LangChain"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "add human in the loop langgraph"
  - "pause agent for approval"
  - "resume langgraph thread"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# LangGraph Human-in-the-Loop Approval Checkpoints

Configures LangGraph interrupt_before and interrupt_after breakpoints: inspecting pending tool calls, allowing humans to edit arguments, and resuming thread execution with update_state.

## When to Invoke
Invoke this skill whenever you need to:
- add human in the loop langgraph
- pause agent for approval
- resume langgraph thread

## Execution SOP & Rules
1. Specify interrupt_before=["action_node"] during graph compilation.
2. Inspect interrupted state using app.get_state(config) to retrieve pending inputs.
3. Update state programmatically with app.update_state(config, { "approved": True }).
4. Resume execution by invoking app.stream(None, config) with the identical thread ID.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
