langchain-ai/langgraph · error · InvalidUpdateError

Cannot copy a non-existent checkpoint

Error message

Cannot copy a non-existent checkpoint

What it means

Raised during checkpoint copy (as_node == '__copy__') when no saved checkpoint exists to copy from. The operation requires a prior checkpoint (via checkpointer or config), and none was found. Ensure a checkpointer with an existing checkpoint is available before copying.

Solutions

  1. Ensure the thread has a prior checkpoint (invoke the graph at least once) before copying
  2. Verify the thread_id/config points at an existing checkpoint
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at libs/langgraph/langgraph/pregel/main.py:1807 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26). Data as JSON: /api/errors/e245076acea3e81d. Report an issue: GitHub.

Appendix: source

Thrown at libs/langgraph/langgraph/pregel/main.py:1807

                    )

                    return patch_checkpoint_map(
                        next_config, saved.metadata if saved else None
                    )
                else:
                    raise InvalidUpdateError(
                        f"Received no input writes for {self.input_channels}"
                    )

            # copy checkpoint
            if as_node == "__copy__":
                if len(updates) > 1:
                    raise InvalidUpdateError(
                        "Cannot copy checkpoint with multiple updates"
                    )

                if saved is None:
                    raise InvalidUpdateError("Cannot copy a non-existent checkpoint")

                next_checkpoint = create_checkpoint(checkpoint, None, step)

                # copy checkpoint
                next_config = checkpointer.put(
                    saved.parent_config
                    or patch_configurable(
                        saved.config, {CONFIG_KEY_CHECKPOINT_ID: None}
                    ),
                    next_checkpoint,
                    {
                        "source": "fork",
                        "step": step + 1,
                        "parents": saved.metadata.get("parents", {}),
                    },
                    {},
                )

View on GitHub (pinned to 38031739e5)