multi-agent-windows-hazardslisted
Install: claude install-skill ychampion/ystack
# Multi-agent hazards on a Windows host
Each entry: the symptom you see, the real cause, and what to do. They were found running a dozen or so
concurrent agents on one Windows box, each in its own git worktree of one repo, with CI on a
self-hosted Linux runner and PRs landed one after another. Several apply on any OS.
## Process and agent failures
### 1. Process-spawn exhaustion: `0xC0000142` / `-1073741502` (STATUS_DLL_INIT_FAILED)
**Trigger:** roughly 10+ concurrent agent process trees (codex exec plus pytest plus node or vitest
workers). Every new process in the affected sessions fails at start-up, including `git --version` and
PowerShell itself.
**Shape:** intermittent and per session. The orchestrator's own shell can keep working while
agent-spawned shells die; later even fresh agent sessions die.
**Why:** desktop-heap / session resource exhaustion. It clears partly as agents drain and fully only on
reboot.
**Do:**
- Cap concurrency (about 3 heavy test gates at once).
- If one harness's agents start dying, move the work to agents that run inside the orchestrator's
harness process.
- Tell agents: "if commands die with 0xC0000142 twice, stop and report what stands". Their edits on
disk survive, so the orchestrator can commit and push them.
- Reboot before the next heavy wave.
**Don't:** relaunch the same agent into the wall repeatedly, or blanket-kill `node.exe`: other projects
run there.
### 2. `codex exec`: "code-mode host exited during handshake"
**Trigger:**