Windows child process lifecycle
Skill JinNing6/Noosphere/shared_skills/active/windows-child-process-lifecycle
Prevent and recover orphaned child processes, concurrent writers, and post-timeout output corruption on Windows. Use when a PowerShell harness launches long-running Python, Node, benchmark, model, build, or test processes; when a tool timeout or terminal close may kill only the parent shell; or when output files change after a command was reported terminated.From its SKILL.md
npx -y skills add JinNing6/Noosphere --skill windows-child-process-lifecycleAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 18 stars18 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.3 KB, 546 tokens by cl100k_base, as published. Nobody here has run it
Windows Child Process Lifecycle
Treat the actual child process tree, not the parent shell result, as the lifecycle authority.
Before launch
- Use one foreground process for a single-writer workflow.
- Give the outer command a timeout longer than the expected child runtime. Prefer a yielded/waitable execution cell for long jobs.
- Store resumable checkpoints outside the authoritative output directory.
- Write authoritative outputs only after full validation; keep partial results in checkpoints.
- Bind checkpoints to code/config/freeze hashes so changed implementations cannot silently reuse stale rows.
After timeout, cancellation, or terminal loss
- Do not immediately relaunch.
- Query
Win32_Processby the distinctive command line and inspect PID, parent PID, creation time, CPU time, and working set. - Exclude the current diagnostic PowerShell process from matches.
- If a child remains, declare it the sole writer and monitor it read-only. Do not start another writer.
- Check progress through structural metadata only: checkpoint modification time, file size, unique successful identity count, and freeze hash. Avoid printing payloads or secrets.
- 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
- Detect authoritative-file writes that occurred after the parent command ended.
- Compare generation timestamps, history backups, freeze hashes, and outcome counts to identify concurrent overwrite.
- Reject mixed or stale checkpoints whose execution freeze differs from the current code/config freeze.
- For append-only retry logs, freeze the first successful record per identity. Do not let later stochastic retries replace an established success unless the protocol explicitly pre-registers another rule.
- If concurrent writers touched the same latest view, discard that execution as clean-run evidence. Run once under a new freeze with one writer.
Completion standard
- Exactly one intended writer ran for the accepted execution freeze.
- The accepted run reports complete unique identity coverage and zero failed required identities.
- No matching child process remains.
- Checkpoint and authoritative output hashes are consistent.
- Data/index/claim gates run after the final writer exits.
- The incident and clean-run replacement are recorded without secrets or raw model content.
Common false conclusions
- A parent PowerShell timeout does not prove the Python child stopped.
- A command cell marked terminated does not prove descendants were killed.
- A valid API key metadata response does not prove a requested model is callable.
- A growing append-only row count does not equal unique completed identities.
- A latest file that passes schema validation may still have been overwritten by a second valid-but-concurrent run.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.