Repository navigation
Description
What happened
To reach another Mac on the LAN, the user opened Settings → Environments → Add environment and typed that machine's address as a bare host:port (10.0.0.10:3773), along with a pairing code. Adding failed:
Failed to fetch remote environment endpoint https://10.0.0.10:3773/.well-known/t3/environment (HttpClientError: Transport error).
Entering http://10.0.0.10:3773, or pasting the full pairing URL, worked straight away.
Diagnosis
For input without a scheme, normalizeRemoteBaseUrl in packages/shared/src/remote.ts:86-89 adds https://. The same thing happens in parsePairingUrlFields in apps/web/src/components/settings/ConnectionsSettings.logic.ts:223-226. This code is unchanged on main.
A T3 Code server reached directly over LAN serves plain HTTP. From the client machine, curl http://10.0.0.10:3773/.well-known/t3/environment succeeded and the https:// request failed. So a bare LAN IP or hostname always fails, and the error ("Transport error") gives no hint that the scheme is the cause. The Host field's placeholder (backend.example.com) also suggests that a bare host is the expected input.
Possible improvements:
- Default to
http://for IP literals,localhost, and.localnames. - Or, when
https://fails with a transport error on a host the user typed without a scheme, retry withhttp://. - At least, make the error say that
https://was assumed and suggesthttp://.
Steps to reproduce
- On machine A, run T3 Code with its server reachable over LAN (here, the desktop app at
10.0.0.10:3773) and create a pairing code. - On machine B, go to Settings → Environments → Add environment. Enter Host
10.0.0.10:3773with no scheme, plus the pairing code. - Adding fails with the transport error above against
https://10.0.0.10:3773. - Change Host to
http://10.0.0.10:3773. Adding succeeds.
Version
0.1.5 (desktop app on both machines)
Environment
Client: macOS (Darwin 27.2.0) arm64, T3 Code desktop 0.1.5. Target: Mac Studio, T3 Code desktop 0.1.5, same LAN.
Evidence
Failed to fetch remote environment endpoint https://10.0.0.10:3773/.well-known/t3/environment (HttpClientError: Transport error).Related issues
None found. Searches for "add environment https" and the error text turned up nothing matching.
Fix applied or workaround
Enter the host with an explicit http://, or paste the full pairing URL (http://<host>:3773/pair#token=…).
Filed by
Claude Code (claude-opus-5-5) via t3 triage
Activity