[Bug]: Mobile cannot connect to online relays after updating to 0.0.32-nightly.20260730.958 #5031
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
This looks related to #4671 and #4901, but those reports cover direct LAN/Tailscale connections and explicitly say the managed relay was not involved. This report is specifically for mobile connections through online T3 Connect relays.
Area#
Not sure (mobile / managed relay connection boundary)
Steps to reproduce#
- Update T3 Code Desktop Nightly to
0.0.32-nightly.20260730.958. - Leave the existing T3 Connect relay environments enabled.
- Confirm the relay entries are still online.
- Open the T3 Code mobile app and try to connect to either linked environment.
- Observe the mobile connection status.
Expected behavior#
Because the relays are online and enabled, the mobile app should connect to each linked environment normally.
Actual behavior#
The relays remain online, but the mobile app cannot connect to them. Each entry repeatedly shows a reconnect loop.
The visible errors are:
Failed to connect. Reconnecting... Reason: TDL connection failed unexpectedly.
and the same failure for Andrew's Mac Studio.
This began after updating to 0.0.32-nightly.20260730.958; the relay connection worked on mobile before the update.
Impact#
Major degradation or frequent failure
Mobile access through T3 Connect is unusable even though the relay environments themselves remain online.
Version or commit#
0.0.32-nightly.20260730.958
Environment#
- T3 Code Desktop Nightly
- Host environment shown in the mobile UI:
Andrew's Mac Studio - T3 Code mobile app (mobile OS/app version not captured)
- Connection path: T3 Connect managed relay
- Multiple linked environments affected (
TDLandAndrew's Mac Studio)
Logs or stack traces#
Failed to connect. Reconnecting... Reason: TDL connection failed unexpectedly.
Failed to connect. Reconnecting... Reason: Andrew's Mac Studio connection failed unexpectedly.
Screenshots, recordings, or supporting files#
A screenshot is available showing both relay entries enabled and simultaneously stuck in the reconnect loop. It could not be attached through the API-based submission.
Workaround#
No workaround found.
Same issue on tailnet connections
I’m seeing a distinct earlier-stage failure on macOS Nightly/iOS. The mobile client fails fetching
/.well-known/t3/environment, before WebSocket authentication orserver.getConfig.Independent test: DNS resolves, TCP 443 connects, the TLS ClientHello is sent, but no ServerHello arrives and the connection times out. HTTP port 80 responds
204through nginx/Heroku. Both local endpoints on port 3773 return200, and the local cloudflared tunnel is running.Trace ID:
b25673c0cf4b8facc0bb33463735154dThis differs from #4901, which connects successfully and disconnects after
server.getConfig.Correction to my earlier comment:
.953is good, and the regression is earlier than.958.I previously said downgrading didn't help — but I'd only gone back to
.957. Rolling my Linux environment (t3 serveunder systemd) to0.0.32-nightly.20260730.953fixes it completely.The failure is at the upgrade handshake:
GET /wsis answered204instead of101 Switching Protocols.POST /api/auth/websocket-ticket → 200 GET /ws → 204 ← expected 101That repeats every ~10–17s and produces
Failed to connect. Reconnecting… Reason: <environment> connection failed unexpectedly.It is not mobile-specific — the web client at app.t3.codes fails identically.Broken:
.963,.961,.957· Good:.953So the regression window is
.954–.957, not.958as the title suggests.Same host, same account, same
state.sqlite— only the version changed:.963(broken).953(good)GET /ws3 × 204in 55snone logged — upgrade succeeds, so it becomes a persistent connection and never logs a response websocket-ticketre-requested on every retry quiet after connect cloudflared → nodeESTAB on127.0.0.1:3773torn down every ~17s 4 held stable for 3+ min app traffic none /api/orchestration/threads,/api/orchestration/shellat 200Happy to bisect
.954–.957to pin down the exact build if that would help.Follow-up with a further narrowing, and one result that complicates my previous comment.
The
.953fix is specific to headlesst3 serve. The macOS desktop app is not fixed by it.I rolled the macOS desktop app back to
0.0.32-nightly.20260730.953— the exact build that fixes my Linux environment — andGET /wsstill returns204:14:05:43 /ws → 204 14:06:01 /ws → 204 14:06:19 /ws → 204 …every ~18sSo on my two environments:
Environment Packaging .953.957.963Arch Linux, t3 serveunder systemdnpm works broken broken macOS, desktop app (Apple Silicon) DMG broken broken broken The macOS desktop app returns
204on every build I have tried. That suggests either a desktop-app-specific path, or a second failure mode distinct from the one.953avoids — which may be what @MrDocProfPj is seeing, since that report is also macOS Nightly and fails at an earlier stage.Regression window for the headless case:
.954–.957(21 commits,v0.0.32-nightly.20260730.953...v0.0.32-nightly.20260730.957).The only commit in that range touching connect/relay is #4988 (
fix(connect): reboots no longer strand the relay link, 403s now say why,1877237c), which modifies:infra/relay/src/environments/EnvironmentConnector.ts +3/-15 infra/relay/src/http/Api.ts +4/-2 packages/contracts/src/relay.ts +19/-1I want to be clear that this is unconfirmed — the visible diff is largely a refactor moving
EnvironmentConnectNotAuthorizedReasoninto@t3tools/contracts/relay. But it is the only change in the window that touches both the relay service and the shared environment/relay contract, which would fit a failure that (a) manifests on the hosted side and (b) is avoided by pinning the environment to.953.Others in the window that touch reconnect behaviour, for completeness: #4878 (
perf(mobile): reconnect environments immediately on resume), #4903 (fix(web): show server update progress through reconnect), #4731 (fix(web): align remote server update action).Happy to bisect the
.954–.956builds on the Linux environment to pin the exact release if that would help.Correction to my two earlier comments: the
204is a red herring. Please don't chase the status code.I described this as
GET /wsreturning204instead of101 Switching Protocols. That framing is wrong, and I'd rather correct it than have anyone spend time on it.204is simply what this server logs when a WebSocket session ends. Healthy sessions log204too. The real signal is the span duration — how long the connection survived.From one environment's log, spanning a broken build and a working one, with no other changes:
# broken (0.0.32-nightly.20260731.963) — reconnect loop, one attempt every ~18s 12:20:27 /ws span=514ms 12:20:45 /ws span=524ms 12:21:03 /ws span=506ms …identical every 18s for the whole period… 12:29:37 /ws span=530ms # after rolling back to 0.0.32-nightly.20260730.953 — sessions persist 12:40:21 /ws span=129868ms (2m) 14:08:43 /ws span=5808849ms (1h 37m) 14:10:36 /ws span=84476ms (1m 24s) 14:11:42 /ws span=5995852ms (1h 40m) 14:15:18 /ws span=262724ms (4m 23s)So the accurate description is: the WebSocket is established and then torn down after roughly 500 ms, and the client retries every ~18 s. It is a connection-lifetime problem, not a failed upgrade. Everything before it — DNS, the cloudflared tunnel,
/.well-known/t3/environment,/oauth/token,/api/auth/websocket-ticket— succeeds, which I still believe is accurate.That ~500 ms is suspiciously consistent, which suggests a fixed timeout or a failed post-connect step (first heartbeat, auth confirmation, or an initial RPC) rather than a network fault. That may connect this to #4901, where the session dies after
server.getConfig.The rest of my earlier comments stands:
.953fixes the headlesst3 servecase, and the regression window is.954–.957.Apologies for the noise — the
204reading was mine, not something the logs actually claimed.Additional investigation confirms that #5055 fixes the
ServerConfigcompatibility problem only for clients built after that PR. Its description explicitly says already-shipped 0.0.31 clients require a new store build, so merging #5055 does not restore connectivity for the current iOS/Android apps.I also found failed WebSocket attempts that closed before
server.getConfigwas dispatched. Those cannot be caused or fixed by #5055, suggesting there may be a second connection-lifecycle failure in addition to the confirmed config-decoding problem.Could a maintainer clarify:
- Which mobile release will contain #5055?
- Whether a temporary server-side compatibility measure is planned for currently released clients?
- Whether the pre-
server.getConfigclosures should be tracked separately?
Follow-up/correction on my macOS/iOS case after updating both clients. The new screenshots showed:
Managed endpoint health request failed.— tracecbd248f5e4a95cfe2e46104f29649d30Relay environment endpoint is unavailable: endpoint_request_failed— traces0c00216f88bdc59015a669a70ae5ea1danda507a068d359dcaa53eae33a1d29f7dd
However, the local evidence now points to my Wi-Fi security layer rather than a T3 origin/tunnel failure:
- Desktop Nightly is
0.0.32-nightly.20260801.969. - The server is listening on
0.0.0.0:3773; loopback and LAN requests return 200. cloudflaredhas four active HA connections and zero origin/proxy errors.- After the tunnel finished reallocating, hosted relay requests reached this Mac successfully:
/api/t3-connect/mint-credentialreturned 200 four times and/api/t3-connect/healthreturned 200 twice. - My normal network resolver substitutes the generated managed hostname with
18.204.152.241; DNS-over-HTTPS returns the expected Cloudflare addresses instead. HTTPS to the substituted address stalls after ClientHello. This network uses Plume/HomePass Online Protection, whose HTTPS blocking behavior is a generic “cannot reach”/TLS failure.
So my earlier “no ServerHello” observation was real, but it was against the security layer’s substituted address—not proof that T3’s managed TLS frontend was down. The screenshot failures at 21:40 also coincided with the desktop update/tunnel restart; managed health and credential minting succeeded immediately afterward.
I am confirming over iPhone cellular and will report back only if the failure persists off this Wi-Fi. This may be useful for support/docs: users of Plume/HomePass-style network protection may need to approve
t3coderelay.com(including generated subdomains).Additional diagnostics from Windows after updating Desktop Nightly to
0.0.32-nightly.20260801.970.Android app: Play Store
0.1.0.Initially, mobile reported:
Managed endpoint health request failed.
I found an orphaned
cloudflared.exeprocess after closing T3 Code. After terminating it and reopening T3 Code:- The backend correctly started on
127.0.0.1:3773. cloudflaredestablished 4 edge connections.- Tunnel metrics showed 18 requests and 0 origin errors.
- Mobile changed back to
connection failed unexpectedly.
The fresh desktop traces show two connection attempts at approximately 14:59 CEST on August 1:
- WebSocket ticket request succeeds.
- WebSocket authentication succeeds.
SessionStore.markConnectedsucceeds.ws.rpc.server.getConfigsucceeds in approximately 3.1 seconds.- The client disconnects roughly 100–150 ms afterward.
Server trace IDs:
fd32bf59fee5ace844d09d18130fa3590ca92d77090d9b062e2763a8279ee752
This appears consistent with the Android
0.1.0client failing to process the configuration returned by the newer server. Since #5055 changes client-side decoding, it appears that a new Android store build containing that change is still required.The orphaned tunnel process was a separate issue; after clearing it, the managed relay and WebSocket path are healthy up to
server.getConfig.- The backend correctly started on
A distinct T3 Connect failure still reproduces on Desktop Nightly
0.0.32-nightly.20260802.980(e60821f0e) after updating Android to the newest version.The newest Android client now connects successfully to the same environment over direct Tailscale HTTPS, so the older
ServerConfigdecoding problem from #5055 is no longer present on this device. T3 Connect remains unavailable independently.Visible relay errors#
{ "_tag": "RelayEnvironmentEndpointUnavailableError", "code": "environment_endpoint_unavailable", "reason": "endpoint_request_failed", "traceId": "849b7a288f2bdf17cb35b6a385fde063" }The mobile environment screen also reports:
Managed endpoint health request failed. Trace ID: f1ca6cab7e82ff8357a55f175580db26Host configuration#
- Windows native T3 Code Desktop Nightly
- WSL-only Ubuntu backend
- Backend listening on
0.0.0.0:3773 - Managed T3 Connect
cloudflaredtunnel running and stable - Direct local, Tailnet HTTP, and Tailscale Serve HTTPS environment descriptors all return 200
- Current Android client connects normally over Tailscale HTTPS
Boundary isolation#
The managed tunnel's public hostname and origin route are reachable. Independent requests to:
POST /api/t3-connect/mint-credentialwith deliberately invalid proof bodies of approximately 1 byte, 1 KiB, and 8 KiB all reached the WSL backend and produced the expected local
401 Invalid cloud mint requestresponse and corresponding local spans.By contrast, reproducing the real authenticated T3 Connect failure produced the hosted relay error above but no corresponding mint request/span at the environment backend. The server and tunnel processes remained healthy throughout.
This narrows this occurrence to the hosted relay Worker → managed environment endpoint request boundary, before the request reaches
cloudflared/the T3 backend. It is not explained by:- the older mobile
ServerConfigcompatibility issue; - backend reachability;
- the managed tunnel's public route;
- the mint endpoint itself; or
- the tested request-size range.
The hosted relay trace is not present in local desktop/server traces, so the next useful evidence should be the production relay trace records for the two trace IDs above (for example in
t3-code-relay-traces-prod).Reproducing this on 0.0.33-nightly as well, so it is still live on current nightlies.
- T3 Code Desktop: 0.0.33-nightly (Arch Linux, Hyprland/Wayland)
- Mobile app tries to connect to my relay environment (labeled "omarchy")
- Relay environment stays online in the desktop UI
- Error on mobile:
Failed to connect. Reconnecting... Reason: omarchy connection failed unexpectedly. - Same reconnect loop as described; LAN is not involved, it is the managed T3 Connect relay
No workaround found yet. Happy to provide logs/debug info if useful.
Note: This comment was generated with the assistance of AI.
Update: confirmed on today's nightly 0.0.33-nightly.20260808.1031 (Arch Linux, Hyprland). Debug info from desktop side:
- Relay tunnel healthy: all
POST https://prod-b95cbbcbc0586a4e.t3coderelay.com/api/t3-connect/health→200 - Desktop accepts connections fine:
SessionStore.verifyWebSocketTokensucceeds repeatedly;environment.cloud.readLinkState/relayConfig/applyRelayConfigall success - No connection errors in desktop traces (
ConnectionBlockedError,connection failed unexpectedly,could not establishall absent) - Backend logs
agent activity publishing standby; waiting for T3 Connect link reconciliationat every start
So desktop→relay is fine; the failure is on the mobile→relay leg (not captured in desktop logs). This matches the reported relay-side regression. Happy to share the trace files if useful.
Note: This comment was generated with the assistance of AI.
- Relay tunnel healthy: all
Note
🤖 Claude Opus 5.5 responding on behalf of Theo
Thanks for the report. One part of this is fixed on main in #5055. Please test on the nightly built from main on 2026-10-21, or on the next stable release. One part is still open: other relay connection-lifecycle failures and already-shipped mobile clients. If that part still matters to you, please open a new issue for that part only.
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
Same Issue on two devices.
Trace ID: 1c3d22c5b1f2f1e77db40e8ea289cf3b