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.
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-handlingRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install langgraph-error-handling in Claude Code
git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills /tmp/langchain-agent-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/langchain-agent-skills/skills/langgraph-error-handling ~/.gemini/antigravity-cli/skills/langgraph-error-handlingAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install langgraph-error-handling in Antigravity CLI
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
ANo 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 →Aligns a Qwen Code feature with a Codex or Claude Code reference agent. It runs both under the same scenario, captures HTTP and terminal traces, and compares them until behavior matches.
Searches, views, creates, updates, and deletes the user's Google Contacts from an AI assistant. It is for people who want to manage their address book through conversation. A one-time Google connect is required before it returns data.
Guides an AI assistant on error handling choices. It covers when to use Result, Option, ? propagation, unwrap, expect and panic, plus anyhow and thiserror.
Caveman is an agent skill that makes an AI assistant reply in a terse style. It cuts filler and keeps technical facts, code, commands and errors exact. It is built for users who want shorter, cheaper replies.
docs-sync audits or updates English SDK documentation against the requested implementation scope. It is for maintainers who want docs to match main branch features, configuration options, and defaults.
Guides an AI assistant through setting up and running monorepos with pnpm workspaces, Turborepo and Nx. Aimed at developers who need faster builds, shared code and managed dependencies across multiple packages.
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.
