You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A2A task aggregation lets an earlier failure mask cancellation #8396
TaskResultAggregator documents cancellation as higher priority than failure, but a failure followed by cancellation still returns failed and the failure message. Reversing the event order returns canceled. A recorded failure masks the cancellation state and message, including for legacy custom-converter events.
Thanks @sumedh-aerram, I can reproduce this on main (b1566b8, still 2.15.1). It goes back to 2.14.0, where cancel propagation and the separate _failed tracking both landed. The task_state and task_status_message properties check _failed before CANCELED.
I tried a small workaround locally. Checking CANCELED first in both properties fixes both orders. Recovered failures still go back to the right state and tests/unittests/a2a/executor stays green (124 passed). It looks like the same idea as #8397.
Could you confirm it holds on your end? Two things would help. One is the native abort path, since executor line 360 currently drops the cancel message there. The other is a run against a2a-sdk 0.3.x, since the PR says that matrix wasn't run.
Once that's confirmed I'll ask the A2A owners to review #8397.
Same fix.fix(a2a): keep a later canceled state in task aggregation #8397 checks CANCELED before _failed in both task_state and task_status_message, as in your workaround. When recovered failures are dropped, the task still goes back to its non-failure state and message. tests/unittests/a2a/executor: 179 passed.
Native abort path. Line 360 only drops a real cancel message when an INVOCATION_ABORTED event reaches the executor after an unresolved failure, because task_state still reported failed. With the fix, the task ends canceled with "Invocation was aborted by client." (new test, which fails on main). With executor.cancel() and the stock Runner, the run is stopped before the sealing abort event is yielded, so no cancel message reaches the executor. The task ends canceled with no stale failure message, both before and after the fix (also covered by a test). No executor change was needed.
a2a-sdk 0.3.x. The CI A2A set (tests/unittests/a2a + agent_registry) on Python 3.11 with a2a-sdk 0.3.26: 1218 passed, 31 skipped. With a2a-sdk 1.3.1: 1192 passed, 57 skipped. The new tests pass on both. I've updated the PR description.
Activity
surajksharma07 commentedon Dec 2, 2026
Thanks @sumedh-aerram, I can reproduce this on main (b1566b8, still 2.15.1). It goes back to 2.14.0, where cancel propagation and the separate _failed tracking both landed. The task_state and task_status_message properties check _failed before CANCELED.
I tried a small workaround locally. Checking CANCELED first in both properties fixes both orders. Recovered failures still go back to the right state and tests/unittests/a2a/executor stays green (124 passed). It looks like the same idea as #8397.
Could you confirm it holds on your end? Two things would help. One is the native abort path, since executor line 360 currently drops the cancel message there. The other is a run against a2a-sdk 0.3.x, since the PR says that matrix wasn't run.
Once that's confirmed I'll ask the A2A owners to review #8397.
sumedh-aerram commentedon Dec 2, 2026
Thanks @surajksharma07, confirmed on my end:
_failedin bothtask_stateandtask_status_message, as in your workaround. When recovered failures are dropped, the task still goes back to its non-failure state and message.tests/unittests/a2a/executor: 179 passed.INVOCATION_ABORTEDevent reaches the executor after an unresolved failure, becausetask_statestill reported failed. With the fix, the task ends canceled with "Invocation was aborted by client." (new test, which fails on main). Withexecutor.cancel()and the stockRunner, the run is stopped before the sealing abort event is yielded, so no cancel message reaches the executor. The task ends canceled with no stale failure message, both before and after the fix (also covered by a test). No executor change was needed.tests/unittests/a2a+ agent_registry) on Python 3.11 with a2a-sdk 0.3.26: 1218 passed, 31 skipped. With a2a-sdk 1.3.1: 1192 passed, 57 skipped. The new tests pass on both. I've updated the PR description.