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 22, 07:00 UTC
fix(tailscale): escalate hung serve commands to SIGKILL (#28529)
Co-authored-by: maria-rcks <maria@kuuro.net>
Rishabh_t106 committed
Nov 3, 2026 at 07:02 UTC
e2d3aa9b0fac6359a4b39e21c21a24c6f75c8764
2 files changed
+10
-7
packages/tailscale/src/tailscale.test.ts
+2
-1
@@ -338,7 +338,8 @@ describe("tailscale", () => {
338
return Effect.gen(function* () {
339
yield* readTailscaleStatus.pipe(Effect.provide(layer));
340
yield* readTailscaleSshEnabled.pipe(Effect.provide(layer));
341
- assert.deepEqual(killGraces, [500, 500]);
341
+ yield* ensureTailscaleServe({ localPort: 45_678 }).pipe(Effect.provide(layer));
342
+ assert.deepEqual(killGraces, [500, 500, 500]);
343
});
344
});
345
});
packages/tailscale/src/tailscale.ts
+8
-6
@@ -397,12 +397,14 @@ const runTailscaleCommand = Effect.fn("tailscale.runTailscaleCommand")(function*
397
};
398
const timeout = Duration.fromInputUnsafe(timeoutInput);
399
return yield* Effect.gen(function* () {
400
- const child = yield* spawner.spawn(ChildProcess.make(executable, args)).pipe(
401
- Effect.mapError((cause) => new TailscaleCommandSpawnError({ ...commandContext, cause })),
402
- Effect.catchDefect((cause) =>
403
- Effect.fail(new TailscaleCommandSpawnError({ ...commandContext, cause })),
404
- ),
405
- );
400
+ const child = yield* spawner
401
+ .spawn(ChildProcess.make(executable, args, { forceKillAfter: TAILSCALE_KILL_GRACE }))
402
+ .pipe(
403
+ Effect.mapError((cause) => new TailscaleCommandSpawnError({ ...commandContext, cause })),
404
+ Effect.catchDefect((cause) =>
405
+ Effect.fail(new TailscaleCommandSpawnError({ ...commandContext, cause })),
406
+ ),
407
+ );
408
const [stderr, exitCode] = yield* Effect.all(
409
[collectStderr(child.stderr), child.exitCode.pipe(Effect.map(Number))],
410
{ concurrency: "unbounded" },