merge_message_runs is O(n^2) in run length for list/content-block messages
Merging consecutive same-type messages with list content blocks re-validates the growing message on every step, causing quadratic runtime and freezing on long runs.

Tech tag
Published reports that match this technical term, gathered from the local catalog.
Merging consecutive same-type messages with list content blocks re-validates the growing message on every step, causing quadratic runtime and freezing on long runs.
In langchain_core, concatenating message chunks with '+' and the merge_message_runs function silently discard the 'name' attribute and fail to fallback to the trailing chunk's 'id' when the leading chunk's id is None, causing loss of metadata during streaming and in multi-agent scenarios.
The merge_message_runs utility attempts to merge consecutive ChatMessage or FunctionMessage objects based solely on message class, leading to ValueError when their identifying fields (role or name) differ. This violates expected behavior and breaks common message processing pipelines.