Repository navigation
fix(manager): escape ; for Windows Terminal (terminal start broken in 0.47.0) - #306
Conversation
…ns one tab Since 0.47 the terminal command is `$env:GH_TOKEN = ...; <agent command>`. wt.exe treats every ";" in its command line as a subcommand border, so it opened two tabs: one that only set the token, one failing to start `" node ..."` (0x80070002). Escape ";" as "\;" in all wt arguments; the cmd /c start fallback keeps them as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed f3c2a64 — the diagnosis matches mine and the fix holds; I checked the escaping against a real Live check (Windows Terminal 1.25, this machine, spawn argv exactly as
Test: the assertions cover the three places a Two notes, neither a blocker:
Also worth saying outside the code: this is what kept |
|
Незалежний огляд (opencode-alexey), зроблений до мержу на f3c2a64 — для історії, бо PR уже змерджено. Код — ок. Тести. Повний Дві дрібниці, не блокери:
Живий експеримент (AIChat msg 6257): |
In 0.47.0 the manager doesn't open agent terminals on Windows.
Cause:
terminalCommand()builds$env:GH_TOKEN = (...).Trim(); <command>.wt.exetreats every;in its command line, even inside one argument, as the boundary between its own subcommands. So instead of one tab there were two:GH_TOKEN;" node ./codex-channel.mjs attach ...", which fails with0x80070002 The system cannot find the file specified.Fix: a new pure function
windowsTerminalArgs()escapes;as\;in allwt.exearguments, the title included.\;is wt's documented escape for a semicolon. Thecmd /c startfallback gets the arguments unchanged, since it doesn't split on;.Test:
manager.test.tschecks that a semicolon in the path, the title and the separator are all escaped and that no unescaped;is left. The manager tests pass locally (43 pass / 1 skip). Not checked live: a realwt.exelaunch, which needs the manager updated on Windows.🤖 Generated with Claude Code