Repository navigation
Description
Summary
On bb 0.49.0 desktop for Windows, the bb Connect tunnel reconnects every 20–30 seconds. Every reconnect drops the enrolled Linux host's daemon WebSocket, so terminal and provider commands fail with 502/504 even though both machines and the remote site remain responsive. An independent curl reproduction shows that a second request over the same HTTPS connection to the account's getbb.app endpoint stalls, while a fresh connection succeeds immediately.
Versions and environment
- bb 0.49.0, Windows desktop app; confirmed latest release with
bb updates --json. - Windows 11 Pro, build 26300.
- Built-in Connect plugin
[email protected]. - bb server runs on the Windows laptop; one manually enrolled persistent Linux host connects through bb Connect.
- No source install, custom agent provider, or managed worktree is involved in the reproduction.
Steps to reproduce
- Run bb desktop on Windows and enroll a Linux machine through bb Connect.
- Keep bb Connect enabled and watch
logs/server.*.log. - Run a real command on the remote machine, for example
bb terminal run --machine <machine> -- sh -c 'uptime', or read an existing terminal's output. - Observe repeated
tunnel closed (code 1006)/Daemon WebSocket closedcycles. Commands time out with 504 while the machine status briefly showsconnectedbetween reconnects.
A separate reproduction without bb credentials or an agent (replace ACCOUNT with a valid account name; HTTP 401 is expected):
curl -sS -o /dev/null --max-time 15 \
-w '1: HTTP %{http_code} %{time_total}s\n' https://ACCOUNT.getbb.app/ \
--next -sS -o /dev/null --max-time 15 \
-w '2: HTTP %{http_code} %{time_total}s\n' https://ACCOUNT.getbb.app/ \
--next -sS -o /dev/null --max-time 15 \
-w '3: HTTP %{http_code} %{time_total}s\n' https://ACCOUNT.getbb.app/Observed both with the VPN app running and after closing it:
1: HTTP 401 0.305s
curl: (28) Operation timed out after 15013 milliseconds with 0 bytes received
2: HTTP 000 15.014s
3: HTTP 401 0.334s
Expected vs actual
Expected: the Connect WebSocket and ordinary HTTP keep-alive connections remain usable; a remote command returns normally.
Actual sanitized log excerpts:
tunnel connected {"lookupMs":1,"connectMs":37,"tlsMs":116,"upgradeMs":342}
tunnel closed (code 1006) {"transportError":null,"connectedDurationMs":21165,"lastHeartbeatAckAgeMs":null}
Daemon WebSocket closed
Terminal session disconnected with daemon session
Other observed `connectedDurationMs` values in the latest window include 19924, 24281, 30916, and 39215. `lastHeartbeatAckAgeMs` is consistently `null`. Real terminal operations return `504 terminal_open_timeout` or `504 terminal_output_timeout`; provider discovery intermittently returns 502 while the tunnel is down.
Evidence
- Thirty sequential Node
fetchrequests to the account endpoint, two seconds apart: 15 completed and 15 exceeded a five-second timeout. Repeating after closing the VPN app produced exactly 15/30 failures again. - The curl reproduction above deterministically stalled the second request on the reused HTTPS connection in both runs.
- An alternate resolved address for the same getbb.app endpoint reproduced the same second-request stall, so this is not tied to one selected edge address.
- Control WebSocket to an unrelated public echo service stayed open for 75 seconds, returned 14/14 test messages, and closed cleanly with code 1000.
- Three keep-alive requests to an unrelated Cloudflare-hosted site completed in 0.379s, 0.054s, and 0.065s.
- Sixty ICMP packets to the local gateway and sixty to
1.1.1.1: zero loss on each path. - The remote production HTTPS page returned 200 in 0.13s during the bb failures.
- Account name, host/thread IDs, local paths, and remote IP addresses are intentionally omitted for privacy. The complete sanitized investigation is contained in this report.
What you ruled out
- Not Host daemons all drop together when the server event loop stalls past the 30s heartbeat lease (502/504) #6499: the repeated disconnect window has no matching server event-loop stall; the remote service and local bb server remain responsive.
- Related to Connect tunnel drops 15–30×/day while idle (code 1006, heartbeat gaps, edge TLS handshake timeouts at ATL) #5880 but not an exact match: that report has 15–30 drops/day and varying heartbeat ages; here every connection drops after roughly 20–30s, heartbeat age is always
null, and plain HTTP keep-alive also stalls. - Not a general WebSocket failure: the independent echo WebSocket survived 75 seconds with 14/14 replies.
- Not general packet loss or DNS resolution: zero packet loss, and fresh connections complete TLS and HTTP quickly.
- Not caused by the VPN app UI: results were identical after closing it; no VPN adapter was active and no system proxy was configured. Its background service remained installed, so a low-level driver effect is not independently excluded.
- Not one Cloudflare anycast address: forcing another resolved address reproduced the stall.
- No alternate ISP/mobile hotspot was available for testing.
- Searched open and closed issues for Connect, 1006, heartbeat, and disconnect reports, including Connect tunnel drops 15–30×/day while idle (code 1006, heartbeat gaps, edge TLS handshake timeouts at ATL) #5880, Host daemons all drop together when the server event loop stalls past the 30s heartbeat lease (502/504) #6499, and Remote previews return 504 and the host repeatedly reconnects #3407.
Suggested priority and effort (optional)
High for this deployment: the enrolled host is effectively unusable through bb Connect, with no configured workaround and no data loss observed. Effort unknown; please check whether the account-edge connection or its return path stops delivering frames/responses after the first request or heartbeat.
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
AGENT GENERATED
Activity
bb-slop-cop commentedon Nov 13, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotremote,connect; no existing classifications were replaced.no-repro.am1599567 commentedon Nov 15, 2026
Thanks for the clean-main control results. The failure is still live on the affected Windows path. Here are fresh UTC timestamps and edge request IDs for correlation, plus one correction to my earlier description: the stall is not always on the second request.
Fresh sequential Node
fetchrequests using the default keep-alive behavior, same account endpoint, no proxy or active VPN adapter, anonymous 401 expected:In the same window, the remote production HTTPS page returned 200 in 129 ms. This agrees with your observation that the anonymous 401 is generated before tunnel forwarding and does not itself establish the root cause. It also gives a reproduction that does not involve an agent, the remote application, or the bb origin server.
One new detail from the latest bb window: the Connect tunnel connected at
2026-11-15T06:53:36.795ZwithCF-RAY a5ac56fb2e2af136-DMEand did not log another tunnel close in this window. Nevertheless, at2026-11-15T07:17:55.748Zthe server loggedDaemon sent nothing within its lease; closing its socket(leaseTimeoutMs: 30000). A replacement daemon WebSocket opened at07:17:58.398Z; remote operations around it returned 502/504. So the current symptom can be a daemon heartbeat/return-path failure even while the outer Connect tunnel remains connected.I cannot test an alternate ISP because no mobile hotspot is available. I am not claiming that the trusted-main code is the root cause; the clean control is useful evidence that this depends on the affected Windows/network/account-edge path.
Could you please correlate the two successful request IDs and the third request's missing response with the stored edge logs, and check the daemon heartbeat return path around
07:17:55.748Z? If another specific sanitized capture would help, I can collect it.am1599567 commentedon Nov 15, 2026
One more live A/B sequence that may help narrow this down. It shows that a reopened daemon session does not necessarily restore the command channel, and that remote resource pressure is absent.
The successful command reported remote load average
0.46, 0.32, 0.28, 1.4 GiB available RAM, 1.7 GiB free swap, and 11 GiB free disk. The remote HTTPS page also returned 200 in 140 ms in the same period.The significant part is the last interval: the replacement daemon WebSocket was already open before the second command started, yet the terminal-open request still timed out. Thus
connected/Daemon WebSocket openeddoes not prove that requests or heartbeat frames are actually flowing in both directions. This also makes remote CPU, RAM, swap, and disk exhaustion unlikely causes of this failure window.am1599567 commentedon Nov 15, 2026
I now ran the missing alternate-ISP check using a mobile hotspot. The result separates ordinary HTTPS keep-alive from the bb daemon/WebSocket failure.
Alternate network: 30/30 HTTPS requests succeeded. Sequential Node
fetchrequests with default keep-alive ran for 70 seconds, two seconds apart. All returned the expected 401 with no timeout; all were at HEL:This contrasts with the home network, where the same test produced 15/30 timeouts. Thirty ICMP packets to
1.1.1.1over the mobile path also had zero loss (average 71 ms).The bb remote-host channel still failed over the same mobile path:
The second command was intended to emit a timestamp every 10 seconds for 90 seconds; output stopped before completion. During this period the remote production page returned 200 in 233 ms.
Unlike the earlier home-network records, some mobile-path tunnel records have a non-null
lastHeartbeatAckAgeMs(for example 5433 ms), so some heartbeat acknowledgements do arrive before the drops. The failures also crossed HEL and ARN.This suggests two separable behaviors: the anonymous HTTPS keep-alive stall is network-path dependent, but the bb daemon/WebSocket failure persists across ISPs and edge locations. It is therefore not explained by one home ISP, one Cloudflare address/colo, or remote resource pressure.
am1599567 commentedon Nov 16, 2026
@ymichael Could you please re-triage this issue and reconsider
no-repro?Since the initial clean-main check, we have added evidence showing:
The remote VPS is healthy and responds normally. This appears to need account-edge and daemon-heartbeat investigation rather than another local reproduction.
peterkimpk1 commentedon Nov 16, 2026
Additional observed Connect/daemon disruption on macOS, BB 0.49.0 (built-in Connect 0.1.1, Browser Automation 0.1.1 / SDK 0.6.132). A Mac mini serves BB and an enrolled MacBook runs local headless Browser Automation through Connect. This is a related observation, not a reproduction of the Windows HTTPS keep-alive test or a confirmed shared root cause.
Two capture attempts on 2026-11-16 failed at the transport boundary:
tunnel closed (code 1006); its daemon WebSocket closed at .113 and the tunnel reconnected at 16:14:19.358. Browser calls in the same interval returned HTTP 502 and thenunknown command 'browser-automation'. The already authenticated browser session became stopped and could not resume.command_failed: Host is not connected(observed by 17:13:52.003). An authenticated local application GET had succeeded before browser-open; that does not prove host RPC readiness.Both disposable capture jobs cleaned up their own containers, locks, browser sessions, environment files and ports. No service, plugin, host or network restart was performed. Active unrelated providers/jobs were left alone. No further browser retry is being used as a diagnostic loop.
Current connected/registered metadata does not establish that the interruption is repaired. The inner rejected RPC call ID and the historical in-memory artifact generation were not exposed and are unknown. These observations do not establish sleep, update, server event-loop stall, mount failure, authentication expiry, registry restart or the separate Browser Automation timeout defect as the cause.
Could the Connect/daemon maintainer advise the supported next diagnostic or recovery path, preserving active providers and jobs, and where to route this timestamped incident for transport correlation? The local logs show the tunnel/session churn, but do not establish why it happened. No BB source patch or runtime intervention is proposed yet.
Prepared from a read-only Infra packet, NM-876 / thread thr_pabamqfsjx. Private host/account identifiers, credentials and unrestricted logs are intentionally omitted.
beaverbeard commentedon Nov 23, 2026
Related production observation from macOS/Linux, not a reproduction of the Windows keep-alive test or proof of a shared root cause.
On 2026-11-23, after moving this BB server to an Ubuntu24 VPS, ordinary Connect intermittently delays thread loads and interrupts the enrolled Mac's command/browser channel. The server has a private/patched runtime and custom plugins; its installed npm metadata reports BB0.49.0, built-in Connect0.1.1. The Mac desktop reports BB0.49.0. This is not a clean-upstream reproduction.
Abrupt tunnel close with a fresh heartbeat
The server's Connect log records:
Real enrolled-Mac calls intermittently returned
Host is not connected, browser timeouts, or stale desktop-generation errors. A later machine-status read said connected; that does not establish continuous command-channel health. Browser cleanup also timed out during this window.Same browser profile, same readonly requests, both routes
An official desktop Browser Automation tab on the Mac measured identical readonly timeline requests through ordinary Connect, then an existing SSH loopback fallback, then Connect again. All returned200 and the same decoded response sizes.
Connect used HTTP/2; resource timing showed0–3ms before requestStart in this window. This is request timing, not click-to-render timing, and not a statistically controlled benchmark.
In a separate sample, the existing origin-timing instrumentation reported18.8ms until origin headers for timeline A, versus622ms until headers on the Mac. For timeline B, those were536ms and1248ms. Some origin delays also remain; we do not attribute all perceived slowness to the hosted gate.
Local disk pressure is being investigated separately. Mail and reindex jobs were paused without a user-observed resolution. No sleep, VPN, host-capacity, auth-expiry, or particular network-hop cause is established by this packet.
Next fallback currently cannot complete TLS
The user enabled Connect Next, but it remains offline with
remote error: tls: handshake failure. At approximately16:31UTC, a credential-free standard TLS probe from the VPS, with normal SNI and certificate verification, showed:tunnel.next.getbb.app: remote handshake-failure alert.ACCOUNT.next.getbb.app: the same remote alert.ACCOUNT.getbb.app: TLS1.3 completed.An earlier independent probe from the Mac showed the same Next/control distinction, including TLS1.2. These failures occur before BB credentials are sent. Certificate verification was never disabled. We cannot infer missing DNS/certificates or an incorrect FRP configuration from the alert alone.
Could you correlate the supplied UTC/ray with the gate logs and advise the supported recovery/diagnostic path? Is Next expected to be reachable for ordinary getbb.app accounts at those endpoints? We can provide another bounded, timestamped capture if a specific missing fact would distinguish the failure modes.
Account label, host/thread IDs, private paths, IP addresses, credentials, request headers and message contents are omitted. No public server port was opened, and no extra model/API inference was used for these tests.