Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

langgraph-error-handling

Skill by soba-labs

Implements LangGraph error handling with current v1 patterns. It covers retry policies, LLM recovery loops, human-in-the-loop interrupts and ToolNode errors, for developers building LangGraph agents.

  • Score 78
  • 106 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install langgraph-error-handling

Built from the published package, never by AI.

git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills /tmp/langchain-agent-skills && mkdir -p ~/.claude/skills && cp -r /tmp/langchain-agent-skills/skills/langgraph-error-handling ~/.claude/skills/langgraph-error-handling

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install langgraph-error-handling in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

LangGraph Error Handling is a skill that guides an assistant through adding error handling to LangGraph applications using current v1 patterns. It helps classify failures as transient, LLM-recoverable, user-fixable or unexpected, and maps each type to a mechanism: RetryPolicy, state updates with Command routing, or interrupt() with resume. It also covers prebuilt ToolNode failures and failures in parallel supersteps.

The skill includes Python and JavaScript code patterns, a classify_error.py script, a wrap_with_retry.py generator, and retry and human-approval example projects. It is aimed at developers who build LangGraph graphs and need to choose between retry, recovery and escalation. Reference files cover error types, retry strategies, LLM recovery and human escalation.

Written from the project's SKILL.md and checked against it.

What it can do

  • Classify failuresSorts errors into transient, LLM-recoverable, user-fixable or unexpected, with a recommended handling path.
  • Retry transient failuresAdds RetryPolicy to flaky nodes such as API, database or model calls, with explicit retry limits.
  • LLM recovery loopStores errors in state and routes back with Command, using retry counters to stop loops.
  • Human-in-the-loopAdds approval or escalation with interrupt() and Command(resume=...) using a checkpointer.
  • ToolNode error handlingShows handle_tool_errors options for prebuilt ToolNode failures in Python.
  • Strategy selectionHelps choose between retry, recovery and escalation for each kind of error.
  • Node wrapper generationThe wrap_with_retry.py script generates boilerplate node wrappers with retry, recovery or escalation options.
  • Error classification scriptThe classify_error.py script reports the exception category and recommended handling.
  • Retry and recovery exampleIncludes a retry and recovery loop example in Python and JavaScript.
  • Human approval exampleIncludes an interrupt and resume approval flow example in Python and JavaScript.

What you need

  • LangGraph (Python or JavaScript)
  • A checkpointer for interrupt flows
  • uv to run the Python scripts

Try asking

  • Add a RetryPolicy to my call_api node with 3 attempts
  • Build an LLM recovery loop that routes tool errors back to the agent
  • Add a human approval step using interrupt() and resume in my graph

Good to know

  • Interrupt flows require a checkpointer and the same thread_id on resume.
  • Python and JavaScript default retry behavior differs by exception type.
  • The node re-runs on resume, so side effects before interrupt() must be idempotent.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/langgraph-error-handling/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md6 KB
  • assets/examples/human-loop-example/js/index.js3 KB
  • assets/examples/human-loop-example/js/package.json239 B
  • assets/examples/human-loop-example/python/graph.py3 KB
  • assets/examples/human-loop-example/python/requirements.txt39 B
Show all 15 files
  • assets/examples/retry-example/js/index.js3 KB
  • assets/examples/retry-example/js/package.json234 B
  • assets/examples/retry-example/python/graph.py3 KB
  • assets/examples/retry-example/python/requirements.txt39 B
  • references/error-types.md12 KB
  • references/human-escalation.md21 KB
  • references/llm-recovery.md14 KB
  • references/retry-strategies.md17 KB
  • scripts/classify_error.py7 KB
  • scripts/wrap_with_retry.py12 KB

Alternatives to langgraph-error-handling

All alternatives →

Compare with agent-reproduce-align, google_contacts or m06-error-handling

langgraph-error-handling: common questions

When should I use RetryPolicy instead of a recovery loop?

Use RetryPolicy for transient issues such as 429 errors, timeouts, 5xx errors or temporary database locks. Use a recovery loop when the model or tool can fix the problem by correcting its arguments.

Why does my interrupt() fail or start a new run on resume?

interrupt() fails at runtime if the graph is not compiled with a checkpointer. Resume starts a new run when the thread_id differs, so reuse the same thread_id.

Why is my JavaScript Command route not taken?

JavaScript Command routing requires ends metadata on addNode(...). Add the target nodes, such as tool and END, to ends.

How do I install langgraph-error-handling?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is langgraph-error-handling free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is langgraph-error-handling safe to use?

It scores 78 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to langgraph-error-handling?

Similar skills: agent-reproduce-align, google_contacts, m06-error-handling, caveman.

langgraph-error-handling Install

Add to stack

Loading.