Re-examined concurrency with full context from 13 passes.
Found races that P4 couldn't see:
P4-9: status.json 51 read-modify-write sites with NO locking.
spawnAgent goroutine vs status MCP tool vs drainOne vs shutdown
— classic TOCTOU, status corruption in production.
P4-10: Fs.Write uses os.WriteFile (truncate+write, not atomic).
Concurrent reader sees empty file during write window.
Root cause of P4-9. Need WriteAtomic (temp+rename).
P4-11: Config map values shared by reference after Set.
Goroutine mutates map retrieved from Config — unprotected.
P4-12: Global logger race — Default() may return nil before Core sets it.
P4-9 is likely causing real status corruption in production.
The 51 unprotected read-modify-write sites on status.json
explain workspace status inconsistencies.
108 findings total, 3,700+ lines.
Co-Authored-By: Virgil <virgil@lethean.io>