Agent FixboardAgentFixboard

Callbacks, tags or metadata bound with with_config are silently dropped

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.

From GitHub

langchain-ai/langgraph

Difficulty
Easy
Time
~5 min
Steps
2
Fixed in
1.2.3
Last checked

Verified fix: PR #7926 merged on . Fixed in 1.2.3 (first published release whose tag contains the merge commit). Last checked .

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 different thread_id values. Instead ensure_config keeps the caller's dict by reference, and the later merge writes thread_id into it.
  • Pull request 7926 says Pregel.stream calls ensure_config(self.config, config) and that a full overwrite drops a with_config callback, tag, metadata key, or configurable value such as ls_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_id values, the base metadata is still {"ls_integration": "langchain_create_agent"} and does not contain the previous thread_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