{"record":{"id":"d8c1025d3cf49a8a","repo":"langchain-ai/langgraph","slug":"called-get-config-outside-of-a-runnable-context","errorCode":null,"errorMessage":"Called get_config outside of a runnable context","messagePattern":"Called get_config outside of a runnable context","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"libs/langgraph/langgraph/config.py","lineNumber":29,"sourceCode":"\n\ndef _no_op_stream_writer(c: Any) -> None:\n    pass\n\n\ndef get_config() -> RunnableConfig:\n    if sys.version_info < (3, 11):\n        try:\n            if asyncio.current_task():\n                raise RuntimeError(\n                    \"Python 3.11 or later required to use this in an async context\"\n                )\n        except RuntimeError:\n            pass\n    if var_config := var_child_runnable_config.get():\n        return var_config\n    else:\n        raise RuntimeError(\"Called get_config outside of a runnable context\")\n\n\ndef get_store() -> BaseStore:\n    \"\"\"Access LangGraph store from inside a graph node or entrypoint task at runtime.\n\n    Can be called from inside any [`StateGraph`][langgraph.graph.StateGraph] node or\n    functional API [`task`][langgraph.func.task], as long as the `StateGraph` or the [`entrypoint`][langgraph.func.entrypoint]\n    was initialized with a store, e.g.:\n\n    ```python\n    # with StateGraph\n    graph = (\n        StateGraph(...)\n        ...\n        .compile(store=store)\n    )\n\n    # or with entrypoint","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/langchain-ai/langgraph/blob/38031739e551638e373fb553453256c23feeb41f/libs/langgraph/langgraph/config.py#L11-L47","documentation":"Error \"Called get_config outside of a runnable context\" thrown in langchain-ai/langgraph.","triggerScenarios":"Thrown at libs/langgraph/langgraph/config.py:29 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"38031739e551638e373fb553453256c23feeb41f","analyzedAt":"2026-08-26T18:02:49.312Z","schemaVersion":2},"datasetVersion":"2026-08-26T21:11:00.512Z"}