Skip to content

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

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

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.

copybara-service Bot pushed a commit that referenced this pull request Sep 3, 2026
@adk-bot

adk-bot commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Thank you @surajksharma07 for your contribution! 🎉

Your changes have been successfully imported and merged via Copybara in commit aef3a9c.

Closing this PR as the changes are now in the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged [Status] This PR is merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants