[langgraph]: Document @task checkpointing limitation when using LangGraph API server
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start with the Durable Execution and Persistence pages linked in the issue, then review langgraph/func/init.py and langgraph/pregel/_runner.py for the stated checkpointing behavior. Add a warning describing the API server limitation, affected node- and task-level behavior, and workarounds, and clarify automatic persistence on the Persistence page.
Written by the indexing model from the issue text.
Description
Type of issue
issue / bug
Language
Python
Description
Documentation URL
- https://langchain-ai.github.io/langgraph/concepts/durable_execution/
- https://langchain-ai.github.io/langgraph/concepts/persistence/
What is missing or incorrect?
The documentation does not mention that @task checkpointing does not work when deploying via LangGraph API server (or langgraph dev). This is a critical limitation that causes silent failures in durable execution.
Current documentation states:
Durable Execution page:
"You can use tasks from both the StateGraph (Graph API) and the Functional API."
"If a node contains multiple operations, you may find it easier to convert each operation into a task rather than refactor the operations into individual nodes."
Persistence page:
"When using the LangGraph API, you don't need to implement or configure checkpointers manually - persistence is handled automatically by the platform."
What actually happens:
When using @task inside a StateGraph node with API server deployment:
- API server rejects compile-time checkpointers with error: "Your graph includes a custom checkpointer... please remove the custom checkpointer"
- API server injects checkpointer at runtime
- Node-level state checkpointing works correctly
- Task-level result caching does not work - tasks re-execute on resume
This breaks durable execution for the exact use case the docs recommend.
Example of broken behavior:
from langgraph.func import task
from langgraph.types import interrupt
import random
@task
def fetch_live_stats():
"""Non-deterministic - should be cached on resume"""
return {"player": random.choice(["Messi", "Ronaldo"]), "score": random.randint(1, 5)}
def recommendation_node(state):
stats = fetch_live_stats().result() # Executes at T1
recommended = stats["player"]
user_choice = interrupt(f"Recommend: {recommended}. Confirm?") # Pause here
# ON RESUME: fetch_live_stats() executes AGAIN at T2
# May return different player, breaking consistency
return {"recommendation": recommended, "confirmed": user_choice}
Root cause:
Task checkpointing requires Pregel.checkpointer to be set at compile time. The schedule_task function in langgraph/pregel/_runner.py loads cached task results from Pregel.checkpointer. When compiled without a checkpointer (as required by API server), this is None, so task results cannot be loaded on resume.
Suggested documentation update
Add a callout/warning to the Durable Execution page:
⚠️ Important: When deploying via LangGraph API server or
langgraph dev,@taskcheckpointing inside StateGraph nodes is not supported. The API server injects checkpointers at runtime, but task-level caching requires a compile-time checkpointer.Workarounds:
- Use separate nodes instead of
@taskfor non-deterministic operations- Use the pure Functional API (
@entrypoint+@task) where@entrypointaccepts a compile-time checkpointer- Ensure code before
interrupt()is idempotentNode-level state checkpointing works correctly with API server - only task-level granularity is affected.
Also update the Persistence page to clarify:
"Automatic persistence handles node-level state checkpointing. For task-level durable execution, see [limitations with @task]."
Related issues
- Bug report: #6559 - @task checkpointing does not work with API server runtime-injected checkpointer
- Related: #5790 - langgraph dev ignores checkpointer configuration
Additional context
- This limitation was discovered through source code analysis of
langgraph/func/__init__.pyandlanggraph/pregel/_runner.py - Affects users building HITL workflows with non-deterministic operations before interrupt points
- The bug report (#6559) contains detailed technical root cause analysis
- Dominant language
- MDX
- Stars
- 418
- Forks
- 2.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 351
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from langchain-ai/docs
-
external langgraph
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langchain-ai/docs#6121 ·
-
external
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
langchain-ai/docs#6113 · 1 comment ·
-
external
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
langchain-ai/docs#6101 ·
-
external integration integration-submission
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
langchain-ai/docs#6096 ·
-
[langchain]: Update the AgentCore Runtime section on the AWS provider page for the new AgentCore CLI Openexternal
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
langchain-ai/docs#6091 ·
All issues in langchain-ai/docs
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100