windows-child-process-lifecyclelisted
Install: claude install-skill JinNing6/Noosphere
# Windows Child Process Lifecycle
Treat the actual child process tree, not the parent shell result, as the lifecycle authority.
## Before launch
1. Use one foreground process for a single-writer workflow.
2. Give the outer command a timeout longer than the expected child runtime. Prefer a yielded/waitable execution cell for long jobs.
3. Store resumable checkpoints outside the authoritative output directory.
4. Write authoritative outputs only after full validation; keep partial results in checkpoints.
5. Bind checkpoints to code/config/freeze hashes so changed implementations cannot silently reuse stale rows.
## After timeout, cancellation, or terminal loss
1. Do not immediately relaunch.
2. Query `Win32_Process` by the distinctive command line and inspect PID, parent PID, creation time, CPU time, and working set.
3. Exclude the current diagnostic PowerShell process from matches.
4. If a child remains, declare it the sole writer and monitor it read-only. Do not start another writer.
5. Check progress through structural metadata only: checkpoint modification time, file size, unique successful identity count, and freeze hash. Avoid printing payloads or secrets.
6. Let a healthy child finish naturally when safe. If termination is necessary, terminate the verified child process tree and confirm every descendant is gone before relaunching.
## Recovery and integrity
1. Detect authoritative-file writes that occurred after the parent command ended.
2. Compare generation times