Symptom
No exception is raised. After one invoke, the graph's shared metadata dict is no longer only {"ls_integration": "langchain_create_agent"}. It also contains the previous thread_id. Values bound with with_config on callbacks, tags, metadata, or configurable are dropped when a later config sets another key in that same field.
Evidence what you'll see
- The report expects the base metadata to stay
{"ls_integration": "langchain_create_agent"}across differentthread_idvalues. Insteadensure_configkeeps the caller's dict by reference, and the later merge writesthread_idinto it. - Pull request 7926 says
Pregel.streamcallsensure_config(self.config, config)and that a full overwrite drops awith_configcallback, tag, metadata key, orconfigurablevalue such asls_agent_type.
Why it happens
ensure_config assigned those four fields by replacement, and assigned metadata without copying the dict. merge_configs in the same file already merged per key. One run's configurable values therefore landed in the next run's base metadata.
Affected versions
langgraph 1.1.6, langchain 1.2.15, langchain-core 1.2.27, Windows 10.0.26200, Python 3.13.7. The report is using create_agent from langchain 1.2.13 or newer.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- After two invokes with different
thread_idvalues, the base metadata is still{"ls_integration": "langchain_create_agent"}and does not contain the previousthread_id.
If it still fails
- A comment on 26 Mar 2026, before this release, still saw the leak on langgraph 1.1.3. The 1.2.3 notes do name 7926. Threads already saved are unchanged by the merge itself.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it