> ## Documentation Index
> Fetch the complete documentation index at: https://cndoc-langchain.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MULTIPLE_SUBGRAPHS

当您[在节点内多次调用子图](/oss/python/langgraph/use-subgraphs#call-a-subgraph-inside-a-node)，且该子图使用 `checkpointer=True`（延续模式）编译时，会发生此错误。

## 故障排除

根据您的需求选择以下方案之一：

1. **不需要中断？** 使用 `checkpointer=False` 完全禁用检查点：
   ```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
   subgraph = subgraph_builder.compile(checkpointer=False)
   ```

2. **需要中断但不需要跨调用持久化？** 通过省略 `checkpointer` 使用默认继承模式：
   ```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
   subgraph = subgraph_builder.compile()
   ```
   每次调用都会获得唯一的命名空间，因此可以并行执行。子图每次都会重新开始，但可以使用 `interrupt()`。

3. **需要跨调用持久化？** 使用 `checkpointer=True`。LangGraph 会为每次调用分配基于位置的命名空间后缀（`calling_node`、`calling_node|1` 等）以防止冲突。若要获得稳定的基于名称的命名空间，请为每个子图包装唯一的节点名称——参见[并行子图](/oss/python/langgraph/use-subgraphs#subgraph-persistence)。

## 相关内容

* [子图持久化](/oss/python/langgraph/use-subgraphs#subgraph-persistence) — 检查点模式的完整比较
* [持久化](/oss/python/langgraph/persistence) — LangGraph 中检查点的工作原理

***

<div className="source-links">
  <Callout icon="terminal-2">
    [连接这些文档](/use-these-docs) 到 Claude、VSCode 等工具，通过 MCP 获取实时答案。
  </Callout>

  <Callout icon="edit">
    [在 GitHub 上编辑此页面](https://github.com/langchain-ai/docs/edit/main/src/oss/langgraph/errors/MULTIPLE_SUBGRAPHS.mdx) 或 [提交问题](https://github.com/langchain-ai/docs/issues/new/choose)。
  </Callout>
</div>
