[Bug]: T3 Connect managed endpoint provisioning fails repeatedly on Windows 11
Before submitting
- [x] I searched existing issues. Related: #13681, which involved a different environment and was closed after a later retry worked.
- [x] I included reproduction details and trace IDs.
Area
T3 Connect hosted relay provisioning, triggered from the Windows desktop app.
Steps to reproduce
- On the Windows host, open T3 Code 0.0.42 → Settings → Connections.
- Enable T3 Connect for the local environment.
- The toggle returns to off after the relay request fails.
- Retry. The failure recurs with a new trace ID, and the mobile app cannot connect to this machine.
Expected behavior
T3 Connect provisions a managed endpoint and the environment becomes available to my mobile T3 app.
Actual behavior
The desktop app reports:
https://relay.t3.codes/v1/client/environment-links failed:
Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
The local T3 server remains available on 127.0.0.1:3773. The relay health endpoint responds, but no cloudflared connector starts because provisioning fails before a tunnel token is returned.
Impact
Mobile access to this Windows environment through T3 Connect is blocked. Local desktop use still works.
Environment
- T3 Code desktop stable 0.0.42
- Windows 11 Pro, build 26200
- Local server bound to
127.0.0.1:3773 - Date: 2026-09-28
Trace IDs
- Initial user-reported failure:
fe743ccef63184b15eebc7f6d03dae13 - Reproduced in Settings:
58a420de14b2a8e16b258082462bfac8 - Retry in Settings:
b528e164721834faeeb4d9dff930d04c - Latest user-reported failure:
cf8e4071a1013229da78780a2cd32029
Could the relay team inspect the failing stage and cause in relay.managed_endpoint_provider.provision for these traces? The client only exposes managed_endpoint_provisioning_failed. I have not reset the environment ID or changed local credentials.
Triage
This is a hosted-relay provisioning failure, not a Windows client or cloudflared install failure. The report is specific enough to investigate. It is the same client-visible failure as #13681, but not a duplicate: that report was a different environment, closed after a later retry worked with the cause unconfirmed. These four attempts are still failing.
POST /v1/client/environment-links returned environment_link_unavailable / managed_endpoint_provisioning_failed. That reason is only produced when ManagedEndpointProvider.provision fails (infra/relay/src/http/Api.ts). The desktop string matches relayProtectedErrorMessage for RelayEnvironmentLinkUnavailableError. By the time provision runs, the link proof has verified, the challenge nonce has been consumed, and the origin has passed the loopback check. A bad proof, a non-loopback origin, an insecure endpoint, or the managed-tunnel cap would be different codes (environment_link_proof_*, origin_not_allowed, endpoint_not_secure, environment_link_limit_exceeded).
That also explains why there is nothing useful to deregister. The environment link row is written only after provision returns (EnvironmentLinker.link). A failure here leaves no Account → T3 Connect registration. Local cloudflared is not on this path either: Settings calls ensureRelayClientAvailable before the link request, and the connector is started only after the relay returns a tunnel token. A missing binary would be a different client error and would not reach this response. Relay health responding is expected; it is a different route.
What this response already rules out:
- Missing relay config. That is
managed_endpoint_not_configured. - The per-account tunnel cap (default 3). A cap hit is
environment_link_limit_exceededand names the maximum. - The 9s relay deadline. That response is a 504
relay_request_deadline_exceeded, and the client would not show this reason. - Open follow-ups that only matter after a link exists: #12724 (re-register origin after a port hop), #8353 (listener port in the link proof), #8352 (wait for
Registered tunnel connection), #11184 (bump managed cloudflared). None of those run before this response.
0.0.42 is still the latest stable desktop release. Updating it will not change this path. The client drops the failure stage. The relay error carries stage plus hostname, tunnel name, and tunnel id when it has them. Provision stages are derive-environment-hash, check-tunnel-limit (a limit-query persistence error, not the cap), reserve-allocation, ensure-tunnel, validate-tunnel-response, record-tunnel, configure-tunnel, ensure-dns-record, record-dns, get-tunnel-token, and mark-allocation-ready. The span is relay.managed_endpoint_provider.provision, annotated with relay.environment_id, relay.managed_endpoint.origin_host, and relay.managed_endpoint.origin_port. The environment id is not in this report; it is on that span. Please do not reset it. A new id would only hide a wedged relay_managed_endpoint_allocations row.
Please look these up in t3-code-relay-traces-prod before changing code:
fe743ccef63184b15eebc7f6d03dae13(initial)58a420de14b2a8e16b258082462bfac8(Settings)b528e164721834faeeb4d9dff930d04c(Settings retry)cf8e4071a1013229da78780a2cd32029(latest)
Each retry got a new trace and the same reason, so this is not a consumed nonce and not a one-off client timeout. The stage distinguishes a Cloudflare create/config/DNS/token error from a stuck allocation whose generation claim no longer matches. Since #9386, an offline host releases its Cloudflare tunnel and the next provision recreates it under the same name; a lost claim is supposed to be retryable. The same stage and environment id across all four traces, with no successful provisions in that window, means the allocation for this environment is wedged rather than a single Cloudflare blip.
Also seeing this on macOS, so it isn't Windows-specific.
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). Trace ID: a8ccbaf9770d93ff3f457945c84cd3ec
- T3 Code (Alpha) 0.0.42, macOS 26.3 (arm64), desktop app, Settings → Connections → T3 Connect
- Fresh install with no earlier cloud link state. Port 3773 is held by T3 Code itself.
- Local desktop use still works.
I'm also seeing this on Windows with T3 Code 0.0.42. Retrying from Settings → Connections after restarting T3 Code still fails with:
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
Latest trace ID: b7785eb3b0dd083a3f640595ec3b50ec
Updating the Codex CLI and restarting resolved a separate local Codex detection problem, but T3 Connect provisioning still fails. Could the relay team inspect the failing provisioning stage for this trace?
Same failure here on a fresh install, still happening on today's nightly
- T3 Code
0.0.43-nightly.20260929.2416, Windows 11 Pro build26200 - Fresh install around
2026-09-29 04:00 UTC, so this environment ID is brand new:76cba492-e3e7-4f39-badc-65362074b635 - The very first link attempt failed, so there was no earlier allocation for this environment to get stuck
- Trace ID:
1af09203e14a27c5c078c71c7ce31c6c - Relay client install and
environment.cloud.makeLinkProofsucceed, thenPOST /v1/client/environment-linksreturns HTTP503managed_endpoint_provisioning_failed
The same account has an older environment that provisioned successfully (75d9c0b7-82ab-4b03-b90a-1e3f95cac11a). That host is offline now and its managed hostname returns Cloudflare 530, in case the account's allocations matter
Also reproducing on Linux (Pop!_OS), T3 Code nightly 0.0.43-nightly.20260928.2402, running as a background service (t3code.service), cloudflared 2026.5.2. Not Windows-specific and not nightly-specific.
Reconcile of the desired link has failed continuously since 2026-09-28 15:41 UTC (139 attempts, each 8-11s):
- 97x HTTP 504 (relay 9s deadline). Latest Cloudflare Ray IDs: a42516373955de9f-DAR, a425153c1c96dd97-DAR, a42514428f06dd97-DAR, a42513102f10dea2-DAR, a425125598ebdd97-DAR
- 42x environment_link_unavailable / managed_endpoint_provisioning_failed. Latest trace IDs: 0618d125749dabc501368909af13d00c, ab8782e0578ab62ab7783a278e7a6f61, 354b333d24f6eebe1266db128cc2e26a, 5e39f4981ebc652eaec621ca38fb9d33, 7eb6284989e84899f65b63d0b75c3490
Earlier release-on-shutdown (2026-09-27) failed with upstream_unavailable, trace 39637552dc6da9ea37c4790b668cc2fe, and relay-side unlink returns 500. So the allocation likely went stuck after the #9386 offline-tunnel cleanup. Provisions near the 9s deadline suggest a slow Cloudflare call in ensure-tunnel/configure-tunnel. Environment ID has not been reset. Could you check the stage on relay.managed_endpoint_provider.provision for these traces?
Also reproducing on another Windows environment on September 29, 2026. Adding this here following the consolidation of #14155.
Environment
- T3 Code (Alpha) desktop 0.0.42, installed Windows application.
- Windows 11 Home 25H2, build 26200.8246, x64.
- Environment ID, read from the local
/.well-known/t3/environmentendpoint:6f093da1-b9db-45a9-bf3f-8b5fd3bdd3b7. - Local environment enabled; WSL backend selector shows Ubuntu, with WSL only off.
- Publish agent activity off in both failure screenshots.
Steps to reproduce
- Open Settings → Connections in the desktop app.
- Enable T3 Connect for the local environment.
- The app displays “Could not update T3 Connect” and the error below. The T3 Connect toggle is off afterward.
- Retry several minutes later. The same error appears with a different trace ID.
Expected and actual behavior
Expected: the environment gets a managed endpoint and becomes available to other devices through T3 Connect.
Actual: https://relay.t3.codes/v1/client/environment-links fails with:
Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
This blocks T3 Connect remote access for this environment. The local app remains available.
Trace IDs and time references
| Attempt | Trace ID shown by the desktop app | Screenshot saved at (UTC) |
|---|---|---|
| First captured failure | 21fca453a6d5ee1c2df9c5ad736ab80 |
2026-09-29 21:52:57 |
| Later retry | 2cf50453359b9a4763322fe749573b3a |
2026-09-29 21:58:49 |
These times come from the screenshot files' creation timestamps, not HTTP request timestamps; the failed requests occurred before the corresponding captures. Local timezone was Europe/Belgrade, UTC+02:00 (23:52:57 and 23:58:49 local).
Checks performed
- The T3 Code process owns the TCP listener on
0.0.0.0:3773. GET http://127.0.0.1:3773/returned HTTP 200.- The local environment descriptor is readable.
- Searching the available local
server.trace.ndjson*anddesktop.trace.ndjson*files did not find this error string or the first trace ID. No client-side stack trace or HTTP response status was captured, so I cannot report a 503/504 for these particular requests. - No environment ID reset, credential deletion, application reinstall, or network configuration change was performed during this investigation.
Workaround
None confirmed. Retrying after several minutes did not resolve the failure.
Could the relay team inspect relay.managed_endpoint_provider.provision for this environment and these traces, particularly the failing stage and underlying cause?
Screenshot of the later retry
Update to my earlier report: the suggested deregistration recovery is also failing.
New link error
Enabling T3 Connect now reports:
https://relay.t3.codes/v1/client/environment-links failed:
Relay refused the link: this account already has its maximum of 3 managed tunnels.
Unlink an environment to free one up.
Trace ID: 056d6a99e41d73a2a792f0e6724db3ef
Account → T3 Connect shows exactly three environments, all marked "Managed tunnel": my Docker container, MacBook Pro, and this Asus Windows PC. All three are intended to remain in use. The Asus registration shows a linked date of August 30, 2026.
The Windows environment ID previously read from the local descriptor is 6f093da1-b9db-45a9-bf3f-8b5fd3bdd3b7. I have not verified whether the cloud Asus entry has the same ID; matching display names alone do not establish that.
Deregister also fails
After attempting the recommended Deregister recovery for the Windows PC, the UI reports:
Could not deregister server
Could not unlink relay environment.
Trace ID: 2888faa60d95dbdb38c0f1e2bc8a3f8d
The UI did not confirm successful deregistration, so I cannot complete the normal unlink/re-link recovery.
Time references
- Limit-error screenshot saved: September 30, 2026, 03:43:42 UTC.
- Deregister-error screenshot saved: September 30, 2026, 03:50:17 UTC.
These are screenshot file creation times, not exact HTTP request timestamps. Local timezone: Europe/Belgrade, UTC+02:00.
Please check the failed unlink trace as well as the quota trace, and whether the cloud Windows registration matches the current local environment ID. This may involve stale registration/allocation state, but the client messages do not establish the underlying cause. No local environment ID or credential files have been deleted as part of this investigation.
Also seeing this on a Windows host today, enabling T3 Connect from Settings → Connections:
https://relay.t3.codes/v1/client/environment-links failed:
Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
Trace ID: 556d6ae411e3162f2df1708de48345a5
- Time: about 2026-09-30 12:32 UTC (screenshot time, not the exact request time)
- Environment ID has not been reset
The environment ID should be on the relay.managed_endpoint_provider.provision span for that trace.
Update: Retrying about 15 minutes later worked and the environment linked.
Got the same problem on MacOS
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). Trace ID: 03839b0cd8eb49385b76303d255d5437
Replicated on macOS 27.0, T3 Code v0.0.44 (installed via macOS download, .dmg)
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). Trace ID: 2dbfd678ae31ec379ece016a0ceca20b
Getting the same error on CachyOS
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed). Trace Id: 834de7a3ec95ed652aab31f6e3e273da
Same on MacOS 27 0.0.45-nightly.20261001.2523
https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
Trace ID: b8838c4784811a0ba0520309158656e4
Reproduced today on macOS with T3 Code desktop 0.0.44. Enabling T3 Connect in Settings → Connections returns the toggle to off with managed_endpoint_provisioning_failed.
- Original trace:
f8f444f3bf4f07fc4ff5aacb9243fcc9 - Fresh retry trace:
994fe515cbc487d7cf90d24637988a3c
Local relay-client status and link-proof generation succeeded. No environment ID reset, credential deletion, or app restart was performed.
Please inspect the provisioning stage and underlying cause for these traces. I isolated the information loss in #14580 and opened #14581 to preserve the safe stage through the HTTP error and shared client message. The HTTP regression and compatibility tests pass locally. That PR is a diagnostics fix; it does not claim to repair this hosted provisioning incident.
Also reproduced on macOS today, 2026-10-01. T3 Connect is still failing after a fresh retry from the desktop settings.
Environment
- T3 Code (Alpha) desktop 0.0.44, stable; the app reports up to date.
- macOS 27.0.1, arm64.
- Environment ID:
aca78a8c-e745-4174-a454-16e609fa71a7.
Reproduction
- Open Settings → Connections.
- Enable T3 Connect for the local environment.
- The request fails and the toggle returns to off.
https://relay.t3.codes/v1/client/environment-links failed:
Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
Trace ID: ddbbe3e45cf1911b54fa8e988a12c882
Verified locally
- The local metadata endpoint responds successfully and reports server version 0.0.44.
https://relay.t3.codes/healthreturns{"ok":true,"service":"relay"}; provisioning still fails.- No
cloudflaredconnector is running, and no cloud endpoint runtime configuration is present in the local secrets directory. - Local desktop use continues to work; access through T3 Connect is blocked.
No environment ID reset, credential deletion, or application restart was performed during this reproduction.
Could a relay operator inspect relay.managed_endpoint_provider.provision for the trace above and identify the failed stage and underlying cause? The client response does not expose that information.
Still reproducing on October 2, 2026, when enabling T3 Connect.
New trace ID: 8b518222178c64a199ed4b655168c08e
Could you inspect the provisioning stage and underlying cause for this trace?
Happening on Linux and Mac for me.
Also experiencing this on macOS with T3 Code (Alpha) 0.0.45.
Steps:
- Open “Set up T3 Connect.”
- Enable “Publish this environment” and “Publish agent activity.”
- Click Continue.
Error: https://relay.t3.codes/v1/client/environment-links failed: Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
Trace ID: 2c992b66718516f9754c1cd67fd5dc30
My existing manual connection to a separate Linux environment through Tailscale still works. The failure occurs when setting up T3 Connect.
Reproducing this on macOS with T3 Code 0.0.46-nightly.20261003.2610 (8ed276c246b6), at approximately 2026-10-03 03:12 UTC.
Enabling 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: 25597a580e21282b94963cc39c9a38fc
The relay site loads from both devices, but provisioning still fails. I also received "Could not unlink relay environment" while trying to recover.
Same failure here, adding details for relay-operator lookup.
- T3 Code
0.0.46-preview.20261002.2598, Windows 11 x64 desktop app - Date: 2026-10-03 (local), trace ID:
4a4909123cc55310df6f2507597eb064 - Environment ID:
31fb48e3-5e62-4eae-8dbe-7628db3f4ddc(not reset) - Trigger: Settings → Connections → enable T3 Connect / publish this environment
https://relay.t3.codes/v1/client/environment-links failed:
Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
Trace ID: 4a4909123cc55310df6f2507597eb064
Verified locally:
- Local server reachable on
http://127.0.0.1:3773. https://relay.t3.codes/healthreturns{"ok":true,"service":"relay"}.- Nothing matching this error string or trace ID is present in the local
server.trace.ndjson*/desktop.trace.ndjson*files.
Could a relay operator inspect relay.managed_endpoint_provider.provision for this trace and report the failing stage / underlying cause? Environment ID has not been reset.
Same failure on macOS, adding a trace for relay lookup.
- T3 Code
0.0.46-nightly.20261003.2610, macOS 26.5.1 arm64 - Date: 2026-10-03, shortly before 07:30 UTC
- Trace ID:
bb155179d81bd5b25ff746506edf7a4f - Environment ID:
a09ca184-7258-4c8b-93e3-bad690f73695(not reset) - First time enabling T3 Connect for this environment; sign-in to T3 Connect worked
- Trigger: Settings → Connections → enable T3 Connect
https://relay.t3.codes/v1/client/environment-links failed:
Relay cannot provision the managed endpoint (managed_endpoint_provisioning_failed).
Trace ID: bb155179d81bd5b25ff746506edf7a4f