# Release v1.4.x - Changelog

Released: Unreleased

## Overview

Cross-platform compatibility improvements for Windows and exFAT filesystems.

## Fixes

### Windows: spawn ENOENT for pm2 and npm commands
- All `spawn('pm2', ...)` and `execFile('pm2', ...)` calls now use `shell: true` on Windows (`process.platform === 'win32'`), where pm2 is a `.cmd` wrapper that `spawn` can't find without shell
- Affects: autofixer, browser service, CoS, log streaming, pm2 service, scaffold, socket service
- Also fixes `spawn('npm', ...)` in scaffold route (same `.cmd` issue)

### Windows/exFAT: npm install symlink failure
- Removed npm `workspaces` config from root `package.json` — workspaces always create symlinks which fail on exFAT (no symlink support)
- The `install:all` script and setup scripts already handle per-directory installs independently, so workspaces were unnecessary

### Cross-platform path separators in PM2 config
- `ecosystem.config.cjs` now uses `path.join()` instead of string concatenation for the Vite script and client cwd paths, avoiding mixed separators on Windows

### Windows: Unix-only shell commands crash server
- Replaced `2>/dev/null || true` bash redirects with try/catch in `subAgentSpawner.js` (was crashing via unhandled rejection)
- Replaced `ps` process checks with cross-platform `process.kill(pid, 0)` in `cos.js` and `subAgentSpawner.js`
- Added Windows `tasklist` alternative for process stats in `cos-runner` and `subAgentSpawner`
- Fixed `platform.js` port detection: removed bash redirects, uses `LISTENING` keyword on Windows
- Fixed `cos.js` health check: platform-specific memory command (`wmic` on Windows, `vm_stat` on macOS, `free` on Linux)

### CoS auto-spawns agents on fresh install
- Skip improvement task generation during initial startup evaluation to prevent auto-spawning agents when no tasks should exist yet
- Regular scheduled evaluations still generate improvement tasks as normal

### Windows: Vite UI fails to start via PM2
- PM2 was running `node_modules/.bin/vite` which is a Unix shell script on Windows — Node.js tried to parse it as JS
- Changed to reference the actual JS entry point (`client/node_modules/vite/bin/vite.js`) directly
