Skip to content

fix(acp-http-client): isolate detached POST failures - #306

Open
RGHenderson wants to merge 1 commit into
rivet-dev:mainfrom
RGHenderson:fix/acp-request-scoped-post-errors
Open

RGHenderson wants to merge 1 commit into
rivet-dev:mainfrom
RGHenderson:fix/acp-request-scoped-post-errors

Conversation

@RGHenderson

@RGHenderson RGHenderson commented Jul 20, 2026

Copy link
Copy Markdown

Summary

  • reject only the matching JSON-RPC request when its detached POST fails
  • preserve the shared SSE transport so later requests can continue
  • add a real-server integration test covering failure followed by a successful prompt

Motivation

postMessage runs detached so long-running requests do not block client replies. A network failure in one detached POST currently errors the shared readable stream, terminating an otherwise healthy SSE connection and every pending or subsequent request.

Rationale

Requests already have JSON-RPC IDs, so a POST failure can be represented as an error response for that request. Notifications have no response to reject and retain the existing transport-fatal behavior.

The broader proposal to return 202 Accepted for long-running requests and deliver completion over SSE is tracked separately in #305.

Test plan

  • pnpm --filter acp-http-client typecheck
  • build sandbox-agent and run pnpm --filter acp-http-client test
  • verify a failed prompt POST rejects that prompt and a second prompt succeeds on the same connection

Fixes #307

Reject only the matching JSON-RPC request when a detached request POST fails so the shared SSE transport remains usable.
@RGHenderson
RGHenderson force-pushed the fix/acp-request-scoped-post-errors branch from 2f5d1fa to 4cd4655 Compare July 20, 2026 21:44
@RGHenderson
RGHenderson marked this pull request as ready for review July 21, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Detached ACP POST failure closes the shared SSE transport

1 participant