Repository navigation
Core: launch Windows npm engines without batch argument parsing - #240
Merged
zo-sol merged 5 commits intoSep 17, 2026
Merged
Conversation
NubsCarson
marked this pull request as ready for review
September 14, 2026 16:19
This was referenced Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.