Skip to content

fix(provider-acp): ignore hangups on the bb-bridge TCP socket - #2510

Open
Danielalnajjar wants to merge 1 commit into
get-bb:mainfrom
Danielalnajjar:fix/acp-bb-bridge-socket-error
Open

fix(provider-acp): ignore hangups on the bb-bridge TCP socket#2510
Danielalnajjar wants to merge 1 commit into
get-bb:mainfrom
Danielalnajjar:fix/acp-bb-bridge-socket-error

Conversation

@Danielalnajjar

@Danielalnajjar Danielalnajjar commented Aug 27, 2026

Copy link
Copy Markdown

Human comments

I made a plugin to let me run workflows/children with multiple claude subscriptions at the same time (each sub is a different acp provider logged in with the 1yr token). It started failing when I updated to .40. The agent investigated and this seems like an issue that could affect more then my specific workflow so I asked it to file an issue and PR.

What was wrong

On 0.40, bb-bridge opens a short local TCP connection at initialize to say it started, then both sides hang up. The client already listens for socket errors. The server did not, so Node treated a normal hangup as a crash and killed the ACP provider process — every session on that process died with it. 0.39 never sent that initialize ping, so session start did not hit this.

See #2509.

What changed

In packages/provider-bridge-acp, listen for error on accepted bb-bridge sockets and ignore it. These connections are one-shot; a reset after the reply is normal.

Added a regression test that resets the client right after initialize, asserts the process does not throw, then makes a real tool call on the same server.

No HOST_DAEMON_PROTOCOL_VERSION bump: this is inside the ACP provider process, not the server/host-daemon wire. No CLI or docs change.

How you verified

The new test keeps the dynamic-tool TCP server alive after a client reset on initialize failed on unfixed main with uncaught write EPIPE, then passed after the listener.

  • pnpm exec turbo run typecheck --filter=@bb/provider-bridge-acp
  • pnpm exec turbo run test --filter=@bb/provider-bridge-acp — 289 passed

Fixes #2509

AGENT GENERATED: by Grok 4.6

0.40's initialize ping opens a one-shot local TCP connection, then both
sides hang up. The client already listens for socket errors; the server
did not, so Node treated a normal reset as a process crash and killed
every ACP session on that provider process.

Listen for error on accepted sockets and drop it. A later tool call
still works. No host-daemon protocol bump.

Fixes get-bb#2509

Verification:
- Test failed on unfixed main with uncaught write EPIPE.
- pnpm exec turbo run typecheck test --filter=@bb/provider-bridge-acp — 289 passed.
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.

ACP provider process dies after bb-bridge initialize hangup

1 participant