Do not dispatch a replacement subagent for one you only ASSUME died — you get two editors on the same files
Coordination failure worth avoiding: after some subagents hit connectivity errors, I assumed a design agent had died and dispatched a fresh replacement for the same tickets/files. The original was actually still alive — so two agents edited game.js/learn.js concurrently and produced a half-merged file (duplicate variable declaration, stale refs alongside new ones). Lessons: (1) An agent going quiet or an ‘idle’ notification is NOT proof it is dead — before spawning a replacement, positively confirm the original is gone (ping it and wait, or check it is not still writing files / holding tasks). (2) If you must replace, first tell the original to STOP and report its diffs, and only then hand its files to the replacement — never run both on the same files. (3) Enforce single-writer-per-file at all times; when reassigning ownership mid-flight, make it explicit and exclusive to BOTH agents. (4) After any such collision, node --check every contested file (syntax errors like duplicate decls are the tell) and defensively commit the last-known-good state before the survivor continues. Net: assume-dead + auto-replace is how you turn a transient outage into corrupted source.