The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 09:45 UTC
fix(server): T3 Connect error 1016 tells you to link again instead of restart (#37636)
Yasser Drif committed
Nov 16, 2026 at 17:46 UTC
b5554ac8114f2ce7ce8b5973690ccb8cbb248efd
3 files changed
+14
-2
apps/server/src/cloud/ConnectReachability.test.ts
+3
-2
@@ -47,7 +47,8 @@ describe("classifyReachability", () => {
47
[{ kind: "status", status: 502 }, "origin_unreachable"],
48
[{ kind: "status", status: 530 }, "no_connector"],
49
[{ kind: "status", status: 530, cloudflareError: "1033" }, "no_connector"],
50
- [{ kind: "status", status: 530, cloudflareError: "1016" }, "unexpected_response"],
50
+ [{ kind: "status", status: 530, cloudflareError: "1016" }, "dns_failed"],
51
+ [{ kind: "status", status: 530, cloudflareError: "1001" }, "unexpected_response"],
52
[{ kind: "network_error" }, "timeout"],
53
] as const)("maps endpoint result %o to %s", (endpoint, cause) => {
54
expect(classifyReachability(facts({ endpoint, edgeReachable: true }), checkedAt)).toMatchObject(
@@ -209,7 +210,7 @@ describe("ConnectReachability stale connector recovery", () => {
210
expect(yield* reachability.check).toMatchObject({ status: "reachable" });
211
status = 530;
212
body = { cloudflareError: 1016 };
212
- expect(yield* reachability.check).toMatchObject({ cause: "unexpected_response" });
213
+ expect(yield* reachability.check).toMatchObject({ cause: "dns_failed" });
214
yield* TestClock.adjust(Duration.minutes(2));
215
expect(yield* Queue.size(restarts)).toBe(0);
216
apps/server/src/cloud/ConnectReachability.ts
+7
@@ -151,6 +151,13 @@ export function classifyReachability(
151
restart,
152
);
153
}
154
+ if (status === 530 && cloudflareError === "1016") {
155
+ return fail(
156
+ "dns_failed",
157
+ "The T3 Connect address no longer points to this machine's tunnel (Cloudflare error 1016). T3 Connect may have removed this environment.",
158
+ "Link this environment again. Turn T3 Connect off and on in Settings > Sharing & access, or run `t3 connect link` and then restart T3 Code.",
159
+ );
160
+ }
161
if (status !== null) {
162
const code = cloudflareError === undefined ? "" : ` (Cloudflare error ${cloudflareError})`;
163
return fail(
docs/user/t3-connect-troubleshooting.md
+4
@@ -80,6 +80,10 @@ Fix:
80
3. If the check fails only on the host, check the host's DNS, VPN, or proxy.
81
If it says the host's network has an old cached answer, wait: it usually
82
clears within about 30 minutes.
83
+4. If it says the address no longer points to this machine's tunnel, the
84
+ environment was likely removed from T3 Connect. Link it again: on a desktop
85
+ host, turn **T3 Connect** off and on in **Settings > Sharing & access**. On a
86
+ command-line host, run `t3 connect link`, then restart T3 Code.
87
88
## This device can't reach T3 Connect
89