fix(llminternal): resume confirmed tool calls in request order#1169
Open
DABH wants to merge 1 commit into
Open
fix(llminternal): resume confirmed tool calls in request order#1169DABH wants to merge 1 commit into
DABH wants to merge 1 commit into
Conversation
RequestConfirmationRequestProcessor built the re-dispatch parts by ranging toolsToResumeByFunctionCallID (a map), so resuming two or more confirmations in one message re-queued the tool calls in a randomized order run-to-run. Record insertion order while collecting the confirmed calls and emit in that order, mirroring the ordered iteration generateRequestConfirmationEvent already uses on the emit side.
DABH
force-pushed
the
fix-confirmation-resume-order
branch
from
July 17, 2026 18:12
7ef3bd1 to
2a0617a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
RequestConfirmationRequestProcessorre-dispatches a batch of confirmed tool calls by rangingtoolsToResumeByFunctionCallID(a map). Go randomizes map iteration order, so when a user resumes two or more tool confirmations in one message, the re-queued function calls execute in a different order run-to-run for identical input. This can be a bug for integrations and use cases that are trying to do deterministic replays of agent pipelines with ADK (e.g., durable execution engines).generateRequestConfirmationEventalready fixed the identical hazard on the emit side (iterating the orderedContent.Partsinstead of rangingRequestedToolConfirmations, mirroring adk-python), but the resume path was missed.Fix
Record insertion order (
resumeOrder) while collecting confirmed calls from the orderedcallsslice, and then use that order to re-dispatch calls.Testing plan