fix(cli): preserve Windows command arguments - #469
Open
christso wants to merge 8 commits into
Open
Conversation
Deploying allagents with
|
| Latest commit: |
2775dce
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://79aaeea5.allagents.pages.dev |
| Branch Preview URL: | https://fix-466-windows-spawn.allagents.pages.dev |
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.
Summary
Windows native CLI operations now preserve each argument exactly and no longer emit Node's
DEP0190warning. The shared executor resolves npm.cmdshims to their declared Node interpreter before using shell-free process spawning, so globally installed Claude, Copilot, and Codex CLIs still work without exposing MCP URLs, headers, environment values, plugin names, or other dynamic arguments tocmd.exeparsing.The resolver follows the configured
PATHandPATHEXTorder, ignores implicit working-directory entries, prefers an npm shim's siblingnode.exe, and rejects nested batch, PowerShell, or unsupported interpreter paths. A Windows-only CI regression runs the bundled helper from Node and Bun parents and covers argument preservation plus these resolution boundaries.Workspace setup commands are a separate execution domain: they are explicitly user-authored shell programs, launched only by
workspace setupas a single shell string. This PR does not route setup commands through the native-client resolver or change their shell syntax and compatibility. The Windows job now exercises the real setup CLI scenarios undercmd.exeas well.Closes #466
Validation
bun run buildbun run typecheckbun run lintbun test- 1,489 pass, 6 skip, 0 fail across 137 filesbun run test:e2e- 130 pass, 4 skip, 0 fail across 12 filesbun test tests/unit/core/native/types.test.ts tests/unit/cli/workspace-setup-command.test.ts- 10 pass, 1 Windows-only skip, 0 failHOME, a PATH-local fakeclaude, and a proxied MCP server containinghttps://example.test/mcp?one=1&two=2plusAuthorization=Bearer value & echo injected, rannode "$REPO/dist/index.js" --json update --offline. The CLI exited 0 and delivered the URL and header as unchanged argv elements toclaude mcp add.shell: trueand no separate argv completed withsetup-okand noDEP0190output under--trace-deprecation../dist/index.js --versionreturned1.13.6-next.1.The pre-fix native-client shell-mode probe interpreted
SAFE && printf INJECTEDas shell syntax and producedSAFEINJECTED; the shell-free native-client path does not.