Summary
When a detached ACP request POST fails, acp-http-client calls failReadable(error). This closes the shared readable stream and aborts the SSE loop, so one request-scoped network failure terminates the entire client connection.
Impact
A transient POST failure—such as a response-header timeout or the server closing that HTTP socket—rejects more than the affected request. Pending and subsequent ACP operations can no longer receive responses over an otherwise healthy SSE connection.
This is especially visible for long-running session/prompt calls because their POST remains open while the agent works.
Expected behavior
For a JSON-RPC request with an ID, a detached POST failure should reject only that matching request. The shared SSE transport should remain usable by later requests.
Notifications have no matching response promise and may continue to treat an unhandled POST failure as transport-fatal.
Reproduction
- Initialize an
AcpHttpClient and create a session.
- Cause the fetch for one
session/prompt POST to reject.
- Observe that the prompt rejects and the transport's readable stream is closed.
- Send another prompt on the same client; it cannot complete over SSE.
Related work
Summary
When a detached ACP request POST fails,
acp-http-clientcallsfailReadable(error). This closes the shared readable stream and aborts the SSE loop, so one request-scoped network failure terminates the entire client connection.Impact
A transient POST failure—such as a response-header timeout or the server closing that HTTP socket—rejects more than the affected request. Pending and subsequent ACP operations can no longer receive responses over an otherwise healthy SSE connection.
This is especially visible for long-running
session/promptcalls because their POST remains open while the agent works.Expected behavior
For a JSON-RPC request with an ID, a detached POST failure should reject only that matching request. The shared SSE transport should remain usable by later requests.
Notifications have no matching response promise and may continue to treat an unhandled POST failure as transport-fatal.
Reproduction
AcpHttpClientand create a session.session/promptPOST to reject.Related work
202and delivering completion over SSE.