Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To debug a LangGraph run, give it a persistent checkpoint and a stable thread_id, inspect its latest state and history, then stream node events to find the first transition that differs from what you expected. Once you have isolated the checkpoint, you can replay later work or create a separate state branch—but replay runs those later nodes again, including model calls and external side effects.

Make the run inspectable first

State inspection relies on a checkpointer and thread identity. Compile the graph with a checkpointer, then pass the same thread_id in the configurable run settings when invoking it and inspecting it. The ID lets the checkpointer retrieve the checkpoints for that conversation or workflow. See the LangGraph persistence documentation for current details.

from langgraph.checkpoint.memory import InMemorySaver

checkpointer = InMemorySaver()
graph = builder.compile(checkpointer=checkpointer)
config = {"configurable": {"thread_id": "debug-run-123"}}
result = graph.invoke(inputs, config)

InMemorySaver is useful for a local experiment, but its data does not survive process loss. For a deployed graph, choose an appropriate persistence backend; Agent Server deployments manage the persistence infrastructure. If you invoke with one thread ID and inspect with another, you will not be looking at the same run.

Inspect the current snapshot

Call get_state with the run configuration to retrieve a StateSnapshot. Its fields answer different questions: what values are currently stored, what is scheduled next, and what execution details were recorded.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
snapshot = graph.get_state(config)
print(snapshot.values)    # channel values at this checkpoint
print(snapshot.next)      # node(s) scheduled next; empty means complete
print(snapshot.metadata)  # source, writes, and step metadata
print(snapshot.tasks)     # task details, including errors or interrupts where present

An empty snapshot.next indicates that no node is scheduled to execute next at this checkpoint. To inspect a particular point rather than the latest one, include that checkpoint’s ID in the configurable run settings. A current snapshot is a useful symptom, but it cannot by itself show every transition that led to the result.

Walk backward to find the first bad transition

get_state_history returns snapshots in reverse chronological order, with the latest first. Compare neighboring snapshots and look for the earliest one where an expected field disappears, changes unexpectedly, or takes on a malformed value.

history = list(graph.get_state_history(config))
for snapshot in history:
    print(snapshot.created_at, snapshot.metadata, snapshot.next, snapshot.values)

Check metadata.writes to associate a channel update with the node that produced it, and next to see which node or nodes were scheduled afterward. Snapshots also include checkpoint and parent-checkpoint IDs, which help identify a starting point for replay. The persistence guide documents the snapshot and history APIs at LangGraph persistence.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Watch a live run at the right level of detail

Streaming is useful when the failure is hard to diagnose after the fact or when you want to see exactly where execution diverges. Choose a stream mode based on the evidence you need. The example below requests node updates and task events:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
for chunk in graph.stream(
    inputs,
    config=config,
    stream_mode=["updates", "tasks"],
    version="v2",
):
    print(chunk)
Mode What it helps you see Requirement or use
updates State updates emitted by each node. Use to locate the node that changed a value.
tasks Node task starts and finishes, results, and errors. Requires a checkpointer; useful for locating a failing task.
checkpoints Saved checkpoint events. Requires a checkpointer; use to see when state was saved.
debug Node names, full state, and additional runtime metadata. Use when you need a broad view of execution; combines checkpoint and task events.
messages Streamed language-model tokens and node metadata. Use when the unexpected behavior appears in model output.

To include output and namespaces from nested graphs, pass subgraphs=True. The official streaming documentation recommends event streaming for new applications while retaining stream modes for direct runtime event access and selected event output. Check the current documentation when adopting a newer API version.

Check whether reducers explain the state change

If a field looks overwritten, missing, or duplicated, inspect the state schema and its reducer before assuming the model caused the problem. A channel without a reducer replaces its prior value when it receives an update. A reducer defines how the old and new values are combined, so the same update can append, merge, or transform data depending on the channel.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

For message state, add_messages appends new messages and updates an existing message when the incoming message has the same ID. If a message appears to have been replaced rather than added, check its ID and whether the channel uses that reducer. See the LangGraph Graph API documentation for state and reducer details.

Replay from a checkpoint or branch with an update

Replaying from a historical checkpoint skips earlier work and executes later nodes again. That can isolate a fault while keeping prior results fixed, but it is execution—not simply viewing a saved run. Any later LLM calls, API requests, or other side effects may happen again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For an experiment with altered state, use update_state. It creates a new checkpoint rather than editing the old one, so you can explore a branch while preserving the original checkpoint history. Before replaying production work, identify which downstream nodes have side effects and verify that rerunning them is safe. The persistence guide covers checkpoint access, replay, and state updates.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Choose node boundaries that make failures visible

If one node performs several operations, it can be difficult to tell which one caused a bad state or error. Split operations when doing so improves visibility, isolates an external service, or lets you apply a different retry strategy. For example, separate retrieval from drafting so you can distinguish poor search results from a generation problem.

Smaller nodes can provide more visible checkpoint boundaries and limit repeated work when restarting. Splitting everything into tiny nodes is not required; use boundaries that make diagnosis or recovery meaningfully clearer. LangChain’s agent-design guidance discusses shaping workflows around these considerations.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Match the recovery to the failure

  • Transient network or rate-limit failure: apply a retry policy to the node that calls the external service.
  • Recoverable tool or parse failure: record the error in graph state and route to a node that can adjust or repair the action.
  • Missing user information: use an interrupt to pause for input when the workflow is designed for human resolution.
  • Unexpected exception: allow it to surface while debugging rather than swallowing an error when its recovery behavior is unknown.
  • Retry exhaustion: route to a recovery or compensation path if the application needs one.

For resume inconsistencies, first verify that the same thread ID is being used, then inspect the last completed checkpoint. If a node is interrupted mid-execution, it restarts from the beginning of that node. Successful task writes from other nodes in the same super-step can be reused when execution resumes. These behaviors are described in the LangGraph persistence documentation and fault-tolerance guidance.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Understand why an intermediate checkpoint may be missing

LangGraph offers three durability modes, which determine when checkpoint writes are persisted relative to graph execution:

Mode Persistence behavior Trade-off
exit Persists when execution exits. Does not preserve intermediate state for recovery from a mid-run process crash.
async Persists while the next step executes. A process crash can occur before a checkpoint write completes.
sync Writes a checkpoint before the next step begins. Trades some performance for higher durability.

If a snapshot you expected is absent, consider both the configured durability mode and when a process failure occurred. The persistence guide describes these modes and their behavior: LangGraph persistence.

Use LangSmith Studio for a visual run timeline

LangSmith Studio is an optional visual route for debugging graphs available through the Agent Server protocol. In Graph mode, it can show traversed nodes, intermediate states, and time-travel debugging. Chat mode is a simpler chat-testing interface and is supported when the graph state includes or extends MessagesState. Use Studio when a visual timeline helps reveal the fault; direct APIs are better suited to local execution flows and automated diagnostics. See the LangSmith Studio documentation for current requirements.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.