Skip to content

fix(dev): support Node tool shims on Windows - #2054

Merged
jariy17 merged 1 commit into
aws:mainfrom
aidandaly24:fix/windows-node-dev-spawn
Aug 21, 2026
Merged

fix(dev): support Node tool shims on Windows#2054
jariy17 merged 1 commit into
aws:mainfrom
aidandaly24:fix/windows-node-dev-spawn

Conversation

@aidandaly24

Copy link
Copy Markdown
Contributor

Description

Fixes the two consecutive Windows failures that prevent TypeScript CodeZip agents from starting
under agentcore dev.

On Windows, npm package commands are commonly .cmd shims and cannot be launched directly through
Node's spawn APIs. The dev server previously raw-spawned both npm install and
npx tsx watch .... The install failure also discarded the process creation error and displayed
unknown error; manually installing dependencies only advanced the flow to the same
spawn npx ENOENT failure.

This change:

  • runs npm, pnpm, and yarn installation through the existing Windows-aware subprocess helper
  • launches npx tsx watch through the platform shell on Windows while preserving direct spawning
    on POSIX
  • retains process creation errors in captured stderr instead of reporting unknown error
  • writes browser-mode agent messages to the advertised dev log as well as the display callback
  • adds regression coverage for Windows command routing, install failures, subprocess diagnostics,
    and web-UI log persistence

Related Issue

Closes #1849
Closes #2036

Documentation PR

N/A. This restores the documented TypeScript development workflow on Windows.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • N/A - no src/assets/ files were modified

Additional verification:

  • npm run build
  • npm run format:check
  • Focused dev/subprocess tests: 56 passed
  • Full unit suite: 6,115 passed
  • Integration tests: 336 passed, 1 skipped
  • Windows behavior is covered through platform-mode unit tests; no Windows host was available for
    local end-to-end execution

Checklist

  • I have read the CONTRIBUTING document
  • I have added necessary tests that prove the fix is effective
  • No documentation change is required
  • No new example is required
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@aidandaly24
aidandaly24 requested a review from a team August 20, 2026 01:49
@github-actions github-actions Bot added the size/m PR size: M label Aug 20, 2026
@github-actions github-actions Bot added the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 20, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Aug 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.27.1.tgz

How to install

gh release download pr-2054-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-0.27.1.tgz

@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Aug 20, 2026
@github-actions github-actions Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Aug 20, 2026

@Hweinstock Hweinstock left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is there any way we can get a windows env to test this? want to make sure we're good to unblock #2050 (comment).

@jariy17

jariy17 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

I verified this works with a Windows Environment. However, we should look into using cross-spawn. It handles platform specific behaviors for us like converting file path into Windows compatible path. We should use this in the refactor dev one when we can.

@jariy17
jariy17 merged commit 6a288f9 into aws:main Aug 21, 2026
34 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to install Node dependencies: unknown error Bug: agentcore dev fails with [TsAgent] Failed to start: spawn npx ENOENT on Windows

3 participants