Skip to content

Node-based terminal manager for AI coding agents — tmux-backed terminals and parallel agent sessions as draggable nodes on an infinite pan/zoom canvas. macOS, Linux, and a browser Server Edition.

fix(core): build the host link path with path.win32, not the running OS's path

enescca75f1e6874
diff --git a/src/core/session-host-launcher.test.ts b/src/core/session-host-launcher.test.ts
index c6d0e3e8e..e11406d79 100644
--- a/src/core/session-host-launcher.test.ts
+++ b/src/core/session-host-launcher.test.ts
@@ -77,6 +77,8 @@ describe('WINDOWS_HOST_EXE', () => {
})
})
+// Deliberately NOT gated on the runner's platform: `platform` is a parameter, so these Windows paths
+// must resolve identically on the Linux `quality` job and on `windows-latest`.
describe('hostLauncherPath', () => {
const exe = 'C:\\Program Files\\node-terminal\\nodeterm.exe'
const link = 'C:\\Program Files\\node-terminal\\' + WINDOWS_HOST_EXE
diff --git a/src/core/session-host-launcher.ts b/src/core/session-host-launcher.ts
index 7a00fe589..995cbc023 100644
--- a/src/core/session-host-launcher.ts
+++ b/src/core/session-host-launcher.ts
@@ -109,7 +109,10 @@ export function hostLauncherPath(
fsLike: HostLinkFs = fs as unknown as HostLinkFs
): string {
if (platform !== 'win32') return execPath
- const link = path.join(path.dirname(execPath), WINDOWS_HOST_EXE)
+ // `path.win32`, not `path`: the platform is a parameter, so the separator rules must follow it
+ // rather than the OS this runs on. With the running OS's `path`, a Linux runner sees no separator
+ // in `C:\Program Files\…\nodeterm.exe` and returns a bare, cwd-relative link name.
+ const link = path.win32.join(path.win32.dirname(execPath), WINDOWS_HOST_EXE)
try {
const target = fsLike.statSync(execPath, { bigint: true })
try {