Skip to content

Fix npx detection on Windows and stop missing tools from blocking connect - #626

Merged
RBilly merged 2 commits into
mainfrom
maestro/npx-detection-bug-290
Nov 13, 2026
Merged

RBilly merged 2 commits into
mainfrom
maestro/npx-detection-bug-290

Conversation

@RBilly

@RBilly RBilly commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

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 npx as missing until the user edited ~/.maestro/tools.json from ...\nodejs\npx to ...\nodejs\npx.cmd.

Node for Windows ships an extensionless POSIX npx script beside npx.cmd. When which misses (the daemon's PATH lacks the Node folder), the fallback lookup tried the bare name first, and is_executable accepted any file on Windows. The script was resolved and saved to tools.json; CreateProcess refuses it (os error 193), and since the saved override still passed is_executable, it was never cleared.

is_executable now accepts only exe, cmd, bat and com on Windows. The lookup then finds npx.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:

  • Not installed? Install it, then Check again, which reruns the tool checks without reconnecting.
  • Already installed? Maestro did not detect it: enter its full path. The daemon runs it, and saves it to tools.json only if it runs.

Setting a path had no UI since the Home redesign removed the old preflight dialog, and the unused SetToolPath message was later deleted. It comes back here, so PROTOCOL_VERSION goes 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:

  • Fixed npx being reported missing on Windows after the first launch, and connections now open with a warning instead of asking to continue on every connect when a tool such as git is missing

🤖 Generated with Claude Code

RBilly and others added 2 commits November 12, 2026 11:30
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>
@RBilly
RBilly merged commit 88f81f3 into main Nov 13, 2026
3 checks passed
@RBilly
RBilly deleted the maestro/npx-detection-bug-290 branch November 13, 2026 09:51
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