[Bug]: T3 Connect native clients time out after host Mac restart despite healthy relay tunnel
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Steps to reproduce
- Configure T3 Connect on a Mac mini host and connect successfully from the T3 Code native apps on both macOS and iOS.
- Restart the Mac mini.
- Relaunch T3 Code on the Mac mini.
- Attempt to reconnect from the MacBook Air or iPhone native T3 Code apps.
- Both clients enter a reconnect loop and time out reaching the T3 Connect environment endpoint.
This worked normally before the Mac mini restart.
I also completely reset T3 Connect during troubleshooting:
- Fully stopped the T3 server and its managed cloudflared process.
- Ran npx t3 connect unlink.
- Confirmed:
- Exposure: disabled
- Environment link: not provisioned
- Relay: not provisioned
- Ran npx t3 connect link.
- Started a fresh npx t3 serve instance.
- T3 created a new managed tunnel ID and successfully registered all four Cloudflare QUIC connections.
- The macOS and iOS native clients still failed in the same way.
The iPhone was also tested on cellular with Wi-Fi and Tailscale disabled, with the same result.
Expected behavior
Expected behavior
After restarting the host Mac and relaunching T3 Code, T3 Connect should restore the remote environment and previously connected native macOS/iOS clients should reconnect.
If the T3 Connect environment is unlinked and relinked successfully and the managed relay tunnel establishes successfully, remote clients should be able to reach the environment again.
Actual behavior
Actual behavior
Both the macOS and iOS native clients repeatedly show:
Failed to connect. Reconnecting... Reason: Remote environment endpoint https://prod-dc8967a9e60a2bb1.t3coderelay.com/.well-known/t3/environment timed out after 10000ms.
The failure began immediately after restarting the Mac mini.
The host itself appears healthy:
- Local T3 server responds normally.
- T3 Connect authorization/linking succeeds.
- A fresh managed Cloudflare tunnel is created.
- All four QUIC tunnel connections successfully register.
- The issue occurs from multiple client devices and also from iPhone cellular, so it does not appear to be specific to the LAN or Tailscale.
Running the locally served T3 web interface works; the failure is with native clients connecting through T3 Connect.
Impact
Blocks work completely
Version or commit
t3@0.0.32
Environment
macOS 26.5.1
Logs or stack traces
After refining
T3 Connect
Exposure: enabled
Authorization: stored credential
Environment link: provisioned
Relay: https://relay.t3.codes
Relay client: available via PATH
Path: /opt/homebrew/bin/cloudflared
Version: 2026.5.2
Local back end confirmed healthy
$ curl -I http://127.0.0.1:3773/
HTTP/1.1 200 OK
After completely unlinking
T3 Connect is disabled locally.
Revoked the relay-side environment record.
T3 Connect
Exposure: disabled
Authorization: stored credential
Environment link: not provisioned
Relay: not provisioned
Publish agent activity: disabled
After linking again and starting the server, T3 successfully created a fresh managed tunnel:
Relay client process started; waiting for tunnel connection
T3 Connect desired link reconciled on startup
Relay client tunnel connection registered
connIndex=0
protocol=quic
Relay client tunnel connection registered
connIndex=1
protocol=quic
Relay client tunnel connection registered
connIndex=2
protocol=quic
Relay client tunnel connection registered
connIndex=3
protocol=quic
During earlier troubleshooting, one shutdown produced:
Failed to release the managed tunnel on shutdown; the next link reuses it
After fully terminating the T3 server and its managed cloudflared child and repeating the unlink/link process, a later shutdown correctly produced:
Released the managed tunnel on shutdown
A new managed tunnel was then created and all four QUIC connections registered successfully, but the native clients continued to time out at:
/.well-known/t3/environment
This may be related to #5031, but that issue describes mobile relay failures following a nightly update. In this case, the trigger was specifically restarting the host Mac, and both the macOS and iOS native clients are affected.
Screenshots, recordings, or supporting files
No response
Workaround
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in apps/server and reproduce the restart, unlink/relink, and fresh npx t3 serve flow described in the issue. Inspect the T3 Connect environment endpoint and relay tunnel registration path, then verify that native macOS and iOS clients reconnect successfully after a host restart and receive a response from /.well-known/t3/environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, macos, typescript
- Domain
- mobile-dev, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100