From db41f54e7bc832a72899eede3141517ca41cfa9a Mon Sep 17 00:00:00 2001 From: "Xinran (Sherry) Tang" Date: Tue, 7 Oct 2025 14:47:04 -0700 Subject: [PATCH] chore: When processing pending tool confirmation requests, only look at events in the same branch PiperOrigin-RevId: 816387687 --- src/google/adk/flows/llm_flows/request_confirmation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/google/adk/flows/llm_flows/request_confirmation.py b/src/google/adk/flows/llm_flows/request_confirmation.py index 612d4e42..358cae80 100644 --- a/src/google/adk/flows/llm_flows/request_confirmation.py +++ b/src/google/adk/flows/llm_flows/request_confirmation.py @@ -48,7 +48,8 @@ class _RequestConfirmationLlmRequestProcessor(BaseLlmRequestProcessor): agent = invocation_context.agent - events = invocation_context.session.events + # Only look at events in the current branch. + events = invocation_context._get_events(current_branch=True) if not events: return