fix(windows): avoid ENAMETOOLONG in Claude reviews#68
Open
rei-okawara-portx wants to merge 4 commits into
Open
fix(windows): avoid ENAMETOOLONG in Claude reviews#68rei-okawara-portx wants to merge 4 commits into
rei-okawara-portx wants to merge 4 commits into
Conversation
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.
Background
cc:reviewcan inline up to 64 KiB of working-tree context. The Claude CLI wrapper previously placed that entire prompt inspawn()argv, which exceeds the Windows process command-line limit before Claude starts.Problem
spawn ENAMETOOLONGon Windows.claudeshim directly is unreliable from Node on Windows because PATH normally resolves to a.cmdwrapper.APPDATA, custom npm prefixes, and PATH-selected installations.Solution
claude.exein this order:CC_PLUGIN_CODEX_CLAUDE_BINclaude.exeshims directly present inPATHPATHnpm_config_prefixAPPDATA\\npmclaudecommand lookupVerification
npm run test:cross-platform: 260 passed, 0 failednode --test tests/claude-cli.test.mjs: 92 passed, 0 failednpm run lint: passednpm run typecheck: passednpm run check:version-sync: passednpm run check:changelog: passedgit diff --check: passedcompleted, phasedone, and no job error.OKwith exit code 0.--input-format textcompatibility risk; that flag was removed because text is already the documented default.Scope / out of scope
Remaining risks
npm testcommand still includes existing platform-specific tests that assume POSIXbash,/proc, or executable test shims and is not green on native Windows. The repository's cross-platform suite is green.srt-win.exewas unavailable and disabled its OS sandbox. Standard review still exposed no Bash, Write, or Edit tools; fixing the sandbox runtime distribution is a separate issue from prompt transport.