Files
reliquary/docs/workpad/reports/2026-10-17-00-gremlins-taskstop-check.md
T

37 lines
2.7 KiB
Markdown

# Gremlins B4 live check: TaskStop on a backgrounded spawn
Date: Sat 2026-10-17 00:13-00:16 (local). Run by: claude-sonnet-5-5. Gremlin model: claude-haiku-5-5 (effort low). Binary 2.1.299, Windows 10 Git Bash.
Worktree HEAD e188424. Scratch: throwaway git repo in the session scratchpad `taskstop-check/`.
## Commands
- `G init --run run.md --model claude-haiku-5-5 --effort low --cwd <scratch>`
- `G train --run run.md --base b1 --brief train.md` (blocking, ok, $0.0042)
- j1: `G spawn ... --job j1` brief "sleep 300": haiku refused (harness blocks a standalone `sleep`), ended ok in 15 s, $0.0019. Not usable for the check.
- j2: `G spawn ... --job j2 --brief spawn2.md` (`run_in_background: true`). Brief: run `until [ -e /tmp/never-exists-flag ]; do sleep 2; done`. Heartbeat in raw/j2.jsonl showed the gremlin's Bash running at 30 s.
- `TaskStop` on the background call (task btfr2jl7t) at about 00:15:30, ~46 s after spawn. Returned "Successfully stopped".
- PIDs found by diffing `Win32_Process` before/after the spawn and following parent links. No process outside this chain was touched.
## Process tree (j2) and liveness after stop
| PID | name | parent | after ~5-10 s | after ~40 s |
|---|---|---|---|---|
| 22836 / 10324 / 18496 | bash.exe (harness wrappers of the spawn call) | 13436 / 22836 / 10324 | gone | gone |
| 1464 | uv.exe | 18496 | gone | gone |
| 36336 -> 22192 | python.exe (gremlins.py, 2 procs) | 1464 / 36336 | gone | gone |
| 19200 | claude.exe (gremlin, = child_pid in j2.json) | 22192 | gone | gone |
| 19580 -> 35212 | bash.exe (gremlin's Bash tool wrappers, 35212 ran the loop) | 19200 / 19580 | gone | gone |
| 25392 | conhost.exe | 35212 | gone | gone |
| sleep.exe (transient, `sleep 2`, MSYS-forked parent) | - | - | none found | none found |
No `sleep.exe` and no process with the gremlin's command line existed at either check. Nothing to clean up; no kill issued by me.
## State after the stop (`run-gremlins/`)
- `jobs/j2.json`: `status: running`, `ended: null`, `child_pid: 19200`, no note, no cost. Matches the documented hard-stop behaviour.
- `ledger.jsonl`: 2 lines (b1-train, j1). No j2 line. Matches the documented behaviour.
- `notes/`: only j1.md; the gremlin wrote no note.
## Cost
About $0.008 total (train 0.0042, j1 0.0019, j2 unrecorded, estimated <= 0.002).
## Verdict
B4 ticked for the claude process and all bash/python/uv wrappers: TaskStop killed the whole tree on Windows Git Bash. Not exercised: the spec §7 orphan case, a long single child (the loop's `sleep 2` children were too short-lived and the loop's bash died with the tree); a `sleep 300` brief is refused by the gremlin's own harness, so that case needs a different long command (for example `python -c "import time; time.sleep(300)"`).