Category: bug Severity: major
Location: src/arcp/_client/dispatch.py:76-77
What
The runtime emits a session-scoped session.error for per-request dispatch failures (e.g. handle_submit raising AgentNotAvailableError in _accept._dispatch_one). The client reacts by failing every open JobHandle, every pending submit future, and every subscription. With concurrent jobs on one session, an error caused by one submission (e.g. an unknown agent) tears down the handles of unrelated jobs that are still running server-side, so callers awaiting those handles receive a spurious error.
Evidence
async def _on_session_error(client: ARCPClient, env: Envelope) -> None:
client._fail_all_handles(error_from_payload(env.payload))
Proposed fix
Scope client-side failure to the offending request where possible (e.g. correlate via a request id in session.error details, failing only the matching pending_accept), and avoid failing already-accepted, still-running job handles on an unrelated session.error.
Acceptance criteria
Category: bug Severity: major
Location:
src/arcp/_client/dispatch.py:76-77What
The runtime emits a session-scoped
session.errorfor per-request dispatch failures (e.g.handle_submitraisingAgentNotAvailableErrorin_accept._dispatch_one). The client reacts by failing every openJobHandle, every pending submit future, and every subscription. With concurrent jobs on one session, an error caused by one submission (e.g. an unknown agent) tears down the handles of unrelated jobs that are still running server-side, so callers awaiting those handles receive a spurious error.Evidence
Proposed fix
Scope client-side failure to the offending request where possible (e.g. correlate via a request id in
session.errordetails, failing only the matchingpending_accept), and avoid failing already-accepted, still-running job handles on an unrelatedsession.error.Acceptance criteria