← ClaudeAtlas

multi-agent-windows-hazardslisted

Hazards of running many parallel coding agents (codex exec, Claude subagents) on one Windows machine with git worktrees, a self-hosted CI runner and a merge train. Use when agents' commands start dying with 0xC0000142 / -1073741502, codex exec fails with "code-mode host exited during handshake", a `git stash pop` brings in another agent's files, a push to a PR branch starts no CI run, a CI job fails with no failing step and no logs, a hash guard fails right after a merge that conflicted `.gitattributes`, pytest says "could not create numbered dir ... after 10 tries", a SQLite file hash changes when nothing wrote to it, worktree removal fails with "Filename too long" or "Device or resource busy", or a "keep both sides" CSS merge silently breaks styles.
ychampion/ystack · ★ 4 · AI & Automation · score 77
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:**