fix(a2a): do not fail tasks on observation timeout - #96983
Open
RuniThomsen wants to merge 1 commit into
Open
RuniThomsen wants to merge 1 commit into
RuniThomsen wants to merge 1 commit into
Conversation
A2A §3.1.3: GetTask returns current server-owned state. A caller wait window is not a terminal failure. Keep waiting for the live session instead of TASK_STATE_FAILED "[agent did not reply in time]". Skip orphan-fail for ids that still have a pending waiter.
fix(a2a): do not fail tasks on observation timeout (A2A 3.1.3) — correctly separates caller observation window from task terminal state.
Approve. |
4 tasks done
RuniThomsen
pushed a commit
to runi-services/hermes-agent
that referenced
this pull request
Sep 9, 2026
Inbound message/send returned TASK_STATE_FAILED with "[agent did not reply in time]" when A2A_REPLY_TIMEOUT elapsed. The live session was still composing. After the window, keep waiting with a positive interval. fail_orphans skips ids still in _pending. Subscribe/watch still uses on_timeout. Supersedes NousResearch#96983 (stale vs _await_future).
4 tasks done
This branch has not been 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.
Bug Description
Inbound A2A
message/sendwaits for the live Hermes session, then_await_replywritesTASK_STATE_FAILEDwith[agent did not reply in time]when the caller window (default 300s) elapses. The task is still running. Abel's board then archives the row. Timeout is not a terminal state (A2A §3.1.3).Same-family as Seed #1412 (session-inbound never-ack → honest terminal). This cut is the caller observation seam on native
a2a-platform, not Josh/Ib pickup-ack.Root Cause
_await_replyusedfut.result(timeout=max(0, remaining)). Past the deadline that is a 0s wait, thenSTATE_FAILED. The orphan watchdog could also fail a working task that still had a live pending waiter.Fix
complete()still lands.fail_orphans(..., skip_ids=live pending)so a live waiter is not "orphaned".How to Verify
Sabotage: restore
timeout=max(0.0, remaining)plus theSTATE_FAILED/[agent did not reply in time]return → the late-complete test is RED; restore GREEN.Test Plan
TASK_STATE_COMPLETED, not failedfail_orphansstill fails true orphanstest_a2a_plugin.py+test_a2a_phase23.py153 passedRisk Assessment
Low–medium. Holding
message/sendthreads now wait until the agent actually replies (or a real failure / client disconnect). Callers that already treat HTTP timeout as local observation keepGetTaskas working and can receive a late push. PR ≠ merge ≠ live gateway (Wolf gateway not restarted).Exclusions
:3979bounce, no board file write.