Back to Signal Feed
CodeTracked since May 20, 2026

Fix Windows ENOENT in ruflo-cost-tracker npx spawning

This PR adds a Windows-only `shell` flag to all `spawnSync` calls that invoke `npx` in `ruflo-cost-tracker`, preventing Node 21+ on Windows from failing with `ENOENT` and letting cost-tracking commands execute successfully.

child_process.spawnSyncnpxWindowsNode.js 21+

What Happened

  • This PR adds a Windows-only `shell` flag to all `spawnSync` calls that invoke `npx` in `ruflo-cost-tracker`, preventing Node 21+ on Windows from failing with `ENOENT` and letting cost-tracking commands execute successfully.
  • This PR adds a Windows-only `shell` flag to all `spawnSync` calls that invoke `npx` in `ruflo-cost-tracker`, preventing Node 21+ on Windows from failing with `ENOENT` and letting cost-tracking commands execute successfully.
  • 1 evidence item attached for review.

What is Different

Before

Scattered source updates, isolated context, and manual follow-up across multiple feeds.

Now

Patched 15 `spawnSync` call sites across seven cost-tracking scripts (`track`, `budget`, `summary`, `conversation`, `export`, `federation`, `outcome`) so `npx` invocations use `shell: process.platform === 'win32'` on Windows while preserving `shell: false` behavior on POSIX.

Why Track This

Why It Matters

Windows users of `ruflo-cost-tracker` will now get reliable `cost track/summary/report` results instead of silent failures that looked like valid-but-empty cost data (`Persisted: FAILED` and `$0.0000`), which makes budget and optimization checks usable again in CI and operator workflows. The fix works by accounting for Node 21+ `.cmd/.bat` launch restrictions by turning on shell mode only on win32 for `npx`, with no behavioral change for non-Windows environments. Continue watching for two follow-ups: whether future Node versions alter Windows shell-launch semantics, and whether issue #2073 in `@claude-flow/cli` (`memory retrieve/export` returning null entries) is fixed, because read-path reports can still be incomplete even when spawn succeeds.

Impact

Windows users of `ruflo-cost-tracker` will now get reliable `cost track/summary/report` results instead of silent failures that looked like valid-but-empty cost data (`Persisted: FAILED` and `$0.0000`), which makes budget and optimization checks usable again in CI and operator workflows. The fix works by accounting for Node 21+ `.cmd/.bat` launch restrictions by turning on shell mode only on win32 for `npx`, with no behavioral change for non-Windows environments. Continue watching for two follow-ups: whether future Node versions alter Windows shell-launch semantics, and whether issue #2073 in `@claude-flow/cli` (`memory retrieve/export` returning null entries) is fixed, because read-path reports can still be incomplete even when spawn succeeds.

What To Watch Next

  • Watch whether child_process.spawnSync becomes a repeated pattern.
  • Track follow-up changes around AI Debugging and Error Localization.
  • Compare future signals against this evidence trail.
  • Re-check risk flags: watch_windows_node_spawn_changes, watch_npx_shell_behavior_regressions.
Open Topic TimelineOpen Technical EventOpen Original Sourcewatch_windows_node_spawn_changes / watch_npx_shell_behavior_regressions / watch_cli_memory_retrieve_empty_payloads

Supporting Evidence