The adk-go history builder now preserves intermediate, unrelated function-call and function-response events when consolidating the latest long-running tool response, preventing valid tool history from being silently dropped during conversation replay.
Modifies the event rearrangement logic to scan and retain unrelated intermediate function calls and responses instead of truncating history at the matching call, ensuring only the target response sequence is merged while preserving the rest of the tool execution timeline.
Developers building long-running AI agents with multiple tool calls will no longer lose valid intermediate tool history when the framework consolidates asynchronous function responses. By fixing the history builder to preserve unrelated events instead of truncating the conversation log, agents can correctly replay full tool execution sequences without silent context loss. Operators should monitor multi-step tool workflows for correct state retention, especially when interleaved calls trigger response merging, and verify that downstream LLM context windows do not unexpectedly bloat from the now-preserved history.