Repository navigation
Conversation
Two gaps from the previous Windows spawn fix: 1. claude-pty.ts spawned 'claude' directly via node-pty, hitting the same .cmd batch script issue on Windows. Route through cmd.exe /c so Windows handles PATHEXT resolution. 2. codex-fetcher.ts PTY path only routed through cmd.exe when the resolved command had a .cmd/.bat extension, missing the bare 'codex' fallback case. Simplified to always use cmd.exe /c on win32. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
Author
|
Closing in favor of the pnpm-codex-fix branch (Jinwoo-H/pnpm-codex-fix), which subsumes this PR's Windows cmd.exe routing fix for both claude-pty.ts and codex-fetcher.ts, and additionally adds resolveClaudeCommand() path resolution + pnpm/yarn/bun global bin support. |
Jinwoo-H
added a commit
that referenced
this pull request
Apr 14, 2026
…I-launched apps GUI-launched Electron apps don't inherit shell PATH, so spawning bare 'codex' or 'claude' fails for users who installed via pnpm, yarn, or bun. - Generalize resolveCodexCommand() into a shared resolveCommand() that works for any CLI name, and export resolveClaudeCommand() alongside it - Add pnpm global bin dirs (macOS ~/Library/pnpm, Linux ~/.local/share/pnpm, Windows AppData/Local/pnpm) - Add yarn global bin dirs (~/.yarn/bin, Windows AppData/Local/Yarn/bin) - Add bun global bin (~/.bun/bin on all platforms) - Wire claude-pty.ts to use resolveClaudeCommand() instead of bare 'claude' - Simplify Windows PTY spawn to always route through cmd.exe on win32, fixing the bare-command PATHEXT fallback edge case (subsumes #638) Closes #638
This was referenced Apr 14, 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.
Summary
claude-pty.tsspawned'claude'directly via node-pty, hitting the same.cmdbatch script issue fixed for Codex in fix: resolve Codex spawn failures on Windows #562. Now routes throughcmd.exe /con win32.cmd.exewhen the resolved command had a.cmd/.batextension, missing the bare'codex'fallback whenresolveCodexCommand()can't locate the binary on disk. Simplified to always usecmd.exe /con win32.All changes are guarded by
process.platform === 'win32'— zero impact on macOS/Linux.Test plan
🤖 Generated with Claude Code