Skip to content

install node in goose dir#7220

Merged
lifeizhou-ap merged 7 commits intomainfrom
lifei/win-shim-npx
Feb 17, 2026
Merged

install node in goose dir#7220
lifeizhou-ap merged 7 commits intomainfrom
lifei/win-shim-npx

Conversation

@lifeizhou-ap
Copy link
Collaborator

@lifeizhou-ap lifeizhou-ap commented Feb 14, 2026

Summary

Fixed issue #6816 that cannot load extensions starting with npx cmd in windows

Root cause: npx.cmd tries to install node which may requires system admin permission and then fails

Fix: install node in goose folder which does not require system admin permission and the node executable is self contained.

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Testing

Testing the canary build artifact in Windows and user also tested it

Copilot AI review requested due to automatic review settings February 14, 2026 00:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Windows desktop shim behavior so that npx.cmd can self-provision a portable Node.js install under Goose’s local app data directory, and removes the separate Node installer shim from the Windows bundle.

Changes:

  • Remove install-node.cmd from the set of Windows shims (and delete the script).
  • Rewrite npx.cmd to (1) reuse an existing Goose-managed Node install, (2) otherwise locate an existing npx, and (3) finally download/extract a portable Node distribution into %LOCALAPPDATA%\Goose\node.

Reviewed changes

Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.

File Description
ui/desktop/src/utils/winShims.ts Stops copying install-node.cmd into %LOCALAPPDATA%\Goose\bin; keeps npx.cmd as the shim entry point.
ui/desktop/src/platform/windows/bin/npx.cmd Adds portable Node download/extract/install fallback behavior and expands search order for existing npx.
ui/desktop/src/platform/windows/bin/install-node.cmd Removed legacy MSI-based installer script.

Copilot AI review requested due to automatic review settings February 14, 2026 00:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 4 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings February 14, 2026 02:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 4 changed files in this pull request and generated no new comments.

@michaelneale
Copy link
Collaborator

would this mean we don't use npx - or still do but it falls back to using this node? (the whole idea of npx shim is that it uses hermit to install node in its own space - if it isn't, then I think the paths are getting mixed up - it shouldnt' be installing anything to the system?)

1 similar comment
@michaelneale
Copy link
Collaborator

would this mean we don't use npx - or still do but it falls back to using this node? (the whole idea of npx shim is that it uses hermit to install node in its own space - if it isn't, then I think the paths are getting mixed up - it shouldnt' be installing anything to the system?)

@lifeizhou-ap
Copy link
Collaborator Author

lifeizhou-ap commented Feb 17, 2026

would this mean we don't use npx - or still do but it falls back to using this node? (the whole idea of npx shim is that it uses hermit to install node in its own space - if it isn't, then I think the paths are getting mixed up - it shouldnt' be installing anything to the system?)

Hermit does not support windows. To install npx on Windows, we need to install node. Before this PR, goose tries to install node in the system level. With this PR. node is installed in goose specific dir, not the system level. In this case it is similar to use hermit to install on linux/macos

IIUR, your question is more about: if user has already installed node on their system level, shall we still install node on goose dir or just use the system level node?

With this PR, we just use the system level node. We can make more change to ignore the system level node which seems cleaner

@michaelneale
Copy link
Collaborator

@lifeizhou-ap oh of course! yes windows, LGTM then!

Copy link
Collaborator

