Repository navigation
fix(server): reject a message that does not answer the request alone - #464
Merged
muscariello merged 1 commit intoNov 3, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
lgecse
previously approved these changes
Nov 3, 2026
A2A §3.1.2: a response is exactly one Message, or a Task followed by its updates. drive_execution passed a Message through after task events, so a blocking send returned the late message and left the task WORKING, and it let events follow a Message that had already answered. Either now ends the execution with InvalidAgentResponseError (-32006), and the task fails. Signed-off-by: gulldan <5641375+gulldan@users.noreply.github.com>
muscariello
force-pushed
the
stack/19-message-after-task-invalid-response
branch
from
November 3, 2026 11:16
1beecd3 to
c8c88d2
Compare
lgecse
approved these changes
Nov 3, 2026
Open
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.
Fixes #437. Replaces #438.
Cause: A2A §3.1.2 says a response is exactly one
Message, or aTaskfollowed by its updates.drive_executionpassed aMessagethrough after task events, so a blocking send returned the late message and left the taskWORKING. It also let events follow aMessagethat had already answered the request.Fix:
drive_executiontracks which kind of response the executor started. AMessageafter task events, or any event after an answeringMessage, ends the execution withInvalidAgentResponseError(-32006), and the task fails as in #459.Tests:
test_message_after_task_events_is_an_invalid_agent_response(WORKING, then aMessage:send_messageanswers -32006) andtest_event_after_an_answering_message_is_an_invalid_agent_response(aMessage, then a status update: the stream carries the message, then -32006). Both fail with the fix reverted.Unproven: the Python SDK applies the same two rules; the Go SDK only rejects a
Messageon a stored task. #438 says the A2A 1.1handler/updates.rsstill accepts both cases; not checked here.