Skip to content

Core: launch Windows npm engines without batch argument parsing - #240

Merged
zo-sol merged 5 commits into
IQCoreTeam:mainfrom
NubsCarson:codex/windows-engine-226-20260914
Sep 17, 2026
Merged

zo-sol merged 5 commits into
IQCoreTeam:mainfrom
NubsCarson:codex/windows-engine-226-20260914

Conversation

@NubsCarson

@NubsCarson NubsCarson commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Addresses #226 item 9. Windows npm installs resolve to .cmd shims, which Node cannot spawn directly. Passing their arguments through cmd also reinterprets embedded quotes and shell characters. npm's read-cmd-shim now resolves the target; cross-spawn follows its shebang and launches it directly. Unknown batch wrappers fail instead of falling back to shell parsing.

Version, auth, model and Codex process launches share this path. The Claude SDK uses its spawnClaudeCodeProcess hook with the same adapter and its original abort signal. PATH resolution prefers Windows executables and shims over npm's extensionless POSIX launcher. Both dependencies are JavaScript; cross-spawn was already present transitively in the lockfile, and read-cmd-shim is npm's shim reader.

Validation refreshed at 9256715 after an ordinary merge of main. This preserves Zo's Solana SDK 0.2.0/web3.js 1.99 upgrade alongside the Windows launcher dependencies; the manifest and lockfile conflicts are resolved. Fresh Windows CI and fresh Linux test/build CI both pass. The local macOS core suite passed 477 tests with five Windows-only skips, plus core typecheck and frozen-lockfile installation. The Windows fixture suite covers quoted and shell-special arguments in spaced paths, auth detection, the SDK adapter, abort forwarding, resolver selection and rejection of unknown wrappers.

Windows checks use executable fixtures, not authenticated live Claude or Codex sessions. Arbitrary custom batch wrappers are unsupported; point the engine override at its executable or an npm shim. Native executables retain direct execution.

References: Node child processes, cross-spawn, npm read-cmd-shim.

@NubsCarson NubsCarson changed the title Core: launch Windows engine shims through cross-spawn Core: launch Windows npm engines without batch argument parsing Sep 14, 2026
@NubsCarson
NubsCarson marked this pull request as ready for review September 14, 2026 16:19
@zo-sol
zo-sol merged commit 72c458a into IQCoreTeam:main Sep 17, 2026
2 checks passed
@NubsCarson
NubsCarson deleted the codex/windows-engine-226-20260914 branch December 2, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants