Skip to content

fix: skip summarization for terminal A2A task states - #6787

Open
surajksharma07 wants to merge 2 commits into
google:mainfrom
surajksharma07:fix/6584-skip-summarization-terminal-states
Open

fix: skip summarization for terminal A2A task states#6787
surajksharma07 wants to merge 2 commits into
google:mainfrom
surajksharma07:fix/6584-skip-summarization-terminal-states

Conversation

@surajksharma07

Copy link
Copy Markdown
Collaborator

When a RemoteA2aAgent talks to a non-streaming peer, the whole turn (text + tool calls + tool responses) comes back as a single completed Task and gets converted into one Event. Since that event legitimately carries function_call/function_response parts, is_final_response() falls through its tool-activity check and returns False even though the task is done, so callers relying on it never see the turn as finished.

convert_a2a_task_to_event() now sets event_actions.skip_summarization = True whenever the A2A task's status is a terminal state (completed, failed, or canceled), which lets is_final_response() correctly report True via its existing skip_summarization branch. No change to Event.is_final_response() itself.

Verified with the repro script from the issue - is_final_response() flips from False to True after the fix, with the function call/response content still intact on the event.

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.

2 participants