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.
TypeScript adhdagent-orchestrationai-agentscanvasclaude-codecodexcoding-agentsdeveloper-toolselectrongeminilinuxmacosmultiplexeropencodeparallel-agentsterminalterminal-emulatorterminal-multiplexertmuxworkspace-manager
fix(windows): fail Codex app-server legs fast instead of spawning an undialable daemon
review9cc8dee24cbc
diff --git a/docs/codex-accounts-acceptance.md b/docs/codex-accounts-acceptance.mdindex 32b190bc8..906caa114 100644--- a/docs/codex-accounts-acceptance.md+++ b/docs/codex-accounts-acceptance.md@@ -75,6 +75,12 @@ Codex install + a **logged-in 2nd managed account**. Headless CI cannot run them`CODEX_HOME` set to the managed home (`echo %CODEX_HOME%` / `$env:CODEX_HOME`).- [ ] **System Codex row** shows the email from `%USERPROFILE%\.codex\auth.json`.- [ ] **No `codex app-server daemon start`** process appears while a login is pending.+- [ ] **Remove does not follow the junctions.** After removing a managed account whose `skills` /+ `plugins` were junctioned in, `%USERPROFILE%\.codex\skills` and `plugins` are still intact+ (`fs.rm` must unlink the junction, never recurse through it into the system home).+- [ ] **Conversation switch / transfer** between Codex accounts fails at once with "The Codex+ app-server is not reachable on Windows yet" (no daemon spawned, no 15 s wait) — the explicit+ degrade until a named-pipe app-server endpoint exists.## Happy-path acceptance walk (the one a human runs end to end)diff --git a/src/main/codex-accounts.test.ts b/src/main/codex-accounts.test.tsindex c72dac9a9..5698b317c 100644--- a/src/main/codex-accounts.test.ts+++ b/src/main/codex-accounts.test.ts@@ -178,6 +178,14 @@ describe('Codex identity on a host with no reachable app-server (Windows)', () =expect(readAccount).not.toHaveBeenCalled()})+ it('a leg that NEEDS the app-server (transfer) fails at once with a named error — no daemon spawn', async () => {+ await expect(+ call(IPC.codexAccountsTransferThreadToSsh, 'thread-1', '/work', 'proj-1', undefined, undefined)+ ).rejects.toThrow(/not reachable on Windows/)+ expect(findInLoginPath).not.toHaveBeenCalled()+ expect(readAccount).not.toHaveBeenCalled()+ })+it('POSIX keeps the app-server path (regression pin)', async () => {const { setCodexAccountsHostPlatformForTests } = await import('./codex-accounts')setCodexAccountsHostPlatformForTests('linux')diff --git a/src/main/codex-accounts.ts b/src/main/codex-accounts.tsindex 7a77a4865..ba1f9ef51 100644--- a/src/main/codex-accounts.ts+++ b/src/main/codex-accounts.ts@@ -100,6 +100,12 @@ export function localCodexSocket(accountId?: string): string {return codexSocketForAccount(platform().userDataDir, accountId)}+/** The host OS the app-server legs branch on — a seam so the Windows leg is testable on Linux. */+let hostPlatform = (): NodeJS.Platform => process.platform+export function setCodexAccountsHostPlatformForTests(p: NodeJS.Platform | null): void {+ hostPlatform = p ? () => p : () => process.platform+}+/*** Reuse the account's shared app-server if it is already answering on its control socket, else boot* one exactly once (§2.2). The managed home is migrated to its short form first so the app-server@@ -107,6 +113,12 @@ export function localCodexSocket(accountId?: string): string {* device-verification owed; the control flow (probe → start-once) is pure and tested via injection.*/export async function ensureCodexAccountDaemon(accountId?: string): Promise<void> {+ // No `ws+unix` app-server on Windows (`codexAppServerReachable`): starting one could only spawn a+ // daemon nothing can dial and then time out (15 s) — say so at once instead. Identity no longer+ // comes through here on Windows; this is what the conversation switch / transfer legs hit.+ if (!codexAppServerReachable(hostPlatform())) {+ throw new Error('The Codex app-server is not reachable on Windows yet')+ }if (accountId) migrateLegacyCodexAccountHome(platform().userDataDir, accountId)const socket = localCodexSocket(accountId)await ensureSharedCodexDaemon(@@ -147,12 +159,6 @@ async function initializeAccountHome(id: string): Promise<string> {return home}-/** The host OS the identity read branches on — a seam so the Windows leg is testable on Linux. */-let hostPlatform = (): NodeJS.Platform => process.platform-export function setCodexAccountsHostPlatformForTests(p: NodeJS.Platform | null): void {- hostPlatform = p ? () => p : () => process.platform-}-async function accountIdentity(accountId?: string): Promise<{ email: string | null } | null> {if (!codexAppServerReachable(hostPlatform())) return authFileIdentity(accountId)await ensureCodexAccountDaemon(accountId)