Skip to content

fix: Windows support for Claude CLI path resolution#58

Open
thoraxe wants to merge 1 commit intovultuk:mainfrom
thoraxe:fix/windows-claude-path-resolution
Open

fix: Windows support for Claude CLI path resolution#58
thoraxe wants to merge 1 commit intovultuk:mainfrom
thoraxe:fix/windows-claude-path-resolution

Conversation

@thoraxe
Copy link

@thoraxe thoraxe commented Jan 19, 2026

Summary

  • Add Windows-specific paths to search for Claude CLI executable
  • Use where command instead of which on Windows
  • Return full path from commandExists() to fix node-pty spawn issues
  • Add CLAUDE_COMMAND environment variable override
  • Use USERPROFILE for home directory on Windows

Problem

On Windows, node-pty requires the full path to executables, not just the command name. The previous implementation would find claude via the where command but return just the string 'claude' instead of the full path, causing node-pty to fail with "File not found" errors.

Solution

Modified commandExists() to return the full resolved path from where/which output, and updated findClaudeCommand() to use this full path when spawning processes.

Test plan

  • Tested on Windows 11 with Claude CLI installed at ~/.local/bin/claude.exe
  • Should be tested on Linux/macOS to ensure no regression

🤖 Generated with Claude Code

- Add Windows-specific paths to search for Claude CLI executable
- Use 'where' command instead of 'which' on Windows
- Return full path from commandExists() to fix node-pty spawn issues
- Add CLAUDE_COMMAND environment variable override
- Use USERPROFILE for home directory on Windows

node-pty on Windows requires the full path to executables, not just
the command name. This change ensures the full path is resolved and
used when spawning the Claude process.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

1 participant