Skip to content

fix(a2a): mark failed A2A tasks as error events - #6713

Open
sakiko-toyokawa wants to merge 4 commits into
google:mainfrom
sakiko-toyokawa:fix/a2a-failed-task-error-event-6708
Open

fix(a2a): mark failed A2A tasks as error events#6713
sakiko-toyokawa wants to merge 4 commits into
google:mainfrom
sakiko-toyokawa:fix/a2a-failed-task-error-event-6708

Conversation

@sakiko-toyokawa

Copy link
Copy Markdown

Fixes #6708

Convert failed A2A task responses and streaming status updates into ADK error events instead of regular conversation content. The fix covers both legacy and v2 RemoteA2aAgent handlers, handles Task and TaskStatusUpdateEvent shapes, uses _compat.is_failed_status() for a2a-sdk version compatibility, and sets error_code=A2A_TASK_FAILED plus error_message.

Testing plan:

  • pytest tests/unittests/a2a: 447 passed, 45 skipped
  • pytest tests/unittests/agents/test_remote_a2a_agent.py: 174 passed
  • ruff, pyink --check, git diff --check: passed

@google-cla

google-cla Bot commented Aug 13, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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

Labels

core [Component] This issue is related to the core interface and implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-up to #4309: fix for failed A2A tasks needs both _handle_a2a_response/_v2, _compat.TS_FAILED, and error_code — still reproducible in 2.6.2

3 participants