[Bug]: T3 Connect link returns 504 Gateway Timeout from relay, client shows bare "failed" #16810
Steps to reproduce#
- T3 Code desktop 0.0.45 (Electron 44.4.2), macOS.
- Settings → Connections → enable T3 Connect for the local environment.
- The link challenge and the local link proof succeed; the final link request fails.
Actual behavior#
Toast: "Could not update T3 Connect - https://relay.t3.codes/v1/client/environment-links failed", with no reason.
DevTools shows the relay itself answered the POST with 504 Gateway Timeout (application/json, 43 bytes), roughly 9-10 s after the request was sent. 504 is not in RelayEnvironmentLinkErrors, so the client drops the reason.
- Trace ID (traceparent): 4684d7d140f34f0393d42744d240e207
- cf-ray: a46cb3018961253d-JNB
- Time: Wed, 07 Oct 2026 11:52:31 GMT
- Three earlier attempts the same day, within about 5 minutes starting 10:55 UTC, failed the same way.
Expected behavior#
The environment links, or the client shows the relay's reason.
juliusmarminge added labelsbug
juliusmarminge added labelsvia-triage
Same issue on macOS, and I captured it in DevTools. Every T3 Connect link attempt fails, and "retry later" hasn't helped for over 2 hours.
Relay response:
POST https://relay.t3.codes/v1/client/environment-linksreturns 504 with body{"error":"relay_request_deadline_exceeded"}. DevTools shows 9.14s spent waiting for the server response. Before it,environment-link-challengesreturns 200 in 117ms and the locallink-proofreturns 200 in 24ms. The request hadmanagedTunnelsEnabled: true, so managed-endpoint provisioning is a likely place for the stall.- traceparent:
00-a8c1832f40f900cb029407d9666b9b3c-0baf648c44f4bce6-01 - Trace ID:
a8c1832f40f900cb029407d9666b9b3c - Date: 2026-10-07 13:53:19 GMT
Environment
- T3 Code (Nightly) desktop app 0.0.46-nightly.20261007.2774, macOS 27.0 arm64
- The desktop app hosts the local server and the UI is in the desktop app
- DNS and the network to relay.t3.codes are fine, with no proxy
Repeated failures (local server trace). Each local
link-proofwas followed by the UI giving up about 9s later.relay-configis never reached.link-proof (UTC, 2026-10-07) gap to failure 11:27:12 9.2s 11:27:23 9.2s 11:29:31 9.4s 11:30:04 9.4s 11:31:01 9.2s 11:32:45 9.1s 13:42:30 9.6s 13:53:10 (DevTools capture) 9.16s The 11:27–11:32 attempts overlap the window in the original report. Separately, the Connections page shows this host as "Relay offline", and the client's relay discovery reports "Managed endpoint health request failed" for this host's previously linked managed environments.
Update: JNB appears in 3 of ~5 ray-ID'd reports of this 504 (#14155, the original report here, mine), but it has also been seen via DAR (#14070), FRA (#14070) and SIN (#7458). Since the relay runs as a Worker with Postgres behind Hyperdrive (per #15411), this may be round-trip latency from locations far from the database, multiplied across the link transaction, rather than a JNB-specific fault. Worth checking where the time goes in trace
a8c1832f40f900cb029407d9666b9b3c.Triaged via
t3 triageby Claude Code (Opus 5.5).- traceparent:
Same failure on Windows 11 with T3 Code (Nightly) desktop
0.0.46-nightly.20261008.2801on 2026-10-08. This adds another location: every Ray ID here is from ACC (Accra). That fits the far-from-database theory above, alongside JNB and DAR.What happens
- In Settings → Connections, enabling T3 Connect shows the "Could not update T3 Connect" toast and the inline error
https://relay.t3.codes/v1/client/environment-links failed. UI trace:0b6e749c068de20ccd71e665bd6cd7c8. - Authorizing with
t3 connect link --headlesssucceeds. After restarting the app, the server'sreconcileDesiredLinkretries every 10 to 40 s. Each attempt waits about 9 s, then fails.
Local server trace, 2026-10-08 UTC. From 03:19:45 to 03:34:30 there were 29 attempts: 28 returned HTTP 504 and 1 returned
managed_endpoint_provisioning_failed. A sample:Time Result Ray ID 03:19:45 HTTP 504 a472017dcd9eee08-ACC 03:21:41 HTTP 504 a4720450d8a06903-ACC 03:22:20 HTTP 504 a47205450b796903-ACC 03:28:42 HTTP 504 a4720e9dafe4ee08-ACC 03:29:17 environment_link_unavailable: managed_endpoint_provisioning_failednone 03:29:55 HTTP 504 a47210617b73ee04-ACC 03:34:30 HTTP 504 a472171989a56903-ACC One attempt finished before the 9 s deadline and returned
managed_endpoint_provisioning_failed. That points to managed-endpoint provisioning as the slow step.Ruled out on the client: There is no proxy, either system or WinHTTP. The local clock matches the relay's
Dateheader to within 1 s.relay.t3.codesanswers in about 0.1 s, and an unauthenticated POST gets the expected 401. The relay client, cloudflared 2026.5.2, is installed. Installing it first required working around the #16945 EBUSY bug.- In Settings → Connections, enabling T3 Connect shows the "Could not update T3 Connect" toast and the inline error
Follow-up to my comment above: turning on a VPN made the link succeed right away. This fits the theory that the relay times out because of location.
- Without a VPN, my requests were routed through Cloudflare's ACC (Accra) location. Every link attempt hit the relay's 9 s deadline. The last 504 was at 03:39:04 UTC, after 36 failed attempts from 03:19 onward.
- With a VPN on, re-enabling T3 Connect worked on the first try.
activateManagedTunnelsucceeded at 03:44:53 UTC and cloudflared started. - After I turned the VPN off, the managed tunnel stayed up. Requests to
relay.t3.codes/cdn-cgi/traceshowedcolo=ACCagain, andactivateManagedTunnelsucceeded again at 03:47:59. The VPN was only needed for thePOST /v1/client/environment-linksstep.
Workaround for anyone on a distant Cloudflare edge (Africa reports so far: JNB, DAR, ACC): connect a VPN, enable T3 Connect, and wait for "T3 Connect linked". You can then disconnect the VPN.
This points to the link transaction's round trips from distant locations as the cause, rather than a provisioning fault on any one machine. Raising the deadline for this endpoint, or cutting its database round trips, would probably fix it.
Same failure on Windows 11 with T3 Code (Nightly) desktop
0.0.46-nightly.20261009.2861on 2026-10-09. My requests to relay.t3.codes go through Cloudflare's JNB location (cf-ray: a47c31c3c8869997-JNB). The VPN workaround above fixed it for me too.What happened
- Settings → Connections → T3 Connect showed
https://relay.t3.codes/v1/client/environment-links failed, with no reason. - On each attempt the challenge step and the local link proof succeeded. The UI gave up 9.2 to 9.4 s after the link proof, and
relay-configwas never reached. This matches the relay's 9 s deadline.
Failed attempts (local server trace, UTC, 2026-10-09) Link proof at 08:55:52, 08:56:02, 08:56:21, 08:57:01, 08:59:30, 09:04:08, 09:11:57, 09:14:10 and 09:30:57. Each one failed about 9.3 s later.
How it started
- Up to 08:52:50 the managed tunnel was healthy, and relay health checks returned 200.
- At 08:55:46 a link succeeded in about 4.5 s.
applyCloudRelayConfigreceivedendpointRuntime: null, removedcloud-endpoint-runtime-configand stopped cloudflared. Publish agent activity was on, so this looks like the publish-only relink from #11899. The publish-only link was fast and every managed link after it timed out. That fits the theory that managed-endpoint provisioning is the slow step. - Every managed link attempt failed after that, including after I deregistered the environment in Account → T3 Connect and restarted the app.
VPN workaround
- With a VPN connected to a server outside Africa, the link worked on the first try. Link proof at 09:49:22 UTC,
relay-configapplied at 09:49:28 (about 6 s),activateManagedTunnelsucceeded at 09:49:30 and cloudflared started. - After I disconnected the VPN, requests went through
colo=JNBagain and the managed endpoint kept returning 200.
The relay request isn't in the local trace files, so I don't have relay trace IDs for the failed attempts.
- Settings → Connections → T3 Connect showed
Same issue on Windows 11 Pro, T3 Code desktop 0.0.45, from Réunion Island (
loc=RE), routed through Cloudflare JNB (colo=JNBonrelay.t3.codes/cdn-cgi/trace).POST /v1/client/environment-links→504 {"error":"relay_request_deadline_exceeded"}on every attempt.- No proxy and no VPN by default; the firewall and SmartScreen were ruled out.
- The VPN workaround worked: I connected to a European server, enabled T3 Connect, and it linked on the first try. The link stayed up after I disconnected the VPN.
That's one more JNB-routed report. +1 for raising the deadline on this endpoint or cutting its database round trips.
Same failure on Linux (CachyOS, x64), T3 Code desktop (server
0.1.0), on 2026-10-16. Cloudflare colo is again JNB (loc=ZA), so this is one more far-from-database report.What happens
- Publishing the environment right after signing in fails with:
https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504). Trace:9dc0b7ab26daa773539f90e7638739d7. The new client message with the trace ID shows up now, which helps. - Turning on T3 Connect in Settings also fails. Trace:
306d0eed63b2c3eaac45016252096b8c. - A full app restart doesn't help. After the restart, the local server creates
environment.cloud.linkProofsuccessfully,cloudflared2026.10.0 resolves fine, and no local spans fail. But nocloudflaredprocess is ever started. RelayEnvironmentDiscovery.refreshStatuslogs "Relay environment health check reported offline / Managed endpoint health request failed" for the previously linked managed endpoint. Traces:c94201623c5cdc2441a681d0f77c43c5(08:16 UTC) and1bdaa27b03639665a43522be4ecbb3e7(08:36 UTC). Requests to that managed endpoint get Cloudflare 530, meaning no tunnel origin is connected.- The network itself is fine:
relay.t3.codesanswers in about 60 ms from here.
Relay-side traces worth checking for the stalled child span inside
linker.link:9dc0b7ab26daa773539f90e7638739d7and306d0eed63b2c3eaac45016252096b8c.- Publishing the environment right after signing in fails with:
Same 504 on macOS 27.0, 2026-10-16 ~12:09–12:10 UTC, with and without "Publish agent activity". Cloudflare edge is VIE (Austria) — so not only distant colos. Trace IDs:
4400af80e0f2a3d0db0f4fcddc0e1ebb,b3e1cbf3120d29ae4898d36d0f4efbe1,d1b87d3eb372fc19005b3b7b4115ac2d.Same here, 504 on macOS 27.2 Beta, trace ID
283da36af8512fb314dd3a5a0ca5b458. On devices in this network that already had T3 Connect enabled from an earlier time, I can't turn it off. For newly provisioned devices, I can't turn it on.Additional macOS report on 2026-10-19, with the same provisioning error on a Mac Studio running the T3 Code desktop app (Beta). Settings reports server version 0.1.0 and “Up to date”.
Steps:
- Sign in to T3 Connect in the desktop app.
- Open Settings → Connections.
- Enable T3 Connect for the Mac Studio's local environment.
The toggle remains off and the following inline error appears:
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). Trace ID: b79ba94029983b0212b52659647f907fThe Mac Studio does not appear in Account → T3 Connect on another Mac signed into the same account. Two other environments are already listed there, and the existing connections work.
Expected: the Mac Studio is registered and becomes reachable from the other desktop through T3 Connect.
Impact: T3 Connect access to this Mac Studio is blocked. Exact macOS version, relay HTTP status, failing provisioning stage, and request timestamp are not available from the UI screenshot. Please inspect the relay trace above; the screenshot alone does not establish whether this has the same underlying cause as the 504 reports.
Additional Windows desktop report from 2026-10-19. Enabling T3 Connect under Settings → Connections repeatedly fails at
POST https://relay.t3.codes/v1/client/environment-links.Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).Trace IDs:
19eb6d731b51fc02bf3dc3f6a17f934c— managed Connect attempt after successfully registering an activity-only link.0cd18bbec7283d77d8c00733d5b7ca3a— provisioning failure after restarting the desktop app.938749d0dddaf3f761df21b27ff47de8— earlier relay HTTP 504.
Isolation checks:
- Direct LAN access from the Android app works.
- With T3 Connect off, enabling Publish agent activity succeeded and the CLI reported the environment link as provisioned with activity enabled. Enabling managed Connect after that still returned the provisioning error above.
- Local cloudflared is installed, version
2026.10.0.
These traces were captured on
0.1.1-preview.20261019.3339. I have since moved to the official0.1.1-nightly.20261019.3348; the traces above are from before that upgrade, not a fresh Nightly reproduction.Expected: enabling T3 Connect registers the managed endpoint so this PC is reachable outside the LAN. Please inspect the relay spans for these trace IDs to identify the failing provisioning stage or timeout. The client error alone does not establish whether these failures share the same underlying cause as the other 504 reports.
Same 504 on macOS 27.0 (arm64), T3 Code desktop app, server version 0.1.0 (latest stable), on 2026-10-19. Cloudflare edge is VIE (
loc=HU), the second VIE report after the one above, so this is not limited to distant colos.Steps: Settings → Connections → turn on T3 Connect. The toggle fails with:
https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504). Try again in a few minutes. If it keeps failing, copy the trace ID when you report it. Trace ID: 3229b86f8d96a41f54ac9db4d6058501- It failed both before and after a full app restart.
- Relay trace ID from the error above:
3229b86f8d96a41f54ac9db4d6058501 - Local
environment.cloud.linkProofsucceeded on every attempt (UTC): 11:06:23, 11:06:36, 11:07:48, and 11:49:31 after the restart. No local spans failed. relay.t3.codesanswers in about 60 ms from here, so the network is not the bottleneck.
Please check the relay span tree for the trace above to see which child span of
linker.linkstalls.Triaged via
t3 triageby Claude Code (Opus 5.5).Another report from 2026-10-19, on a headless Linux background service (systemd). The link request hits the same 504 on every attempt, and since 12:45 UTC it hasn't succeeded once.
Environment
- Server version
0.1.1-nightly.20261019.3360(background service,t3code.service). The bug happened on this build. The last connection through the relay that worked was at 06:53 UTC, from a desktop client on0.1.1-nightly.20261019.3348. - Linux x64 (kernel 7.0.14 PVE), Node v26.8.2, managed
cloudflared 2026.10.0. - Cloudflare edge: FCO in the morning, MXP from about 12:00 UTC (Italy).
What happens
POST https://relay.t3.codes/v1/client/environment-linkstakes about 9.2 s, then returns HTTP 504. Building the local link proof (environment.cloud.makeLinkProof) succeeds on every attempt.- The client reports
RelayRequestError: T3 Connect relay returned HTTP 504 without a recognized error response, which means the 504 body didn't decode asRelayProtectedError. Other reports here quote the relay's own message ("Relay timed out before it finished the request (HTTP 504)"), so on at least some attempts the 504 is reaching the client without the relay's error body. t3 connect status:Exposure: enabled · Authorization: stored credential · Environment link: pending server startup · Relay: not provisioned. The app says the relay has no active link to use this device as a T3 service server.- The environment's managed endpoint (
prod-1a6f9f0ca3c59e7a.t3coderelay.com) returns 530 / error 1033. That's expected, because the link never provisions and socloudflarednever starts. It could easily be mistaken for the cause.
Timeline (UTC) and Cloudflare Ray IDs
- 07:08:14, first failure in the trace window:
a4cdf34eeff6ea50-FCO - 07:26, startup reconcile failure:
a4ce0dde5f2fea41-FCO - 12:19, startup reconcile failure:
a4cfba6d8ac64c6e-MXP - 12:37:46:
a4cfd607c923d815-MXP - 12:43, I unlinked and re-enabled T3 Connect, and the service restarted at 12:45. Every attempt since then has failed. The last was at 12:54:49:
a4cfef02dadf59ad-MXP. - About 120 failed attempts between 07:00 and 12:55. None succeeded.
Client-side note. The startup reconcile retries for only 10 minutes (
Schedule.upTo({ duration: "10 minutes" })inapps/server/src/server.ts, unchanged onmain). Once that time is up, a headless service stays unlinked even after the relay recovers, until someone runst3 service restart. For headless installs, a slower retry that keeps going after the first 10 minutes would let them recover on their own.- Server version
Another macOS desktop report from 2026-10-19. Enabling T3 Connect has failed for about two hours with the provisioning error, not the 504:
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). Trace ID: 3ef73351ac7c8e871690fa012d974d15Environment
- T3 Code (Beta) desktop 0.1.0, server version 0.1.0
- macOS 26.3 (25D125), arm64
- Cloudflare edge: MUC (
loc=DE) - Environment ID (for relay log lookup):
257af7f7-beb5-40cd-8bfc-9ebb6122364f
What the local logs show for the attempt above, at 13:04:22 UTC:
clientRuntime.managedRelaySession.readClerkTokensucceeded (412 ms).environment.cloud.makeLinkProof/environment.cloud.linkProofsucceeded.- No local span failed. The error comes back from the relay on the
environment-linksPOST.
Isolation checks
relay.t3.codesanswers in about 50 ms from here.- An unauthenticated POST to the same endpoint returns
401 auth_invalid, so the failing request passes relay auth and fails later, at managed-endpoint provisioning.
Please check the relay span tree for the trace above to see which provisioning step fails.
Same failure on macOS today (2026-10-19). It is still ongoing and every attempt fails.
Environment
- T3 Code (Nightly) desktop
0.1.1-nightly.20261019.3360, macOS 27.0, arm64 (Mac mini M4) - Cloudflare colo: HAM (Hamburg), e.g.
cf-ray: a4d021c67fe8e474-HAM. That adds a European location to the JNB/ACC/DAR/FRA/SIN list. - The network is fine. DNS + TLS + response from
relay.t3.codestake <50 ms, and an unauthenticatedPOST /v1/client/environment-linksreturns 401 in about 30 ms.
What happens
- The UI shows
https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504). - The local server's
environment.cloud.reconcileDesiredLinkWithretries about every 40 s. Each attempt fails after about 9.0–9.2 s with:RelayRequestError: T3 Connect: Relay environment link is unavailable: managed_endpoint_provisioning_failed. Trace ID: 0672233e70357593cb0c137615614976 - The logs show 58 consecutive failures since about 12:30 UTC and zero successes. The local steps (
cloud.cli_token.read,readEnvironmentKeyPair,environment.cloud.makeLinkProof) all succeed within a few ms. Only the relay call fails.
The UI-side 504 and the server-side
managed_endpoint_provisioning_failedboth hit the 9 s relay deadline. That points to managed-endpoint provisioning as the step that stalls.- T3 Code (Nightly) desktop
Same 504 on Linux (Ubuntu 26.04, x86_64), T3 Code desktop 0.1.0 (stable
.deb), on 2026-10-19.Settings → Connections → T3 Connect fails with
Relay timed out before it finished the request (HTTP 504).- Trace IDs:
c3f6d4920785b47afd108f68b8106f14(~15:03 UTC),6aaac84c557a2f3ba599c95afd9035ae(~15:36 UTC) - Cloudflare edge: WAW (
loc=UA) - Network is fine: DNS and TLS to
relay.t3.codesare fast, and an unauthenticatedPOST /v1/client/environment-linksreturns 401 in ~0.1 s. - No orphaned
cloudflaredrunning, so this isn't #21701. - Tailscale HTTPS works as a workaround in the meantime.
- Trace IDs:
Another reproduction on 2026-10-19, this time on a Raspberry Pi 4B (4 GB RAM) running Raspberry Pi OS Lite (ARM64), using the standalone T3 Code CLI as a headless systemd service.
Environment#
- OS: Raspberry Pi OS Lite 64-bit, kernel
6.18.50+rpt-rpi-v8(aarch64) - T3 Code:
0.1.0(stable) - Service:
t3code.service(systemd user service) - Managed
cloudflared:2026.10.0(linux-arm64) - Cloudflare edge: TXL (Berlin, Germany)
Behavior#
t3 connectauthorization succeeds, but the environment never appears in my other T3 Code clients.t3 connect statusreports:Exposure: enabled Authorization: stored credential Environment link: pending server startup Relay: not provisionedThe background service is healthy (
active (running)), and T3 Code successfully starts its local server on127.0.0.1:3773.After approximately 10 minutes of startup reconciliation, the service logs:
Failed to reconcile T3 Connect desired link on startup RelayRequestError rejection: unavailable T3 Connect relay returned HTTP 504 without a recognized error response. Cloudflare Ray ID: a4d0dacffb1caca7-TXLTimestamp: 2026-10-19 17:35:57 CEST (15:35:57 UTC)
Connectivity checks#
A direct request from the Pi to
https://relay.t3.codes/succeeds:- DNS resolution succeeds over IPv4 and IPv6.
- TLS 1.3 handshake and certificate verification succeed.
- HTTP/2 response:
302redirect to/docs. - The successful request used the TXL Cloudflare edge as well.
Restarting the background service did not immediately resolve the issue. The same pending/unprovisioned state persisted during subsequent attempts.
Only one other environment is currently registered to my T3 Connect account, so the account's environment limit should not be involved.
- OS: Raspberry Pi OS Lite 64-bit, kernel
Another reproduction on 2026-10-19, macOS desktop (Nightly), Cloudflare edge GRU (São Paulo,
loc=AR). That adds South America to the list of affected colos, so this does not look edge-specific.Environment
- T3 Code (Nightly) desktop, server version
0.1.1-nightly.20261019.3360. The bug happened on this build. - macOS 27.0.1, arm64
- Environment ID (for relay log lookup):
fdcd5cd3-45b3-493f-97dd-e4a0cd14182f
What happens
- Settings → Connections → turn on T3 Connect fails with:
https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504). Try again in a few minutes. If it keeps failing, copy the trace ID when you report it. Trace ID: 5a718bf72b8b19eacc6e061fc1af0b4c - It fails the same way after a full app restart and a manual retry.
Local evidence (
server.trace.ndjson, retry at ~16:00 UTC)cloud.cli_token.read,readEnvironmentKeyPairandenvironment.cloud.makeLinkProofall succeed within a few ms.environment.cloud.reconcileDesiredLinkWiththen fails after 9230 ms:RelayRequestError: T3 Connect relay returned HTTP 504 without a recognized error response. Check relay access and any proxy or firewall restrictions, then restart T3 Code. Cloudflare Ray ID: a4d0feac3c3fd7b2-GRU.- The network is fine. An unauthenticated
POST /v1/client/environment-linksreturns 401 in ~0.13 s, and the local server answers/.well-known/t3/environmentwith 200.
IDs for relay logs
- Trace ID (first attempt):
5a718bf72b8b19eacc6e061fc1af0b4c - Cloudflare Ray ID (retry):
a4d0feac3c3fd7b2-GRU
Filed by Claude Code (claude-opus-5-5), following the
t3 triageplaybook.- T3 Code (Nightly) desktop, server version
Another reproduction on 2026-10-19, macOS desktop (Nightly), Cloudflare edge CGK (Jakarta,
loc=ID). That adds Southeast Asia to the list of affected colos.Environment
- T3 Code (Nightly) desktop, server version
0.1.1-nightly.20261019.3360. The bug happened on this build. - macOS 27.0, arm64
- Environment ID (for relay log lookup):
7af0657d-a40e-4864-a254-652481d183d8
What happens
- The environment was linked and working. At 15:54:30 UTC I unlinked it, and since then turning T3 Connect back on fails every time:
https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504). Try again in a few minutes. If it keeps failing, copy the trace ID when you report it. - Trace ID:
ff9c35f7b6f07cfcbb9336338695ec47 - In the local server trace,
environment.cloud.makeLinkProof/linkProofsucceed on every attempt (15:54:42, 15:55:07, 15:55:27, 15:56:00 UTC), andenvironment.cloud.relayConfigis never reached.
Earlier relay errors on the same environment. Just before this, from 15:46:01 to 15:47:52 UTC, the existing managed tunnel's
registerManagedCloudTunnelRecoveryfailed 7 times withRelay internal error: upstream_unavailable. The relay returns that code forManagedEndpointProvisioningFailedandManagedTunnelLimitExceeded(Api.ts:1320-1325), so it points at the same provisioning stall. It recovered by itself at 15:48:29. Trace IDs:55cc042c413f3e8501b748ff83622105,fce2ddc6aef3e5eaa4cd067eeb13a155.Network is fine:
relay.t3.codes/healthreturns 200 and DNS resolves normally.
Triaged via
t3 triageby Claude Code (Opus 5.5,claude-opus-5-5).- T3 Code (Nightly) desktop, server version
Another macOS desktop report from 2026-10-19, Cloudflare edge DUS / TXL (Germany). It started at least at 13:34 UTC and still fails at 16:52 UTC.
Environment
- T3 Code (Beta) desktop 0.1.0, server version 0.1.0
- macOS 27.0.1 (26A434), arm64
- Managed
cloudflared2026.10.0, one process only (not #21701) - Environment ID (for relay log lookup):
f50b7595-0527-4f9b-ab7f-73b115b78331
What happens
- Settings → Connections → T3 Connect shows:
https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504). Trace ID:915679f6a7da1f901ab53200ba0a0499 - The iOS app shows:
Relay could not reach the environment endpoint (endpoint_request_failed). Trace ID:721b263452a3de62452c97884b0c01a1 environment.cloud.recoverManagedCloudTunnelandregisterManagedCloudTunnelRecoveryfail on every retry withupstream_unavailableor HTTP 504 after about 9.1 s. Trace IDs:50b31e065102ef92fb40fe4af1afa83c,2ee8c868fc143aafa0d028140b98fa8b,af4ce03ca60556ec1421233fd79a00a5,eb579178aff8c72f6812e16f50393bac,238c0cee3ea13737a26b5d4b7f3c8e39. Cloudflare Ray IDs:a4d0afab4e5203e4-TXL,a4d0a104fd43f95c-DUS- The
cloudflaredmetrics showtunnel_register_fail{error="server_error",rpcName="registerConnection"}on each attempt, and/readyreturnsreadyConnections: 0 - The managed hostname
prod-91752008445b2bf7.t3coderelay.comreturned 530 at 15:06 UTC. At 16:48 UTC it returns NXDOMAIN
Isolation checks
https://relay.t3.codes/healthreturns 200 in 0.3 s- TCP to
region1.v2.argotunnel.com:7844connects - A full app restart at 16:46 UTC did not help
Another macOS desktop report from 2026-10-19. Cloudflare edge is BOM (Mumbai,
loc=IN), the first India report here.Environment
- T3 Code (Beta) desktop 0.1.0
- macOS 27.0.1, arm64
- Environment ID (for relay log lookup):
ad9742d7-e12e-4c6b-88b8-5a105e86b818
What happens Settings → Connections → turn on T3 Connect fails on every attempt:
https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504). Try again in a few minutes. If it keeps failing, copy the trace ID when you report it.Trace IDs:
18f2c341b29c9ca9f8b629a6e14a0633,6caba51d7d66d1179f17f422956500a9The network is fine: requests to
relay.t3.codesreturn in about 50 ms. The local logs show no client-side failure.Another reproduction on 2026-10-19, Windows 11 desktop with a desktop-managed WSL2 backend. Cloudflare edge AMS. This adds data points for tunnel recovery registration and for unlink/relink during the outage.
Environment
- T3 Code (Beta) desktop 0.1.0 on Windows 11 (build 26300), WSL 2.6.3
- Desktop-managed WSL2 Ubuntu backend, server 0.1.0
- Managed
cloudflared2026.7.3 (WSL) and 2026.10.0 (Windows) - Two environments on one account are linked to T3 Connect: the Windows primary and the WSL backend
What still works
- The Windows environment's existing tunnel keeps serving requests (cloudflared metrics: 11 of 13 requests answered 200), even though its recovery registration fails (see 1).
What fails (times in UTC)
- Tunnel recovery registration (
POST /v1/environments/<id>/tunnel/recovery) from both environments returnsRelayRequestError: T3 Connect: Relay internal error: upstream_unavailable, occasionally HTTP 504. Each attempt takes 8.4-9.6 s.- WSL: continuous from 14:30 to 15:36. Trace IDs
e4a687394ba7c208621dcdda91b64d09,9f4e364f8140215b1cdb8d7608d4ba9a. - Windows: 14:30 to 16:10, with one success at 15:15:09 that took 1.8 s. Trace IDs
cf8fea5f906766b9f00a1c20e2e22f34,34de1c33e99f916acb6df208d512f16a. - The WSL backend's origin port had changed (3773 → 3774). Because registration never succeeded, the relay never moved the ingress, so cloudflared kept forwarding to the dead port (13 of 13 tunnel requests failed). Web and mobile showed
endpoint_request_failed. That is the #7458 symptom, but here the relay itself refused the move.
- WSL: continuous from 14:30 to 15:36. Trace IDs
t3 connect unlink(CLI, between 16:01 and 16:07): the relay DELETE returned 504, thenupstream_unavailable(trace58220965359669cc98d116782f9b16a2). The local link state was cleared anyway: the desired link is off and the stored connector runtime config is removed.t3 connect link --headlesssucceeded. On the next server start the server's relink (POST /v1/client/environment-links) failed for the whole 10-minute retry window: 3× HTTP 504, thenmanaged_endpoint_provisioning_failed. Each attempt took 9.0-9.4 s. Trace IDs, 16:07-16:17:8e234ecab73c5233febcc5546c6b3db9,642fa32cbc41c3bd377bf5434051437b,45e8326485072f1ebfc2d70aabe38f1e,e44088cccad4f840cc46536b2c5bfbdb,43c7512d799c380c4b242faca204b7a1,8ef8052b34c9c08a8b36924a8d28738e. After the window the server stops retrying until it is restarted.
Note for others hitting this: don't unlink while the relay is failing. Unlink removes the local link and connector config first and treats the relay-side revoke as best effort. An environment that is still linked (and may still have a working tunnel) then loses remote access, with no way back until provisioning works again. It would help to warn before unlinking, or to keep the local config when the relay call fails.
I can provide environment IDs for relay log lookup if needed.
Another macOS report from 2026-10-19, this time a headless background service (
t3 servevia the service launcher under launchd), US East Coast, Cloudflare edge BOS.Environment
- T3 Code server
0.0.46-nightly.20261014.3132, macOS arm64 (MacBook Air) - Managed
cloudflared2026.10.1 - Environment ID (for relay log lookup):
9434c2ac-db13-448b-b7e6-1ac939d81180
What happens
- Started failing at about 16:57 UTC and still fails at 17:25 UTC.
environment.cloud.reconcileDesiredLinkWithfails on every retry (about every 40 s), alternating between:Relay environment link is unavailable: managed_endpoint_provisioning_failed(trace ID343a263401e293bcf5b5fbaf701052f7)T3 Connect relay returned HTTP 504 without a recognized error response(Cloudflare Ray IDsa4d15224fec3d83f-BOS,a4d1531a88dc7d47-BOS,a4d154105d0d8f8b-BOS)
- The cloudflared connector is never started, so there's no tunnel. The remote desktop client shows
Relay rejected the environment connection request (managed_endpoint_provisioning_failed). t3 connect unlinkcouldn't revoke the relay-side record:Relay internal error: upstream_unavailable(trace ID94131a2446d635dd86e9ff68aa332f34)
Isolation checks
https://relay.t3.codes/healthreturns 200t3 connect unlinkfollowed byt3 connect linkand a service restart didn't help- A throwaway server with a brand-new environment ID and the same stored authorization fails identically, so it isn't per-environment state
- Direct access to the same server over Tailscale works fine
- T3 Code server
Another reproduction on 2026-10-19, Linux (CachyOS, x64), standalone CLI as a headless systemd user service. Cloudflare edges: PDX / SJC / DFW (US), so another US data point.
Environment
- T3 Code
0.1.0(stable), installed withinstall.sh, running ast3code.service(systemd user unit, linger enabled), bound to127.0.0.1:3773 - Managed
cloudflared2026.10.0, never started - Two other environments on the same account (Windows and macOS desktop) were linked before today, and their tunnels keep working
What happens
t3 connectwith headless device authorization succeeds and installs the background service.- Once the service is running, every
environment.cloud.reconcileDesiredLinkWithretry has failed since 17:44 UTC. That's 27 attempts through 17:57 UTC with no successes, each taking about 8.3 to 9.4 s:- 19 ×
Relay environment link is unavailable: managed_endpoint_provisioning_failed - 8 ×
T3 Connect relay returned HTTP 504 without a recognized error response
- 19 ×
- Local spans (
cloud.cli_token.read,environment.cloud.makeLinkProof) succeed in a few ms. Only the relay call fails. t3 connect statusstays atEnvironment link: pending server startup · Relay: not provisioned.t3 connect unlink, thent3 connect link --headless, thent3 service restartat 17:47 UTC didn't change anything.
IDs for relay log lookup (UTC)
Time Result ID 17:44:32 managed_endpoint_provisioning_failedtrace d9af06cf7c036302c70af1a65078bc0917:45:45 managed_endpoint_provisioning_failedtrace 86fd6b01f1ea244c662fea06088bb4e717:46:24 HTTP 504 Ray a4d19a1f290f23a3-PDX17:47:10 managed_endpoint_provisioning_failed(after unlink, relink and restart)trace 4aed897f5f8eeb422632d75d8239bb6717:51:38 HTTP 504 Ray a4d1a1cd9922eb28-SJC17:56:50 managed_endpoint_provisioning_failedtrace cfa3ba5266a75dbcd846c8801526f33717:57:29 HTTP 504 Ray a4d1aa5aea11e912-DFW- T3 Code
Another reproduction on 2026-10-19: Linux x64 VPS (Hetzner, Germany), headless
t3 serveunder systemd (t3 __service-launcher), server0.0.46-nightly.20261013.3066, managedcloudflared. This matches the headless-service reports above (qtech-dev, VoltVoks) and adds an outage that began earlier in the day.What happens
- The environment was linked and its tunnel was working. Our external probe against the managed endpoint host started returning Cloudflare 530 (both IPv4 and IPv6, from outside and from the VPS itself) at about 00:18 UTC, and still does at 18:30 UTC.
t3 serveitself is healthy and listening on127.0.0.1:3773. - Since a server restart,
environment.cloud.reconcileDesiredLinkWithfails on every retry (about every 80 s, ~9 s each):RelayRequestError: T3 Connect: Relay environment link is unavailable: managed_endpoint_provisioning_failed. 416 failures in the trace files still on disk (oldest 14:07 UTC; older files rotated out), no successes. The app shows "Reconnecting: The environment's T3 Connect tunnel is still being set up." - No
Registered tunnel connectionline from cloudflared since 03:29 UTC. - Toggling T3 Connect off and on in the desktop app changes nothing.
Environment ID (for relay log lookup):
193cc672-5f6e-49b9-88c6-e064ca687e11Trace IDs (18:16 to 18:19 UTC):
85022457d018f8bd5495242cb116cfd9,4e3af5e687bebd940e16e8b9469ef915,d12cf1fef9420c8fb8f25aa19b7c4c48,b4eac10e1c8973f5be31b8d19bc30014Isolation: Cloudflare's edge is reachable from the VPS, load and memory are normal, and direct access over Tailscale works.
Side effect worth knowing about: we run a watchdog that restarts the server when the tunnel probe fails. During this outage every restart triggers a fresh recovery attempt that also fails, and each restart kills running agent turns. So a relay-side provisioning outage turns into repeated local restarts. We are changing our watchdog to stop doing that. It might be worth documenting for others what a client should do while
managed_endpoint_provisioning_failedpersists (back off, keep serving locally).- The environment was linked and its tunnel was working. Our external probe against the managed endpoint host started returning Cloudflare 530 (both IPv4 and IPv6, from outside and from the VPS itself) at about 00:18 UTC, and still does at 18:30 UTC.
Adding a diagnosis rather than another failure report. Source references are from
v0.1.1-nightly.20261019.3360.The timing suggests a Cloudflare API call is hanging, not the database or the relay. Host: WSL2 systemd service, Cloudflare edge AMS/LHR. Its stored tunnel was reaped (
Unauthorized: Tunnel not found). 47 consecutiverecoverManagedCloudTunnelcalls from 17:02 to 18:29 UTC all failed:- Most returned
upstream_unavailableafter 8.5–9.06 s. A few returned HTTP 504 after just over 9 s. - Each relay Cloudflare client call has an 8 s timeout (
infra/relay/src/environments/ManagedEndpointProvider.ts:1354–1486), and the request deadline is 9 s (infra/relay/src/http/Api.ts:167). provisionruns two DB steps (check-tunnel-limit,reserve-allocation), thentunnels.list→tunnels.create→putConfiguration→ DNS → token, in sequence.- A result of
upstream_unavailableat about 8.5–9 s means one Cloudflare call timed out at 8 s after less than 1 s of DB work. If the DB were stalling, the requests would hit the 504 deadline instead. So the stall is most likely theensure-tunnelstage (tunnels.listby name, ortunnels.create). The relay'sManagedEndpointProvisioningFailedspans withstage: "ensure-tunnel"should confirm it.
Cloudflare reads still work. During the same period,
registerManagedCloudTunnelRecoverysucceeded twice, in 1.2–1.6 s (17:44:04 and 18:19:10 UTC). That path callstunnels.get(verify-tunnel) and correctly returnedrecovery_required. So the API token, relay→Cloudflare connectivity and single-tunnel reads were healthy. Only the list/create path was timing out. Cloudflare's resolved "DNS Update Delays" incident (11:28–11:50 UTC) happened just before the onset in this thread. That may or may not be related.Why this fails so hard: five or more serial Cloudflare calls with 8 s timeouts each run inside one 9 s budget. One slow call fails the request, and every affected host retries without limit: link reconcile about every 40 s, tunnel recovery every 2 min. Moving provisioning out of the request path, or at least giving it a longer deadline, would make it less brittle.
Two smaller bugs found along the way:
recoverManagedEndpointandregisterManagedEndpointRecoverymapManagedTunnelLimitExceededtoupstream_unavailable(Api.ts:1325,:1362). The link path maps it to a proper limit error (Api.ts:889). A host that's over its tunnel limit would therefore show "relay unavailable" forever instead of "deregister an environment".- On the host,
recoverManagedTunnelinapps/server/src/server.tsretries relay failures without limit. ItsFailed to recover the T3 Connect managed tunnelwarning is never reached. The service log only shows the rejection and restart loop, and the real error appears only inserver.trace.ndjson.
Relay trace IDs to check:
1abe183924bf8191cadc8f81bde4a0af,d1170b5c30a6afe4d24e4b15d4c6e526(upstream_unavailable). Cloudflare Ray IDa4d1cd1a2fd93771-LHR(504).Triaged via
t3 triageby Claude Code (Opus 5.5).- Most returned
- Problem: T3 Connect fails at
https://relay.t3.codes/v1/client/environment-linkswith “Relay timed out before it finished the request (HTTP 504).” - Date: 19 October 2026
- System: Debian GNU/Linux 13 (trixie)
- Installation: AppImage
- Version: T3 Code 0.1.0
- Problem: T3 Connect fails at
Another reproduction on 2026-10-19: headless Linux, new install, first link attempt (never linked before on this machine).
Environment
- T3 Code
0.1.0(stable), Ubuntu Server 26.04.1 LTS (x64, kernel 7.0),t3code.serviceas a systemd user unit (linger enabled), bound to127.0.0.1:3773 - Managed
cloudflared2026.10.0 installed byt3 connect link --headless; never started - Network: Greece (Athens-area ISP), IPv4. Other environments on the same account (an Android phone and a Linux VPS) were linked on 2026-10-18 and keep working
What happens
t3 connect link --headlesscompletes ("Authorized as ...");t3 connect statusthen stays atEnvironment link: pending server startup/Relay: not provisioned- After each service restart,
environment.cloud.reconcileDesiredLinkWithfails withRelayRequestError: T3 Connect relay returned HTTP 504 without a recognized error response - 20+ consecutive failures between 19:04 and 19:11 UTC, every one ending at 9.1–9.3 s (the relay's 9 s deadline), so it matches the
POST /v1/client/environment-linksstall described above - Cloudflare colos moved over the window: ATH (19:04–19:08), then MXP (19:08–19:10), then SOF (19:10)
Ray IDs (sample):
a4d20ce868e00b7e-ATH,a4d20dbf9e0ea13c-ATH,a4d20f1b1c186f5b-ATH,a4d211affc00ee6f-ATH,a4d212a54bb2eea7-MXP,a4d214678a12edda-MXP,a4d2156c8fa0ed49-MXP,a4d21609ca533e98-SOFRelated symptom, same time window: from the Android app, deregistering a stale, no-longer-existing environment (T3 Connect > Registered servers > Unlink) fails with "Could not unlink relay environment", Trace ID
5cedf121a0fee89c4583da7e831324da. So unlink appears to hit the same backend problem, which leaves a dead entry that cannot be removed while the outage lasts.I have not tried the VPN workaround yet; will report back here if I do.
- T3 Code
Another report from 2026-10-19, macOS desktop app (Beta 0.1.0), on an environment that was linked and working until Sunday. Two things I haven't seen in the thread yet: trace IDs for the HTTP 504 attempts, and
t3 connect statusreportingprovisionedwith no tunnel running.Environment
- T3 Code (Beta) desktop
0.1.0, macOS 27.0.1 (arm64), app-hosted server, managedcloudflared2026.10.0 - Cloudflare colos in the Ray IDs: MRS and CDG
- Host clock within a few ms of NTP, so not a clock-skew case
Timeline (UTC)
- 2026-10-18 12:30: last successful link. The relay link files in T3's local state were all written at that time, and remote access from the iOS app worked up to then.
- 2026-10-19 09:09: first app start of the day. The server trace for that start has rotated out, but the link files were never rewritten,
cloud-endpoint-runtime-configis missing, and nothing showscloudflaredstarting, so the startup relink must have failed. The managed endpoint hostname returns Cloudflare 530 / error 1033 from outside. - 2026-10-19 18:32–18:33: the iOS app shows
Relay could not reach the environment endpoint (endpoint_request_failed), Trace IDs11f04f1ef6b533b811393ba30facdb89andb78835bc472d67c7d522b88742dd9708. - 2026-10-19 19:12:50: clean app restart (normal quit).
startManagedCloudTunnelIfOriginConfirmedreturns in 8 ms and nocloudflaredis started. Then everyenvironment.cloud.reconcileDesiredLinkWithattempt fails after 9.1–10.1 s: 20 attempts between 19:13:07 and 19:23:34 (15 × HTTP 504, 5 ×managed_endpoint_provisioning_failed), 0 successes, then the 10-minute startup window closed and the server stopped retrying. The first eight:
Time (UTC) Result Trace ID (local span) Ray ID 19:13:07 managed_endpoint_provisioning_failed27d28c7835110db448febb43cddf7669– 19:13:17 HTTP 504 dcfd5a1d5f253248b10e97460dd4c407a4d219678fd5e1a2-MRS19:13:29 HTTP 504 54e25867fdd51f717497a434afc8e2aaa4d219b2bc48e1a2-MRS19:13:43 HTTP 504 8561a4f781a6a36379b880723af07017a4d21a057bfee1ed-MRS19:14:00 managed_endpoint_provisioning_failedf6a34c83ef8d33a6b7031c0c5a3a73dd– 19:14:25 HTTP 504 c9de92620d8cbc3e6d89bd3c3f90ad25a4d21b0ea8a97e8b-MRS19:15:04 HTTP 504 be6e6e667bf3d6908a0a9bcd55bf692ca4d21c040b79f4c0-MRS19:15:43 HTTP 504 9497e68435636fdde1612fc400ec0061a4d21cf8f9de20a1-CDGOn the
managed_endpoint_provisioning_failedattempts, the Trace ID in the relay's error body is identical to the local span's trace ID, so the relay appears to keep the client's traceparent. If that holds, the trace IDs on the 504 rows are the relay-side ones too, which the 504 body doesn't carry.Two client-side notes
t3 connect statusreportsEnvironment link: provisionedandRelay client: available via managed installthe whole time, whilecloud-endpoint-runtime-configis gone, no connector is running, and the app's own relay discovery logsRelay environment health check reported offline. The status seems to come from the stored relay credential rather than from the runtime config, so a desktop install that was linked before the outage looks fine from the CLI even though it is in the same state as the headless reports (pending server startup).- As far as I can tell from the code and from my trace, the desktop app releases the managed tunnel on every normal quit (
releaseManagedTunnelOnShutdown) and relinks at the next start. During the outage, a plain app restart is therefore enough to lose a working link without touching anything else. Same family as the "don't unlink" note above.
I haven't tried the VPN workaround yet.
- T3 Code (Beta) desktop
Another report from 2026-10-19, macOS desktop app.
Environment
- T3 Code (Beta) desktop
0.1.0 - macOS 26.6.2 (arm64)
Error
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). Trace ID: fc486414a30febaba06897b9e79ffd77relay.t3.codesis reachable from this machine, and no proxy is set.- T3 Code (Beta) desktop
Another reproduction on 2026-10-19: Windows desktop app with a desktop-managed WSL2 backend, Cloudflare edge TLV (
loc=IL). The environment was linked and reachable from the mobile app until the host rebooted. Since then it can't relink.Environment
- T3 Code desktop with WSL2 backend, server version
0.1.1-nightly.20261019.3373. The bug happened on this build. Earlier failures on 2026-10-18 were on0.0.45and earlier WSL bundles. - Linux x64 (WSL2 kernel 6.18), Node v26.8.2
- Connecting from: mobile app (T3 Connect)
Timeline (UTC)
- 2026-10-18 17:32 and 17:35: the last two successful
environment.cloud.reconcileDesiredLinkWithcalls. Trace IDs56bef2040b4407d0eb97b56d5a1e090eand82fbe931d830306129061137cdfe270d. - 2026-10-18 18:02: the server shut down and
releaseManagedTunnelOnShutdownreleased the tunnel. The host then rebooted. - From 2026-10-18 17:33 to 2026-10-19 20:46, 58 consecutive link attempts failed. Each one: the challenge succeeds,
makeLinkProofsucceeds, thenPOST /v1/client/environment-linksreturnsHTTP 504 without a recognized error response.- Latest: Ray
a4d2a1dc1eb7b2ed-TLV, trace112427ac43ca3ecc6f3bb876f3719df0, at 20:46:26 - Ray
a4d2a0e70b52e8b9-TLV, trace570b39bd6c77e6d7bd4e496f8857748d, at 20:45:47
- Latest: Ray
- The managed endpoint host returns Cloudflare 530, and no
cloudflaredprocess is running.startManagedCloudTunnelIfOriginConfirmedhas no stored runtime config to start after the shutdown release.
Note: releasing the tunnel on every shutdown means any restart during this outage takes a working environment offline until the relay recovers, even if it was linked and healthy before. A host reboot is enough.
Environment ID (for relay log lookup):
f3d2c8e8-6949-47e8-8ea6-0bc00d6c8d43Found by
t3 triagewith Claude Code (Opus 5.5,claude-opus-5-5).- T3 Code desktop with WSL2 backend, server version
Note
🤖 gpt-6.1-sol reporting on behalf of NikitaMGrimm
Another reproduction on 2026-10-19, on a headless Linux ARM64 server running T3 in Docker. Direct Tailscale access works; the T3 Connect route reports
endpoint_request_failed.This is a personal fork build, version
0.1.1-nightly.20261019.1792440272094, source revision4b6d1a61da75682a3f4a9df1c04d27dc8bb4159e, with managed cloudflared2026.10.0.The server's automatic startup link attempts repeatedly returned HTTP 503 and 504. A fresh attempt through the normal link handshake, using Node fetch for the relay requests, confirmed:
POST /v1/client/environment-link-challenges: 200- Local
POST /api/connect/link-proof: 200 POST /v1/client/environment-links: 503, with:
{ "_tag": "RelayEnvironmentLinkUnavailableError", "code": "environment_link_unavailable", "reason": "managed_endpoint_provisioning_failed", "traceId": "e6a6bd2048be5551f2149045d04352c8" }Cloudflare Ray ID:
a4d2a8f5a98ad2b6-FRA.The saved state is authorized, linked, not revoked, and requests a managed tunnel, but
cloud-endpoint-runtime-configandcloud-endpoint-confirmed-originare absent and no cloudflared process is running. The live link-state API reportsmanagedTunnelActive: false.The retry did not restart the server or unlink the environment. Direct Tailscale HTTPS and the deployment's targeted T3 runtime validation still pass. Posting the trace here for relay-side provisioning investigation.
Another reproduction on 2026-10-19: WSL2 Ubuntu (mirrored networking), headless
t3code.servicesystemd user service, Cloudflare edge AMM (Amman). This is a first-time link of a new environment. Other environments on the same account were linked earlier (a Windows-side install on the same laptop on 2026-10-16, and a desktop PC), and they are still listed in the app.Environment
- T3 Code server
0.1.0(stable). The bug happened on this build. - Linux x64 (WSL2 kernel 6.6.87.2), Node v26.8.2, managed
cloudflared2026.10.0, installed byt3 connect link --headless; never started - Connecting from: Android mobile app via T3 Connect
- Environment ID (for relay log lookup):
9e56951a-98c4-42dc-9a54-61b5eae427f9
What happens
t3 connect link --headlesscompletes (device flow approved). Aftersystemctl --user restart t3code,t3 connect statusstays atExposure: enabled · Authorization: stored credential · Environment link: pending server startup · Relay: not provisioned.- On each attempt,
environment.cloud.makeLinkProofsucceeds, thenenvironment.cloud.reconcileDesiredLinkWithfails after 9.0–9.9 s withRelayRequestError: T3 Connect relay returned HTTP 504 without a recognized error response. No local span fails. - Service start 14:23:35 UTC: 24 attempts from 14:23:45 to 14:34:10, all 504. Sample Ray IDs:
a4d07143298711c7-AMM,a4d071c6ed0111c7-AMM,a4d080842d4a78e2-AMM(last). - Service start 19:43:49 UTC: 24 attempts from 19:44:01 to 19:54:27, all 504. Sample Ray IDs:
a4d2466b2a981704-AMM,a4d24740cd76420e-AMM,a4d255b89d4032ae-AMM(last). relay.t3.codesis reachable and no proxy is involved. Tailscale Serve plust3 pair --tailscaleworks as a workaround.
A note on the client side: the server-side reconcile path (
apps/server/src/cloud/relayResponse.ts:66at v0.1.0, unchanged onmain) doesn't decode the relay's deadline-exceeded body. Headless users therefore see "Check relay access and any proxy or firewall restrictions" and only get a Cloudflare Ray ID, not a relay trace ID. The desktop client shows "Relay timed out before it finished the request" plus a trace ID for the same failure.Investigated with
t3 triageby Claude Code (Claude Opus 5.5).- T3 Code server
Another reproduction on 2026-10-19: WSL2 Ubuntu (mirrored networking), headless
t3code.servicesystemd user service, Cloudflare edge AMM (Amman). This is a first-time link of a new environment. Other environments on the same account were linked earlier (a Windows-side install on the same laptop on 2026-10-16, and a desktop PC), and they are still listed in the app.Environment
- T3 Code server
0.1.0(stable). The bug happened on this build. - Linux x64 (WSL2 kernel 6.6.87.2), Node v26.8.2, managed
cloudflared2026.10.0, installed byt3 connect link --headless; never started - Connecting from: Android mobile app via T3 Connect
- Environment ID (for relay log lookup):
9e56951a-98c4-42dc-9a54-61b5eae427f9
What happens
t3 connect link --headlesscompletes (device flow approved). Aftersystemctl --user restart t3code,t3 connect statusstays atExposure: enabled · Authorization: stored credential · Environment link: pending server startup · Relay: not provisioned.- On each attempt,
environment.cloud.makeLinkProofsucceeds, thenenvironment.cloud.reconcileDesiredLinkWithfails after 9.0–9.9 s withRelayRequestError: T3 Connect relay returned HTTP 504 without a recognized error response. No local span fails. - Service start 14:23:35 UTC: 24 attempts from 14:23:45 to 14:34:10, all 504. Sample Ray IDs:
a4d07143298711c7-AMM,a4d071c6ed0111c7-AMM,a4d080842d4a78e2-AMM(last). - Service start 19:43:49 UTC: 24 attempts from 19:44:01 to 19:54:27, all 504. Sample Ray IDs:
a4d2466b2a981704-AMM,a4d24740cd76420e-AMM,a4d255b89d4032ae-AMM(last). relay.t3.codesis reachable and no proxy is involved.
Not blocked: Tailscale Serve plus
t3 pair --tailscaleworks fine in the meantime. I'll retry the link once a relay fix is deployed and report back if it still fails.A note on the client side: the server-side reconcile path (
apps/server/src/cloud/relayResponse.ts:66at v0.1.0, unchanged onmain) doesn't decode the relay's deadline-exceeded body. Headless users therefore see "Check relay access and any proxy or firewall restrictions" and only get a Cloudflare Ray ID, not a relay trace ID. The desktop client shows "Relay timed out before it finished the request" plus a trace ID for the same failure.Investigated with
t3 triageby Claude Code (Claude Opus 5.5).- T3 Code server
Same failure on Linux (NixOS 26.05, kernel 6.18), with T3 Code running headless as a systemd user service (
t3 service) on0.1.1-nightly.20261019.3360, on 2026-10-19. This adds a location that is not far from Europe: every Ray ID is from ARN (Stockholm) (relay.t3.codes/cdn-cgi/traceshowscolo=ARN,loc=SE). So distance from the database may not be the whole story.What happens
t3 connect link --headlesssucceeds (relay client ready, authorized).- After a service restart,
reconcileDesiredLinkretries every 10 to 40 s. Each attempt takes 9.0 to 9.6 s and fails.t3 connect statusstays atEnvironment link: pending server startup/Relay: not provisioned, and cloudflared is never started. - Earlier the same day, the first attempts failed with
Relay managed tunnel limit reached: this account allows at most 3 tunnels. I removed a stale device from the account before the attempts below.
Local server trace, 2026-10-19 UTC
Time Result Duration Local trace ID Ray ID 17:50:22 Success: link reconciled, relay config applied 1.2 s a8d3d9c40c14d26aa3f5c87d220b737b17:53:19 Success: link reconciled, relay config applied 1.2 s 55fa1bd0c147a75605d727c5a3a2073917:53:55 POST /api/connect/unlinkfrom the CLIf4517416a6574f7206d114a93b72193717:57:29 managed_endpoint_provisioning_failed9.0 s 6b54adeeaaf551c5d4ad87c9e3afec7c18:05:12 managed_endpoint_provisioning_failed9.1 s 90f84facdac4e47fdc2895685522a0e818:27:18 managed_endpoint_provisioning_failed9.1 s a1952e27a847a7d29d9781350c9f834f18:30:33 HTTP 504 9.1 s c9325b401ae54867ee82552a826a975ea4d1dacec845fc8a-ARN18:31:52 HTTP 504 9.1 s c5bfbbc9fea908cba3097b34ff525abea4d1dcb879125546-ARN18:32:31 HTTP 504 9.2 s 2833354d223df11ccb48fadcb72d9a0ca4d1ddad28f1d17e-ARNTotals since 17:57 UTC: 46 × HTTP 504 and 10 ×
managed_endpoint_provisioning_failed, all close to the 9 s deadline, plus 1 attempt interrupted by a restart. Nothing has succeeded since.Ruled out on the client:
relay.t3.codesanswers in about 30 ms over HTTP/2 + TLS 1.3, with no proxy. The relay client (cloudflared 2026.10.0, managed install) is present. Repairing the service witht3 service installand restarting did not help.The local trace IDs above are from
server.trace.ndjson. I don't know whether they match relay-side traces, but the Ray IDs should be traceable on Cloudflare's side.Workaround until the relay is fixed: Tailscale. With the Mac and the iPhone on the same tailnet, the mobile app reconnected on its own over 5G with Wi-Fi off, since it uses the first route that answers.
Setup on macOS (desktop 0.1.0):
In the Tailscale admin console, enable MagicDNS and HTTPS Certificates.
The App Store Tailscale app doesn't put its CLI on any PATH, so T3 can't run
tailscale(see #15919). Save this astailscalein a folder on your login shell's PATH (e.g./opt/homebrew/bin, or/usr/local/binwith sudo) andchmod +xit:#!/bin/sh TAILSCALE_BE_CLI=1 exec /Applications/Tailscale.app/Contents/MacOS/Tailscale "$@"Keep the
exec(see #21609).TAILSCALE_BE_CLI=1forces CLI mode.Restart T3 and enable Settings → Connections → Tailscale HTTPS.
Pair the phone with
~/.t3/bin/t3 pair --tailscale, which prints a QR code for Add environment. "Create link" in Settings didn't show me a QR, so I used the CLI.
Additional macOS nightly reproduction on 2026-10-19, with the explicit
managed_endpoint_provisioning_failederror rather than the bare 504 message.Environment#
- T3 Code (Nightly) desktop/server version:
0.1.1-nightly.20261019.3373. - macOS
27.2, build26B5112a, Apple Silicon (arm64). - Desktop-managed local environment; local T3 use continues to work.
- Current Cloudflare edge from
https://relay.t3.codes/cdn-cgi/trace:colo=CDG,loc=FR,warp=off. This was checked after the failure, not captured from the failing request itself. - Tailscale is connected. We have not established whether it affects the route used by the failing request.
Reproduction and actual behavior#
- Open Settings → Connections in the desktop app.
- Enable T3 Connect to make the local environment available to other devices.
- The toggle remains off and the following inline error appears:
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). Trace ID: bfb992b7ace86fa847a0396336dd1f69The screenshot showing this error was captured at 2026-10-19 22:45:34 Europe/Paris (20:45:34 UTC). This is the screenshot time, not an exact request timestamp.
Earlier user-reported error ID from the same troubleshooting session:
7fb81e73a90b4aff5b50ecb132479e92. Its response body was not captured, so please treat it as an additional lookup reference rather than a confirmed instance of the same error.Expected: provisioning succeeds, the toggle stays enabled, and the environment is reachable through T3 Connect. Actual impact: remote access through T3 Connect is blocked.
Local checks and attempted remedy#
- Initially,
t3 connect status --jsonresolved a compatible PATH-installed Homebrewcloudflared 2026.7.3. - We installed the nightly's exact pinned managed
cloudflared 2026.10.0release, verified its archive against the SHA-256 embedded in the installed T3 build, and successfully ran its version command. - T3 now reports
relayClient.status="available",source="managed",version="2026.10.0". - The screenshot above was supplied after that installation; installing the pinned client did not resolve the Connect error.
https://relay.t3.codes/healthresponds with{"ok":true,"service":"relay"}. This verifies reachability of the health route, not provisioning health.- Latest CLI status:
desired=false,authenticated=false,linked=false,revoked=false,relayUrl=null. This is the CLI's persisted-state report; it does not establish whether the desktop browser's Clerk session is authenticated. - We have not reset the environment ID, deleted credentials/history, or deregistered this environment during troubleshooting. No controlled post-install restart or alternate VPN-exit test has been performed, so neither is claimed as ruled out.
Request for relay-side investigation#
Could a relay operator inspect the provisioning stage and underlying cause for
bfb992b7ace86fa847a0396336dd1f69, around 20:45 UTC on October 19?The source maps
ManagedEndpointProvisioningFailedto this client-visible reason and omits the stage. Consequently, this report confirms the same visible provisioning failure but does not establish whether its underlying cause is the 9-second deadline, a Cloudflare operation, allocation/persistence, or another failure covered by that error. Related diagnostic issue: #14580.- T3 Code (Nightly) desktop/server version:
Another report from 2026-10-19: Windows 11 Business, T3 Code desktop app (app-hosted server
0.1.0), managedcloudflared2026.10.0. Cloudflare edge SEA (loc=US), another US data point.Settings → Connections → enable T3 Connect fails with:
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).- Trace ID:
8626e65ce6a6e02b5287eae985152db7 - Environment ID (for relay log lookup):
d6716875-0783-415a-b612-741384e98a0f - Approx. time: 2026-10-19, ~22:00–22:30 UTC
relay.t3.codesis reachable (/cdn-cgi/traceOK,colo=SEA), no WARP/proxy.
- Trace ID:
Also affected on Windows with T3 Code desktop
0.1.1-nightly.20261019.3360(version observed in local logs).First observed on October 19, 2026. Enabling "Make this environment available to your other devices through T3 Connect" repeatedly fails with:
https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504). Try again in a few minutes. If it keeps failing, copy the trace ID when you report it.Trace ID:
5d3639265c66db3ea4731508e98858acThe relay responds over HTTPS from this desktop (HTTP 404 at the root path), confirming basic reachability only. The VPN workaround has not been tested on this setup. Adding this trace ID here rather than opening another duplicate.
Additional hosted-relay traces — 2026-10-19#
Adding related 503/504 trace data to this existing report; this does not establish a shared underlying cause.
The managed T3 Connect link for one existing environment cannot provision its endpoint. Two sibling managed environments work, and the account has the expected three managed links. The affected server is a locally qualified fork of v0.1.0 (0.1.0-andrew.1, orchestration protocol2); a stock-binary reproduction has not been performed because it is the active access chain. The same qualified fleet release works on sibling hosts.
Private HTTPS descriptor and authenticated orchestration work. Unauthenticated orchestration returns401. Account OAuth remained valid during the supported proof/link flow. No account identity, environment link or signing keys were removed, and the active server was not restarted.
The latest supported POST /v1/client/environment-links returned HTTP503:
- _tag: RelayEnvironmentLinkUnavailableError
- code: environment_link_unavailable
- reason: managed_endpoint_provisioning_failed
- latest traceId: 86310d4cb067e2a3846206997abec54e
- traceparent: 00-86310d4cb067e2a3846206997abec54e-a98cec909e4e12e2-01
- CF-Ray: a4d336172fbb95b3-FRA
Earlier attempts returned the same503 (trace25cd26c99ca8de275bc09c19aefa9850), or504 relay_request_deadline_exceeded (trace8b77579525fbab70d3fd77e255b29b01). One supported tunnel-only release also timed out504; the existing link/hostname was retained. The endpoint returns530 / Cloudflare1033 with the native User-Agent.
Could the hosted operator inspect these traces for a wedged endpoint/provisioner state and restore the existing managed endpoint without changing the environment ID? The private fallback remains available meanwhile.
This report contains no account email, private tailnet address, credential or customer data. Traces were observed2026-10-19, latest recheck approximately22:28UTC.
Related primary reference: https://github.com/pingdotgg/t3code/issues/14070 (closed by #15411). This new report does not assign the historical database-pool cause to the current failure; hosted trace inspection is needed.
Another report from 2026-10-19 on macOS 27.0.1 arm64, T3 Code (Nightly) desktop
0.1.1-nightly.20261018.3302(app-hosted server), bundled cloudflared2026.5.2. I'm in Ghana (loc=GH).The VPN workaround got me past the 504, but the relay then returned 503 provisioning failed instead.
Time (UTC) Route Result Trace ID ~22:42 colo=DUR, no VPN504 relay_request_deadline_exceeded2530d8673528c05b479300a95fb9186c~22:57 colo=ATL, VPN503 managed_endpoint_provisioning_failedadfc3b039b77d419739d2e97d3619139- Environment ID:
b4d874cd-1bf8-404a-8f17-4b98c2cda828 - In both attempts the local
environment.cloud.makeLinkProofsucceeded in under 10 ms before the relay call failed. - This environment was linked before. Its existing managed endpoint now returns Cloudflare 530, and relay discovery logs "Managed endpoint health request failed" on every refresh.
relay.t3.codes/healthreturns{"ok":true}in about 0.5 s. No proxy.
The other reports from SEA and FRA today, plus this ATL one, suggest the 503 isn't only a far-edge latency problem. Could someone with relay access check
relay.managed_endpoint_provider.provisionfor the 503 trace?- Environment ID:
Same failure on macOS desktop, T3 Code 0.1.0 stable
Hit this on a different platform from the earlier reports: the macOS desktop app, not headless Linux or Windows.
What happened
- In the desktop app, enabling T3 Connect fails with
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). t3 connectfrom the CLI reports it is connected, but the environment never shows up in the account. Other environments on the same account are visible, so the account is correct.
Evidence (
server.trace.ndjson, 2026-10-19 UTC)- 40 failed
environment.cloud.reconcileDesiredLinkWithspans between about 23:43 and 23:52, retried every ~10–40s. - Each one failed after 8.2–8.9s with
RelayRequestError: T3 Connect: Relay environment link is unavailable: managed_endpoint_provisioning_failed. Retry when the relay is available.This is close to the relay's 9s deadline discussed above. - Example trace IDs:
be4cf596e554d53d8780d5beab3c5609,87cf6c075c0762b7f0f58e569336d1fb,f71fb4bd78a1d3fce2576e1567976208,d173b272f8e4367ddfce853aa7cb4b1e. - Environment ID:
824efd82-a456-4ead-8974-9f17c027350c. boot-service.logshowsagent activity publishing standby; waiting for T3 Connect link reconciliation, which never completes.
Environment
- Version: T3 Code 0.1.0 stable, desktop app, local server at
127.0.0.1:3773reporting 0.1.0. - macOS 25.3.0 (Darwin), arm64, Node v26.8.2.
This looks like the same relay-side stall as #16810 and the closed #21586. It also shows the client error still doesn't say which provisioning stage failed (#14580).
Produced by Claude Code (Claude Sonnet 5.5) via
t3 triage.- In the desktop app, enabling T3 Connect fails with
Claude responding on behalf of gcrft123
Another first-time link failing on 2026-10-19, this one from a headless Intel Mac. Cloudflare edge is DFW (
loc=US). An older environment on the same account is still connected, so the failure looks limited to creating new endpoints.Environment
- Mac mini 2014 (x86_64), macOS 12.7.6
- Server
0.1.1-nightly.20261018.3315, headlesst3 serveunder launchd. There's no darwin-x64 headless build, so this is the server from the Intel desktop build running under Node 24. cloudflared2026.10.1 from PATH, never started by T3- Environment ID (for relay log lookup):
be990ad2-b9ed-477b-ab88-36399811e31a
What happens
t3 connect link --headlessauthorized without trouble. After a server restart,t3 connect statusstays atEnvironment link: pending server startup. The startup reconcile made 20 attempts between 23:58:43 and 00:09:04 UTC, then gave up:Failed to reconcile T3 Connect desired link on startup T3 Connect: Relay environment link is unavailable: managed_endpoint_provisioning_failed. Retry when the relay is available. If this continues, include the trace ID when reporting it. Trace ID: 22977c71433face90e1a44df6cfd9a43.19 attempts returned
managed_endpoint_provisioning_failed. One returned HTTP 504 (cf-ray: a4d3bf41c9c8e556-DFW). Most of the provisioning failures came back in 8.5 to 8.7 s, measured by the client span that also covers the challenge request. That's just under the relay's 9 s deadline, which fits jlwbr's diagnosis above that a Cloudflare API call inside provisioning is timing out.Trace IDs (UTC):
- 23:58:43
6a0ee8cb187e1a09a28c2ba1c51f56ff - 00:01:16
1abe0b249fcdbe13b59952611051da74(the 504) - 00:05:10
2453828d89d9c7ab8bfdd44c5c2da8bc - 00:09:04
22977c71433face90e1a44df6cfd9a43
Existing environment on the same account A Mac Studio desktop environment that was linked before today still works. Its managed tunnel has been up since 2026-10-18 20:16 UTC, and its relay health check passed at 23:38 UTC today.
Another data point from 2026-10-19: an existing, working managed link on macOS lost its endpoint after a restart and can't get it back.
- T3 Code (Nightly) desktop, app-hosted server, fork build
0.1.1-nightly.20261017, macOS 27 arm64, bundled cloudflared2026.10.0. Edgecolo=ORD. - The tunnel recovered normally on a restart at 22:39 UTC. The next restart (22:46 UTC) went to
reconcileDesiredLink, andPOST /v1/client/environment-linkshas failed since with 503managed_endpoint_provisioning_failedor a bare 504. - It got through twice (23:14:12 and 23:15:29 UTC; tunnel recovery 200), then failed on every attempt after the next restart.
- Since 22:53 UTC the relay returns 403 for this environment's
/statusand/connect, so other devices can't see it, and deregistering it from the T3 Connect window fails too. Two sibling environments on the same account still connect.
Trace IDs:
7c8eff4cf24ea5d8ec226bd7c5f58db2(22:46),3f963581c744261f48b1132ff4d2f705(23:11),3a26e635b3f2e8a30eea380e2cef14e3(latest, after 00:10 Oct 20) Ray IDs (504s):a4d389bc2ab4e82a-ORD,a4d3d220382cb11c-MAN
Sent by Mike's agent (Claude Opus 5.5 in T3 Code, Claude Code harness)
- T3 Code (Nightly) desktop, app-hosted server, fork build
Same failure on Linux (Arch/Omarchy), systemd user service, fresh install — 2026-10-19/20
Environment
- Server
0.1.1-nightly.20261019.3373, running as a systemd user service (t3 serve), bound to 127.0.0.1:3773, linux x64 (Mac mini hardware) - Relay client
cloudflared2026.10.0 (managed install) - Cloudflare edge: DFW
- Environment ID:
0717ac04-06b0-4be2-ba90-90d6fdef0a75
What happens Fresh install, first-time link.
t3 connect statusshowsExposure: enabled · Authorization: stored credential · Environment link: pending server startup · Relay: not provisioned. The environment never appears on other devices.Evidence (
server.trace.ndjson,environment.cloud.reconcileDesiredLinkWith, 23:35–00:16 UTC)- 137 attempts: 118 ×
managed_endpoint_provisioning_failed, 18 × HTTP 504, 1 success at 00:13:11 UTC that did not survive the next service restart - Every attempt takes ~8.4–9.1 s, consistent with the 9 s relay deadline
- Sample trace IDs:
2d98427b67b508423bba75fbc1959e32,69b4832c7c454f86f3365e29528c6637,c5425af15f59ebed28cef95f007fdb6e,72ce0132f67e1a4d84d72df9ea7ce768 - 504 Cloudflare Ray IDs:
a4d3d3679882df28-DFW,a4d3d4656e6d087e-DFW relay.t3.codesis reachable from this host (HTTP 302 in 0.25 s), so this isn't a local network block.
Gathered via
t3 triageby Claude Code (Claude Opus 5.5).- Server
Still happening on T3 Code desktop 0.1.0 (Electron 44.4.5), macOS 27.0.1. The client now surfaces the reason ("Relay timed out before it finished the request (HTTP 504)"), so the bare-"failed" half of this issue looks fixed, but the relay 504 itself persists.
Steps#
- Settings → Connections → enable T3 Connect for the local environment (Mac Studio).
- Toggle flips back off; toast: "Could not update T3 Connect — https://relay.t3.codes/v1/client/environment-links failed: Relay timed out before it finished the request (HTTP 504)."
- Retried a few minutes later with the same result.
Attempts#
- Trace ID:
7bb3e9e5565a7e9eac5d0be0a72ee39a(around 2026-10-19 23:55 UTC) - Trace ID:
0c6cad34724b698dc874f42fa1607e54(around 2026-10-20 00:02 UTC)
Ruled out locally#
relay.t3.codesreachable in about 60 ms; an unauthenticated POST to/v1/client/environment-linksreturns 401 immediately, so the relay is up and the 504 only happens on the authenticated link path.- System clock matches Cloudflare's
Dateheader exactly, and no proxy is configured. - Bundled cloudflared 2026.10.0 is installed and runs.
- Server trace logs:
environment.cloud.makeLinkProof,environment.cloud.linkProof,cloud.getRelayClientStatus, andcloud.installRelayClientall succeed. The failing POST goes from the renderer straight to the relay.
Sorry for this. We're currently running into upstream rate limits on some of the tunnel endpoints. Trying to resolve this right now
Follow-up to my comment above: the Mac mini linked at 01:30:28 UTC (trace
3f71e874ea52bbba77081b4446f503b7), still through DFW. The managed tunnel registered right after. Nothing changed on my side except restarting the server, so a headless server stuck atpending server startupshould only need a restart once the relay accepts links again. The stored authorization and desired link fromt3 connect linkcarried over.What came before the success, in case the timing helps (durations are client-side spans):
- Restart at 00:56 UTC: 10 minutes of the same mix as before. Most attempts were
managed_endpoint_provisioning_failedin 8.5 to 9.7 s. Two were 504s (797c1a8a51348be3d84bc9e092d28a37,4a44443633748ffd243932bab38adf49), and one provisioning failure took 66 s (24cbd76765c37d942dc9e2d9701da670). - Restart at 01:27 UTC: the first request took 121 s and failed with
The relay returned an unexpected response(bee7f9486b956391f56218406b3d81eb). Three moremanaged_endpoint_provisioning_failedfollowed between 01:29:48 and 01:30:11 (last onef341b5563dc551e0f6b89870e6e8185b), and the next attempt at 01:30:28 succeeded.
- Restart at 00:56 UTC: 10 minutes of the same mix as before. Most attempts were
Should be resolved
Can confirm that everything works again on my end, provisioning went through and everything shows up correctly across all devices! Thanks for the attention and overall pretty quick fix :)
Yeah! I confirm too that it's now back online :)
Note
Grok responding on behalf of Julius.
Closing this one out. The relay outage behind these 504s and
managed_endpoint_provisioning_failederrors was Cloudflare's API rate-limiting the relay, and it's been confirmed working again here. #22059 is now merged so tunnel recovery reuses ready tunnels, fails fast on Cloudflare 429s, and tells hosts when to retry, and #22108 makes hosts back off from a failing relay. Clearer client-side error reasons for T3 Connect failures are tracked in #14580. If linking fails again after updating, please open a new issue with the trace ID.juliusmarminge closed this
Shouldn't this issue stay open till #22065 lands? The original issue was about the 9s deadline not the rate limits
Another data point from China (corporate network, egress via Cloudflare HKG) — I believe the first HKG report in this thread.
Environment
- T3 Code (Nightly) desktop
0.1.1-nightly.20261019.3348, macOS 15 (x64, Intel) - Managed
cloudflared2026.10.0 - Environment ID (for relay log lookup):
dcb16015-df72-4bbc-af46-f72c88d479b2 - Tunnel:
e121701e-8618-499b-8580-cd1ae1dbc672
Failures with zero user activity. My desktop stays on overnight. Between 18:00 UTC Oct 19 and 01:00 UTC Oct 20 (02:00–09:00 local, nobody using the network), the server logged ~165
upstream_unavailableand ~48 HTTP 504 fromrecoverManagedCloudTunnel/reconcileDesiredLinkWith. The outage continued unattended, which rules out local proxy/firewall interaction:curl https://relay.t3.codes/returns 302 in ~110 ms from this machine.Client behavior worth noting. While the relay is failing, the managed relay client restarts aggressively: 139 cloudflared spawns in a ~65-minute window (new PID every 60–90 s), each logging
Relay client process started; waiting for tunnel connectionand never registering (zeroRegistered tunnel connectionlines). Retries never back off during a relay-side outage. A backoff on repeatedupstream_unavailablemight be worth considering alongside the relay-side fix.Sample failed requests (local UTC+8, local trace IDs):
- Oct 20 08:59:42 —
1be72c153fe93bbf18dbd182b8a5c37c—recoverManagedCloudTunnel - Oct 20 09:01:42 —
e0d6a22c6b87239ea4a180f2ea7bd7b9 - Oct 20 09:03:42 —
080b455e38e2c275df6d07136b8f34e2 - One 504 with Ray ID
a4d87fdbec70ddbd-HKGat 13:51 UTC Oct 20.
Failure mode matches the diagnosis above: ~9 s to failure, local spans (
makeLinkProof, version probes) all succeed in milliseconds.- T3 Code (Nightly) desktop
Sign in to join this conversation.
Note
Grok responding on behalf of Julius.
Thanks for the trace ID and timestamps. I confirmed two separate problems here.
1. The 504 comes from the relay's own request deadline. The relay cuts off any API request after 9s and returns
504 {"error":"relay_request_deadline_exceeded"}. That body is exactly 43 bytes, which matches what you saw in DevTools.infra/relay/src/http/Api.ts:174setsRELAY_REQUEST_DEADLINE_MS = 9_000.infra/relay/src/http/Api.ts:189-208is therelayRequestDeadlinewrapper that returns the 504.Something inside
linker.link(Api.ts:863) is stalling. That's most likely managed-endpoint provisioning or persistence, but I can't tell which from the client. Someone with relay access needs to look up trace4684d7d140f34f0393d42744d240e207, whose span tree will show which child span stalled. The same applies to your three earlier attempts around 10:55 UTC.2. The client drops the reason and the trace ID. This is the bug we can fix in the client.
linkEnvironmentdeclaresRelayEnvironmentLinkErrors(packages/contracts/src/relay.ts:613-621, used at:1074). That list has no 504 member, and the deadline body ({error: ...}) doesn't match any tagged error schema.relayRequestError(packages/client-runtime/src/relay/managedRelay.ts:309-318) only setsrelayErrorandtraceIdwhen the cause is aRelayProtectedError. Here both are left unset.decodedRelayClientError(apps/web/src/cloud/linkEnvironment.ts:116-128, with the same code inapps/mobile/src/features/cloud/linkEnvironment.ts:90) then shows only".../environment-links failed". The traceparent the relay sent back is lost as well.Proposed fix:
RelayRequestDeadlineExceededError(httpApiStatus: 504,traceId) to the contracts.relayRequestDeadlinereturn that error with the span's traceId, and add it toRelayProtectedErrorand the endpoint error lists.traceparentresponse header so the toast reads something like "relay timed out (504), trace …".Relation to #14581 / #14580: #14581 only adds
provisioningStageto the existing 503ManagedEndpointProvisioningFailederror. It would not show anything for this 504, because the deadline fires before any tagged error is produced. If provisioning turns out to be the slow step, this is probably closely related to #14155 (provisioning plus HTTP 504) and #14070. #5729 is the same class of client problem, an undeclared status whose body gets dropped.Workaround: Retry later. The stall is on the relay side, and nothing changed on your machine will fix it.