Repository navigation
Fix npx detection on Windows and stop missing tools from blocking connect - #626
Merged
Merged
Conversation
Node ships a POSIX shell script `npx` beside `npx.cmd`. When `which` missed, the fallback lookup took the bare name first and is_executable accepted any file on Windows, so the script was resolved and persisted to tools.json. CreateProcess refuses it (os error 193), and the bad override never cleared. Accept only exe/cmd/bat/com on Windows. Stale entries now fail the check, are removed and resolved again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A missing tool put the connection in the failed state, and "Continue anyway" was not remembered, so a machine without git asked on every connect. Every missing tool already leaves a working, degraded connection, so attach now always comes up. A warning icon beside the connection's menu lists what is missing and what is lost. Each tool explains both ways out: install it and check again, or, if Maestro did not detect it, enter its full path. The path is probed on the target and saved to tools.json only when it runs. That restores SetToolPath, removed with its UI in d503c0c, so the protocol goes to 19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Two problems reported by a Windows user, both around Maestro's check for the tools it needs on a connection.
npx resolved to a shell script
After a fresh install the first launch worked, but every later start reported
npxas missing until the user edited~/.maestro/tools.jsonfrom...\nodejs\npxto...\nodejs\npx.cmd.Node for Windows ships an extensionless POSIX
npxscript besidenpx.cmd. Whenwhichmisses (the daemon's PATH lacks the Node folder), the fallback lookup tried the bare name first, andis_executableaccepted any file on Windows. The script was resolved and saved totools.json;CreateProcessrefuses it (os error 193), and since the saved override still passedis_executable, it was never cleared.is_executablenow accepts onlyexe,cmd,batandcomon Windows. The lookup then findsnpx.cmd, and an existing bad entry fails the check, is removed and resolved again, so affected installs repair themselves.A missing tool stopped every connect
With git missing (recommended, not required), the connection stopped in a failed state with "Continue anyway", and the choice was not remembered, so the user had to click it on every connect. Every missing tool already leaves a working, degraded connection: projects without git open as plain folders, and agents missing a dependency are disabled in the new-session dialog.
Connecting now always comes up. A warning icon beside the connection's
⋯opens a popover that says what is missing and what is lost, with both ways out:tools.jsononly if it runs.Setting a path had no UI since the Home redesign removed the old preflight dialog, and the unused
SetToolPathmessage was later deleted. It comes back here, soPROTOCOL_VERSIONgoes from 18 to 19.Verified in a dev instance: the icon and popover render, a nonexistent path is refused with its error, and a real git path is saved and clears the warning.
BEGIN_COMMIT_OVERRIDE
fix(server): skip the extensionless npx script on Windows
feat(home): warn about missing tools instead of stopping the connect
END_COMMIT_OVERRIDE
Release Notes:
🤖 Generated with Claude Code