# Initialize runtime.context when using langgraph CLI

**URL:** <https://forum.langchain.com/t/initialize-runtime-context-when-using-langgraph-cli/1355>\
**Category:** LangSmith Product Help\
**Created:** [August 27, 2025, 9:59am UTC](https://forum.langchain.com/t/initialize-runtime-context-when-using-langgraph-cli/1355 "2025-08-27T09:59:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric-burel](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.langchain.com/eric-burel/32/712_2.png) [@eric-burel](https://forum.langchain.com/u/eric-burel)\
**Post date:** [August 27, 2025, 9:59am UTC](https://forum.langchain.com/t/initialize-runtime-context-when-using-langgraph-cli/1355/1 "2025-08-27T09:59:58Z")

</div>

Hi, I am playing around with LangGraph templates, and I’ve noticed some issues with `runtime.context`. As a default since langgraph\>0.6.1, this context is `None` so it can’t be accessed without being set (in version 0.6.0 which introduced this feature, it seems that it was initialized to an empty dictionary but not in later versions.  
This will lead the basic template to fail with an error, I’ve documented the issue here: [Runtime context is not initialized as a default · Issue #14 · langchain-ai/new-langgraph-project · GitHub](https://github.com/langchain-ai/new-langgraph-project/issues/14)

> **[Runtime](https://langchain-ai.github.io/langgraph/reference/runtime/)**
>
> Build reliable, stateful AI systems, without giving up control

My problem is that setting context seems to be done at invokation time: however, when using `langgraph dev`, I don’t have control on the `invoke` call.  
Documentation about context showing the `invoke` call with a `context` param : [Context overview - Docs by LangChain](https://docs.langchain.com/oss/python/context) and [Runtime](https://langchain-ai.github.io/langgraph/reference/runtime/).

How can I initialize the context when using LangGraph CLI?
