Repository navigation
Description
What happened
The Mac's lid was closed overnight, on AC power, with the T3 Code (Nightly) desktop app running and T3 Connect linked. Between about 06:00 and 08:00 JST on 2026-11-29 (21:00 to 23:00 UTC on 2026-11-28), the user opened the iOS app several times. Each time, it could not connect to the Mac. The user did not record the error text. After the lid was opened, the iOS app connected normally.
Diagnosis
- The host was reachable through its tunnel for most of that window.
pmset -g logshows continuous DarkWake from 05:17:52 to 07:12:00 JST and from 07:27:00 to 08:05:01 JST. The Mac was fully asleep only from 07:12 to 07:27. - cloudflared kept 4 registered QUIC connections through both DarkWake periods.
relay-client.ndjsonhas no transport or proxy errors from 05:18:10 to 07:27:05, or from 07:27:10 until the app restart at 08:05:38. - The server's
ConnectReachability.check(GEThttps://<managed hostname>/.well-known/t3/environment, every 5 minutes) returned 200 on every run in both periods. It got a 530 once right after each wake (05:17:52 and 07:27:01), and passed again within seconds. - No request from the relay reached the host during the window. In
infra/relay/src/environments/EnvironmentConnector.ts, both relaystatusandconnectcall the host through the managed endpoint (POST /api/t3-connect/healthandPOST /api/t3-connect/mint-credential). The server trace has no request on either route from 01:00 JST (start of the retained trace) until 08:05:46 JST, after the lid was opened. The only inbound requests in that time are the reachability self-checks. - With the lid open (10:48 JST, build 0.1.14-nightly.20261128.5399), the same phone connected.
healthandmint-credentialboth arrived at 10:48:05 and returned 200, and the host issued an iOS session. - So the failing hop is before the host: either the phone could not reach the relay, or the relay stopped before it called the endpoint. Host logs cannot tell which. Relay logs for this environment between 21:00 and 23:05 UTC on 2026-11-28 should show it.
- Possibly relevant: the desktop app auto-updated to 0.1.14-nightly.20261128.5385 at 21:15 JST, 20 minutes before the lid was closed. No phone connection succeeded on 5385. Phone connections on earlier nightlies worked, but the Mac was awake for all of them, so this does not isolate the build.
Steps to reproduce
Seen once, over several attempts. Not yet reproduced on demand.
- On macOS, run the T3 Code (Nightly) desktop app 0.1.14-nightly.20261128.5385 with T3 Connect linked (managed tunnel), on AC power.
- Close the lid and leave it overnight, so the Mac alternates between sleep and DarkWake.
- During a DarkWake period, while the server's reachability check passes, open the iOS app and connect to the Mac.
- The connection fails. The host receives no
/api/t3-connect/healthor/api/t3-connect/mint-credentialrequest. - Open the lid. The same phone connects.
Version
Host: desktop app 0.1.14-nightly.20261128.5385 (auto-updated to 0.1.14-nightly.20261128.5399 at 08:05 JST). iOS app: latest App Store build, exact version unknown.
Environment
macOS 27.2.1 (arm64), T3 Code (Nightly) desktop app with its built-in server, managed cloudflared 2026.10.4 over QUIC, iOS app. Mac on AC power with the lid closed.
Evidence
# pmset -g log (JST)
2026-11-28 21:34:55 Sleep Entering Sleep state due to 'Clamshell Sleep'
2026-11-29 05:17:52 DarkWake DarkWake from Deep Idle [CDNPB] : due to ... rtc/Maintenance
2026-11-29 07:12:00 Sleep Entering Sleep state due to 'Maintenance Sleep'
2026-11-29 07:27:00 DarkWake DarkWake from Deep Idle [CDNPB] : due to ... rtc/Maintenance
2026-11-29 08:05:01 Wake DarkWake to FullWake from Deep Idle [CDNVA] : due to UserActivity Assertion
# relay-client.ndjson (JST): tunnel connections registered, then no errors until the next sleep
05:18:10 INF Registered tunnel connection connIndex=1 location=kix04 protocol=quic (connIndex 0-3 all registered by 05:18:10)
07:27:10 INF Registered tunnel connection connIndex=3 location=kix03 protocol=quic (connIndex 0-3 all registered by 07:27:10)
08:05:38 ERR no more connections active and exiting (app restart for update)
# server.trace.ndjson: ConnectReachability.check (JST), all Success
05:17:52 GET https://prod-<redacted>.t3coderelay.com/.well-known/t3/environment -> 530 (right after wake)
05:18:01 ... 07:07:56 every 5 min -> Success
07:27:01 GET .../.well-known/t3/environment -> 530 (right after wake)
07:27:09 ... 08:02:02 every 5 min -> Success
# server.trace.ndjson: relay -> host routes (JST)
01:00-08:05 POST /api/t3-connect/health none
01:00-08:05 POST /api/t3-connect/mint-credential none
08:05:46 POST /api/t3-connect/health 200 (after lid open and app restart)
10:48:05 POST /api/t3-connect/health 200 (lid-open test, phone connected)
10:48:05 POST /api/t3-connect/mint-credential 200
# auth_sessions (mobile, iOS): last issued 2026-11-28T04:11Z, next 2026-11-29T01:48Z (the lid-open test). None during the window.Related issues
#41733: the relay returns 504 although the host's mint-credential returns 200. Here the host never receives mint-credential or health. #31468: with a VPN up, cloudflared reports ready connections but requests time out. Here the self-checks through the public hostname succeed. #30118 (closed): Cloudflare 1033 after sleep until the app restarts. Here the tunnel recovers within seconds of each wake.
Fix applied or workaround
Nothing was changed on the machine. Opening the lid restores the connection.
Filed by
Claude Code (claude-opus-5-5) via t3 triage
Activity
misaka9981 commentedon Nov 29, 2026
Additional context: on other nights this Mac stays in clamshell mode with an external display attached, so it never sleeps. The pmset log since 11-23 shows
Clamshell Sleeponly on this night, when no display was attached. So the sleep itself is expected macOS behavior. The open question is only why the relay never reached the host during the DarkWake periods while the tunnel self-checks passed.shivamhwp commentedon Nov 29, 2026
Posted by Claude Code (claude-haiku-5-5) via T3 issue watch.
We read the relay path in
infra/relay/src/environments/EnvironmentConnector.ts. The host only sees no request if the relay stops before it calls the host, or if the call fails on the way there. The phone's error can tell those apart, and it's the one thing we can't see from the Mac or the relay code.For one of the failed attempts in the 06:00–08:00 JST window, could you share:
Once we have that, we can tell whether the failure is on the phone's path to the relay or in the relay itself.