@michaelneale michaelneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@lifeizhou-ap lifeizhou-ap added this pull request to the merge queue Feb 17, 2026
Merged via the queue into main with commit 18cbe96 Feb 17, 2026
26 of 28 checks passed
@lifeizhou-ap lifeizhou-ap deleted the lifei/win-shim-npx branch February 17, 2026 08:27
lifeizhou-ap added a commit that referenced this pull request Feb 17, 2026
lifeizhou-ap added a commit that referenced this pull request Feb 17, 2026
tlongwell-block added a commit that referenced this pull request Feb 17, 2026
* origin/main:
  docs: playwright CLI skill tutorial (#7261)
  install node in goose dir (#7220)
  fix: relax test_basic_response assertion for providers returning reasoning_content (#7249)
  fix: handle reasoning_content for Kimi/thinking models (#7252)
  feat: sandboxing for macos (#7197)
  fix(otel): use monotonic_counter prefix and support temporality env var (#7234)
  Streaming markdown (#7233)
  Improve compaction messages to enable better post-compaction agent behavior (#7259)
  fix: avoid shell-escaping special characters except quotes (#7242)
  fix: use dynamic port for Tetrate auth callback server (#7228)
  docs: removing LLM Usage admonitions (#7227)
  feat(otel): respect standard OTel env vars for exporter selection (#7144)
  fix: fork session (#7219)
  Bump version numbers for 1.24.0 release (#7214)
  Move platform extensions into their own folder (#7210)
  fix: ignore deprecated skills extension (#7139)

# Conflicts:
#	Cargo.lock
#	Cargo.toml
zanesq added a commit that referenced this pull request Feb 17, 2026
…led-extensions-cmd

* 'main' of github.com:block/goose: (24 commits)
  Set up direnv and update flake inputs (#6526)
  fix: restore subagent tool call notifications after summon refactor (#7243)
  fix(ui): preserve server config values on partial provider config save (#7248)
  fix(claude-code): allow goose to run inside a Claude Code session (#7232)
  fix(openai): route gpt-5 codex via responses and map base paths (#7254)
  feat: add GoosePlatform to AgentConfig and MCP initialization (#6931)
  Fix copied over (#7270)
  feat(gemini-cli): add streaming support via stream-json events (#7244)
  fix: filter models without tool support from recommended list (#7198)
  fix(google): handle more thoughtSignature vagaries during streaming (#7204)
  docs: playwright CLI skill tutorial (#7261)
  install node in goose dir (#7220)
  fix: relax test_basic_response assertion for providers returning reasoning_content (#7249)
  fix: handle reasoning_content for Kimi/thinking models (#7252)
  feat: sandboxing for macos (#7197)
  fix(otel): use monotonic_counter prefix and support temporality env var (#7234)
  Streaming markdown (#7233)
  Improve compaction messages to enable better post-compaction agent behavior (#7259)
  fix: avoid shell-escaping special characters except quotes (#7242)
  fix: use dynamic port for Tetrate auth callback server (#7228)
  ...
katzdave added a commit to YusukeShimizu/goose that referenced this pull request Feb 17, 2026
* origin/main: (263 commits)
  working_dir usage more clear in add_extension (block#6958)
  Use Canonical Models to set context window sizes (block#6723)
  Set up direnv and update flake inputs (block#6526)
  fix: restore subagent tool call notifications after summon refactor (block#7243)
  fix(ui): preserve server config values on partial provider config save (block#7248)
  fix(claude-code): allow goose to run inside a Claude Code session (block#7232)
  fix(openai): route gpt-5 codex via responses and map base paths (block#7254)
  feat: add GoosePlatform to AgentConfig and MCP initialization (block#6931)
  Fix copied over (block#7270)
  feat(gemini-cli): add streaming support via stream-json events (block#7244)
  fix: filter models without tool support from recommended list (block#7198)
  fix(google): handle more thoughtSignature vagaries during streaming (block#7204)
  docs: playwright CLI skill tutorial (block#7261)
  install node in goose dir (block#7220)
  fix: relax test_basic_response assertion for providers returning reasoning_content (block#7249)
  fix: handle reasoning_content for Kimi/thinking models (block#7252)
  feat: sandboxing for macos (block#7197)
  fix(otel): use monotonic_counter prefix and support temporality env var (block#7234)
  Streaming markdown (block#7233)
  Improve compaction messages to enable better post-compaction agent behavior (block#7259)
  ...

# Conflicts:
#	crates/goose/src/providers/openai.rs
zanesq added a commit that referenced this pull request Feb 17, 2026
…ions-fallback

* 'main' of github.com:block/goose: (43 commits)
  Added cmd to validate bundled extensions json (#7217)
  working_dir usage more clear in add_extension (#6958)
  Use Canonical Models to set context window sizes (#6723)
  Set up direnv and update flake inputs (#6526)
  fix: restore subagent tool call notifications after summon refactor (#7243)
  fix(ui): preserve server config values on partial provider config save (#7248)
  fix(claude-code): allow goose to run inside a Claude Code session (#7232)
  fix(openai): route gpt-5 codex via responses and map base paths (#7254)
  feat: add GoosePlatform to AgentConfig and MCP initialization (#6931)
  Fix copied over (#7270)
  feat(gemini-cli): add streaming support via stream-json events (#7244)
  fix: filter models without tool support from recommended list (#7198)
  fix(google): handle more thoughtSignature vagaries during streaming (#7204)
  docs: playwright CLI skill tutorial (#7261)
  install node in goose dir (#7220)
  fix: relax test_basic_response assertion for providers returning reasoning_content (#7249)
  fix: handle reasoning_content for Kimi/thinking models (#7252)
  feat: sandboxing for macos (#7197)
  fix(otel): use monotonic_counter prefix and support temporality env var (#7234)
  Streaming markdown (#7233)
  ...

# Conflicts:
#	crates/goose/src/config/extensions.rs
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.

2 participants