langgraph-error-handling

langgraph-error-handling is a skill for Claude Code from soba-labs/langchain-agent-skills. It costs 69 tokens per session (1,410 once invoked), scanned A, original, MIT.

A guide for handling failures in LangGraph, a framework for building workflows where language models and tools work together. It covers retries, model-led recovery, human approval, and debugging unexpected errors.

In plain words
What is it for?
Use it to add retry rules for timeouts and service errors, route failed steps back through a model, pause for human input, and handle tool failures.
Why use it?
It helps separate temporary problems, fixable input errors, user decisions, and programming bugs. This makes it clearer whether to retry, ask for help, or stop and debug.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the langgraph-skills plugin — 5 skills shipped together

Good fit Use it to add retry rules for timeouts and service errors, route failed steps back through a model, pause for human input, and handle tool failures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/soba-labs/langchain-agent-skills/langgraph-error-handling
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add soba-labs/langchain-agent-skills --skill langgraph-error-handling
Clone the repo
git clone --depth 1 https://github.com/soba-labs/langchain-agent-skills

Made for: Claude Code.

Or install langgraph-skills, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for langgraph-error-handling

README.md
[![agentmods](https://agentmods.dev/badge/skills/soba-labs/langchain-agent-skills/langgraph-error-handling/github.svg)](https://agentmods.dev/skills/soba-labs/langchain-agent-skills/langgraph-error-handling)
Your own site
<a href="https://agentmods.dev/skills/soba-labs/langchain-agent-skills/langgraph-error-handling"><img src="https://agentmods.dev/badge/skills/soba-labs/langchain-agent-skills/langgraph-error-handling/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for langgraph-error-handling

Your own site · 80×15
<a href="https://agentmods.dev/skills/soba-labs/langchain-agent-skills/langgraph-error-handling"><img src="https://agentmods.dev/badge/skills/soba-labs/langchain-agent-skills/langgraph-error-handling.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.01410
Opus 5 $0.00034 $0.00705
Sonnet 5 $0.00014 $0.00282
Haiku 4.5 $0.00007 $0.00141

Measured 11d ago against content hash 1e4cba605bf6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

langgraph-error-handling scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

The scan reads SKILL.md. This mod also ships 6 executable files (assets/examples/human-loop-example/js/index.js, assets/examples/human-loop-example/python/graph.py, assets/examples/retry-example/js/index.js, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/langgraph-error-handling/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LangGraph Error Handling

Use This Skill For

  • Adding RetryPolicy to flaky nodes (API, DB, model/tool calls)
  • Designing LLM recovery loops (Command + error state + retry counters)
  • Adding human approval/escalation with interrupt() and resume
  • Handling prebuilt ToolNode failures
  • Debugging transactional failure behavior in parallel supersteps

Strategy Selection

Use this order:

  1. Transient/infrastructure issue (429, timeout, 5xx, temporary DB lock) -> RetryPolicy
  2. Recoverable by model/tool args correction -> store error in state and route back with Command
  3. Needs user approval or missing info -> interrupt() + resume
  4. Unknown/programming bug -> let it bubble up and debug
Error Type Owner Primary Mechanism
Transient System RetryPolicy
LLM-recoverable LLM State update + Command(goto=...)
User-fixable Human interrupt() + Command(resume=...)
Unexpected Developer Raise/log/debug

For full taxonomy, load references/error-types.md.

Minimal Patterns

1) Retry Transient Failures

from langgraph.types import RetryPolicy

builder.add_node(
    "call_api",
    call_api,
    retry_policy=RetryPolicy(max_attempts=3, initial_interval=1.0),
)
builder.addNode("callApi", callApi, {
  retryPolicy: { maxAttempts: 3, initialInterval: 1.0 },
});

Notes:

  • Python and JS default retry behavior differs by exception type.
  • Prefer targeted retry_on/retryOn for non-transient domains.

2) LLM Recovery Loop

Use MessagesState in Python for message state.

from typing import Literal
from typing_extensions import NotRequired
from langgraph.graph import MessagesState
from langgraph.types import Command

class State(MessagesState):
    error: NotRequired[str]
    retry_count: NotRequired[int]

def agent(state: State) -> Command[Literal["tool", "__end__"]]:
    if state.get("retry_count", 0) >= 3:
        return Command(goto="__end__")
    if state.get("error"):
        return Command(goto="tool")
    return Command(goto="tool")

Read the full file on GitHub · 172 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 172 lines · 69 tokens per session scan A 1e4cba605bf6

Subscribe to this mod's changes

langgraph-error-handling is a skill published in the GitHub repository soba-labs/langchain-agent-skills (106 stars, last pushed 24d ago), licensed MIT. It adds 69 tokens to every session and 1,410 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

diagnose

Trace from a reproduced symptom to the source code that causes it. Pin the specific file and approximate line, rate confidence in the cause and clarity of the fix independently, and always propose a concrete fix.

emdash-cms/emdash · 43 tokens

repro-admin

Reproduce an EmDash admin UI bug. Attach a container, start the demo dev server, drive the admin with agent-browser using the dev-bypass session, and capture the reproduction as screenshots plus a replayable transcript.

emdash-cms/emdash · 48 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

byted-util-volcengine-detect-retry

An orchestration workflow for Volcengine Cloud Detect, a service that checks websites or network endpoints from test locations.

bytedance/agentkit-samples · 101 tokens