@devries-cameron20 / t3code-1 / commits / 584af5af45
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

fix(ssh): record the archive lock owner's real PID (#14598)

Guillermo Casanova committed Oct 11, 2026 at 00:09 UTC 584af5af4526fea4ad623c7bad931ef97d2fdb17
2 files changed +8 -1
packages/ssh/src/tunnel.test.ts
+6
@@ -232,6 +232,12 @@ describe("ssh tunnel scripts", () => {
232 assert.notInclude(script, "npx");
233 });
234
235 + it("embeds the runner in the launch script byte for byte", () => {
236 + const runner = buildRemoteT3RunnerScript(ARCHIVE);
237 + assert.include(runner, 'printf \'%s\\n\' "$$" > "$T3_LOCK/pid.tmp"');
238 + assert.include(buildRemoteLaunchScript(ARCHIVE), runner);
239 + });
240 +
241 it("uses the remote t3 runner for launch and pairing scripts", () => {
242 const stateKey = "711bc738002d72fd";
243 const launch = SshTunnel.buildRemoteLaunchScript(ARCHIVE);
packages/ssh/src/tunnel.ts
+2 -1
@@ -240,7 +240,8 @@ function applyScriptPlaceholders(
240 ): string {
241 let result = template;
242 for (const [token, value] of Object.entries(replacements)) {
243 - result = result.replaceAll(`@@${token}@@`, value);
243 + // A replacer function keeps `$$` and other `$` patterns in the value literal.
244 + result = result.replaceAll(`@@${token}@@`, () => value);
245 }
246 return result;
247 }