Skip to content

fix: rely on agent executor implementation for stream termination#988

Merged
ishymko merged 3 commits into1.0-devfrom
ishymko/remove-some-breaks
Apr 20, 2026
Merged

fix: rely on agent executor implementation for stream termination#988
ishymko merged 3 commits into1.0-devfrom
ishymko/remove-some-breaks

Conversation

@ishymko
Copy link
Copy Markdown
Member

@ishymko ishymko commented Apr 20, 2026

active_task.py already contains agent executor behavior validation, do not terminate the stream so that those errors can be raised, tests are updated to cover invalid behavior conditions.

@ishymko ishymko requested a review from a team as a code owner April 20, 2026 07:53
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the on_message_send and on_message_send_stream methods in the default request handler to adjust how message events trigger loop termination. The changes remove immediate breaks for Message events, relying instead on the AgentExecutor for control flow and error detection. Review feedback suggests adding a conditional break when return_immediately is active to prevent potential hangs and improving the clarity of the added comments regarding terminal task states.

Comment thread src/a2a/server/request_handlers/default_request_handler_v2.py Outdated
Comment thread src/a2a/server/request_handlers/default_request_handler_v2.py
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 20, 2026

🧪 Code Coverage (vs 1.0-dev)

⬇️ Download Full Report

Base PR Delta
src/a2a/server/agent_execution/active_task.py 95.39% 96.48% 🟢 +1.08%
src/a2a/server/request_handlers/default_request_handler_v2.py 92.67% 92.51% 🔴 -0.16%
Total 92.61% 92.65% 🟢 +0.04%

Generated by coverage-comment.yml

@ishymko ishymko requested a review from sokoliva April 20, 2026 08:29
@ishymko ishymko merged commit d77cd68 into 1.0-dev Apr 20, 2026
20 checks passed
@ishymko ishymko deleted the ishymko/remove-some-breaks branch April 20, 2026 09:10
ishymko added a commit that referenced this pull request Apr 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.0.0](v1.0.0-alpha.3...v1.0.0)
(2026-04-20)

See the [**v0.3 → v1.0 migration
guide**](docs/migrations/v1_0/README.md) and changelog entries for alpha
versions below.

### ⚠ BREAKING CHANGES

* remove Vertex AI Task Store integration
([#999](#999))

### Bug Fixes

* rely on agent executor implementation for stream termination
([#988](#988))
([d77cd68](d77cd68))


### Documentation

* add comprehensive v0.3 to v1.0 migration guide
([#987](#987))
([10dea8b](10dea8b))


### Miscellaneous Chores

* release 1.0.0
([530ec37](530ec37))
* remove Vertex AI Task Store integration
([#999](#999))
([7fce2ad](7fce2ad))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: Ivan Shymko <ishymko@google.com>
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