Skip to content

fix: Fix ADK Runner race condition for sequential tool execution#1234

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_921989444
Open

fix: Fix ADK Runner race condition for sequential tool execution#1234
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_921989444

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service Bot commented May 28, 2026

fix: Fix ADK Runner race condition for sequential tool execution

BaseLlmFlow.run() now appends each event synchronously inside the per-step
concatMap, so the next runOneStep sees the previous step's events. Without
this, a tool relying on prior events (e.g. a BeforeToolCallback producing a
function response) could see stale history and re-call the tool or
hallucinate its result.

@copybara-service copybara-service Bot force-pushed the test_921989444 branch 2 times, most recently from baa21a0 to 5cd3edb Compare June 1, 2026 15:08
BaseLlmFlow.run() now appends each event synchronously inside the per-step
concatMap, so the next runOneStep sees the previous step's events. Without
this, a tool relying on prior events (e.g. a BeforeToolCallback producing a
function response) could see stale history and re-call the tool or
hallucinate its result.

PiperOrigin-RevId: 921989444
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant