Repository navigation
Python: preserve status messages in terminal A2A task snapshots - #9051
Closed
Suhas Aggarwal (suhasagg) wants to merge 1 commit into
Closed
Suhas Aggarwal (suhasagg) wants to merge 1 commit into
Suhas Aggarwal (suhasagg) wants to merge 1 commit into
Conversation
Suhas Aggarwal (suhasagg)
requested review from
SergeyMenshykh,
Tao Chen (TaoChenOSU),
Eduard van Valkenburg (eavanvalkenburg),
Giles Odigwe (giles17),
Jose Alvarez (jpalvarezl),
Evan Mattson (moonbox3),
Roger Barreto (rogerbarreto),
sophia-ramsey and
westey (westey-m)
as code owners
October 5, 2026 10:21
Suhas Aggarwal (suhasagg)
temporarily deployed
to
github-app-auth
October 5, 2026 10:21 — with
GitHub Actions
Inactive
Suhas Aggarwal (suhasagg)
temporarily deployed
to
github-app-auth
October 5, 2026 10:21 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused fallback preserves existing precedence and is adequately covered by regression tests.
Review effort: Balanced
Findings: None
What changed in this PR
Adds fallback handling so terminal A2A task status messages are retained when artifacts and history are absent.
Changes:
- Converts terminal status messages into framework messages.
- Adds completed and failed task regression coverage.
| File | Description |
|---|---|
python/packages/a2a/agent_framework_a2a/_agent.py |
Adds status-message fallback conversion. |
python/packages/a2a/tests/test_a2a_agent.py |
Tests completed and failed status messages. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Member
|
Suhas Aggarwal (@suhasagg) Thanks for the contribution. This implements the same change as #8999, so we'll continue the work there and close this duplicate. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Preserve terminal A2A Task status messages when converting Task snapshots
into Agent Framework messages.
Problem
A terminal A2A Task can carry its final response in
task.status.message.A2AAgent._parse_messages_from_task()currently handles task artifactsand task history, but when both are absent it does not fall back to the
status message. As a result, a final response contained only in a
completed or failed Task status can be omitted.
Changes
task.status.messagewhen a Task has no artifacts or history.Testing
_parse_messages_from_tasktests: 3 passedtest_a2a_agent.py: 138 passedgit diff --check: passedFixes #8998