Skip to content

macOS BB 0.43.4: recurrent host-daemon and server exits from uncaught Node/Undici setTypeOfService EINVAL #4280

Closed

Description

@pixexid

Environment: BB app and CLI 0.43.4; /Applications/bb.app/Contents/MacOS/bb; Darwin 27.0.0 arm64; bundled Node v24.20.0 (same failure observed on prior v24.15.0); host-daemon server URL logged as http://127.0.0.1:38886.

Observed: 21 host-daemon uncaught-exception reports and six server reports with identical EINVAL signature between Aug 13 and Sep 24 local (plus one unrelated server ECONNRESET); nine host-daemon events Sep 23 PDT and two Sep 24 PDT by 11:00. Example UTC times: Sep 23 05:32:26.413, Sep 24 06:41:58.977, Sep 24 06:42:43.765, Sep 24 18:00:02.099. Following crashes, server logs daemon WebSocket closure and reconnect ~4–7s later; live thread start/turn failures sometimes occur after disconnect.

Stack (v24.20.0): Error: setTypeOfService EINVAL / Socket.setTypeOfService (node:net:911:13) / writeH1 (node:internal/deps/undici/undici:8022:16) / Object.write (undici:7758:18) / _resume (undici:9656:54) / resume (undici:9589:7) / Client.<computed> (undici:9370:35) / Socket... / TCPConnectWrap.afterConnect (node:net:2002:10).

Repro conditions: intermittent during normal active BB use. Two bursts of failed bb thread archive calls precede crashes; bb thread tell CLI errors coincide at two other timestamps; other crashes have no CLI errors in ±30s. Spawn/start failures sometimes follow, not precede, exception. Cannot responsibly provide a deterministic repro or claim a target/family/VPN trigger from current logging. Host's server-client uses global fetch (host-daemon/src/server-client.ts:408,476,566 in packaged source map), but offending URL is unrecorded. No daemon stress reproduction attempted because it would disrupt live threads.

Suggested investigation/fix: add sanitized outbound request operation and socket family/peer/TOS/state diagnostics; determine why Undici's setTypeOfService failure propagates as uncaught rather than a rejected request and patch/update the bundled Node/Undici path. Make safe host requests retryable with backoff and idempotent event delivery; isolate networking failure from the whole host process, while preserving restart supervision. Please advise if a fixed version exists and whether this matches an upstream Node/macOS issue. Can provide redacted individual diagnostic JSON and ±seconds log excerpts privately; raw logs may contain credentials.

Impact: each crash errors every running agent thread on the host, so long multi-agent sessions lose work and need manual recovery. About 4 crashes in one working day at the moment.

Activity

  1. added theissue type on Sep 24, 2026
  2. added
    host
    no-repro
    on Sep 24, 2026
  3. bb-slop-cop commented on Sep 24, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classified Bug · High priority · Medium effort; added host and reproduction label no-repro.

    Reproduction report: NOT REPRODUCED, root-cause confidence low. The underlying socket failure remains unresolved. Source confirms fatal uncaught-exception paths, but this Darwin 25.6 / Node 22 runtime lacks the reported socket API.

    The actual host-client probe passed in two clean main checkouts: per checkout, 200 normal POSTs, 20 socket-reset rejections, and two successful recovery requests. Both builds passed. This does not refute the reported crashes on Darwin 27 / Node 24.

    No PR: the reported failure was not reproduced on trusted main, so a safe regression-backed fix could not be established.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    hostno-repro

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions