[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6C32PY1ZWS7CT5VSCJFJGB8":3,"skill-same:01M6C32PY1ZWS7CT5VSCJFJGB8":112},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":13,"ownerHtmlUrl":60,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":61,"install":62,"resources":75},"01M6C32PY1ZWS7CT5VSCJFJGB8","babysit-stale-watchdog","babysit 定时任务过期看门狗","Detect enabled babysit crons whose referenced PR is MERGED or CLOSED and disable them. Companion to the in-script `is_pr_terminal()` check in babysit.py. Without this watchdog, babysit crons can run hundreds of polls for weeks after the PR they were guarding has merged or closed.","检测已启用的 babysit 定时任务：当其引用的 PR 已合并（MERGED）或关闭（CLOSED）时，将其禁用。这是 babysit.py 中脚本内 `is_pr_terminal()` 检查的配套机制。若没有该看门狗，babysit 定时任务会在其守护的 PR 合并或关闭后，仍持续轮询数周、运行数百次。","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX",null,"01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fbabysit-stale-watchdog\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQGD4WETX0HM3SM9QKQ15B","SRE 工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BSFHC0DJXKNN0QBZDDS4K9","定时任务与自动化编排","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"watchdog","babysit","babysit stale watchdog","stale","check in","terminal","for","can","companion","script","detect","via","scripts","launchd","check","hermes","python3","run","pr","2026-11-10 10:12:30",false,"---\nname: babysit-stale-watchdog\ndescription: Detect enabled babysit crons whose referenced PR is MERGED or CLOSED and disable them. Companion to the in-script `is_pr_terminal()` check in babysit.py. Without this watchdog, babysit crons can run hundreds of polls for weeks after the PR they were guarding has merged or closed.\ntrigger: \"Run every 30 min via launchd. Also manually via `python3 ~\u002F.hermes\u002Fscripts\u002Fbabysit_stale_watchdog.py`.\"\n---\n\n# ? IF YOU ARE READING THIS BECAUSE THE USER ASKED WHY A THREAD IS FULL OF CRON SPAM, JUMP TO `references\u002Fecho-loop-stale-babysit-recovery.md` FIRST ?\n\nThe recovery recipe there is the single-call cleanup. Do not read the rest of this SKILL.md until the babysit is cancelled and the thread is quiet. Companion skill for the loop half: `gateway-loop-standdown` (read its top-of-file warning before posting any reply in that noisy thread).\n\n---\n\n# babysit-stale-watchdog\n\n## Why\n\nBug-ref: 2026-07-03 — `babysit-wa-2403-PR7711` fired **251 polls over 11 days** after PR #7711 merged. The original `babysit.py` only recognized \"PR created\" (a worker output event) as terminal, not \"PR MERGED on GitHub\" (an external event). The cron kept spamming Slack with \"TERMINAL: merged\" pings until Jeffrey noticed.\n\n## What\n\nTwo-layer fix:\n\n1. **In-script** (`babysit.py` `is_pr_terminal()`): poll() now extracts any PR ref from the task_summary, calls `gh pr view --json state`, and if the PR is MERGED or CLOSED, posts one terminal message and exits the babysit loop. **19\u002F19 tests pass.**\n\n2. **Watchdog** (`babysit_stale_watchdog.py`): belt-and-suspenders. Runs every 30 min via launchd. Even if `babysit.py` is broken or running against an old prompt, the watchdog catches the stale job and disables it within 30 min. **9\u002F9 tests pass.**\n\n## Install\n\n```bash\n# 1. Copy template to deployed plist (substitute @HOME@)\ncp ~\u002F.hermes\u002Flaunchd\u002Fai.hermes.schedule.babysit-stale-watchdog.plist.template \\\n   ~\u002FLibrary\u002FLaunchAgents\u002Fai.hermes.schedule.babysit-stale-watchdog.plist\n\n# 2. Verify syntax\nplutil -lint ~\u002FLibrary\u002FLaunchAgents\u002Fai.hermes.schedule.babysit-stale-watchdog.plist\n\n# 3. Load + start\nlaunchctl load -w ~\u002FLibrary\u002FLaunchAgents\u002Fai.hermes.schedule.babysit-stale-watchdog.plist\nlaunchctl kickstart -k gui\u002F$(id -u)\u002Fai.hermes.schedule.babysit-stale-watchdog\n\n# 4. Verify it's running\nlaunchctl list | grep babysit-stale-watchdog\ntail -5 ~\u002F.hermes\u002Fcron\u002Foutput\u002Fbabysit-stale-watchdog.log\n```\n\n## Verify\n\n```bash\n# Run once manually\npython3 ~\u002F.hermes\u002Fscripts\u002Fbabysit_stale_watchdog.py\n\n# Run unit + e2e tests\npython3 ~\u002F.hermes\u002Fscripts\u002Ftests\u002Ftest_babysit_stale_watchdog.py    # 9 tests\npython3 ~\u002F.hermes\u002Fskills\u002Fao-babysit\u002Fscripts\u002Ftest_babysit_pr_exit.py  # 19 tests\n```\n\n## Files\n\n- `~\u002F.hermes\u002Fscripts\u002Fbabysit_stale_watchdog.py` — the watchdog\n- `~\u002F.hermes\u002Fscripts\u002Ftests\u002Ftest_babysit_stale_watchdog.py` — 9 tests\n- `~\u002F.hermes\u002Fskills\u002Fao-babysit\u002Fscripts\u002Fbabysit.py` — restored + patched with `is_pr_terminal()`\n- `~\u002F.hermes\u002Fskills\u002Fao-babysit\u002Fscripts\u002Ftest_babysit_pr_exit.py` — 19 tests\n- `~\u002F.hermes\u002Flaunchd\u002Fai.hermes.schedule.babysit-stale-watchdog.plist.template` — committed plist template\n\n## Pitfalls\n\n- **`babysit.py` was deleted** in commit `4a7befcfa4` (squash-merge of feat\u002Fhermes-agent-default into main) — only the .pyc survived. Every cron prompt that referenced `python3 ~\u002F.hermes\u002Fskills\u002Fao-babysit\u002Fscripts\u002Fbabysit.py poll ...` was failing silently. **Restored from `git show 4a7befcfa4^:skills\u002Fao-babysit\u002Fscripts\u002Fbabysit.py`** plus the new merged-PR check.\n- **Default repo for bare `PR #NNNN` refs**: defaults to `$GITHUB_REPOSITORY` since that's the most common babysit target (5 of 5 in the 2026-07-03 sweep). If babysits for other repos get created, the URL form `https:\u002F\u002Fgithub.com\u002Fo\u002Fr\u002Fpull\u002FN` is exact — prefer that.\n- **Parked-handoff end-state (worker never spawned)** — see `references\u002Fworker-not-spawned-parked-handoff.md` for the three-way check (session + PR + operator reply) and the verbatim cancel recipe. Verified 2026-07-22 on cron `5a771c731157` (thread `C0AH3RY3DK6\u002Fp1784721612.183329`); this is the third end-state the watchdog catches, alongside PR-MERGED and PR-CLOSED.\n- **gh failures fall through to \"not terminal\"** — if `gh` is down or rate-limited, the watchdog leaves the job enabled rather than disabling it. The in-script `is_pr_terminal()` has the same fallback.\n- **`cronjob` CLI may not exist on PATH** (verified 2026-07-31, thread C09GRLXF9GR\u002Fp1784235989.925899): the recovery recipe in `references\u002Fecho-loop-stale-babysit-recovery.md` assumes `cronjob action=remove job_id=\u003Cid>` works, but `cronjob` returned `command not found` from the gateway session. `~\u002F.hermes\u002Fscripts\u002Fcronjob*` files absent, `hermes_tools` Python module not importable. When the recovery recipe's `cronjob` invocation fails, fall back in this order: (a) `launchctl bootout gui\u002F$(id -u)\u002Fai.hermes.schedule.cronjob-\u003Cname>` if the babysit runs under a named launchd plist; (b) look for a cronjob dispatcher under `~\u002F.local\u002Fbin\u002F`, `~\u002F.hermes\u002Fbin\u002F`, or `~\u002Fbin\u002F` — many Hermes installs put it there rather than on PATH; (c) ask the user to type `stop reminder \u003Cbabysit-name>` in-thread (the babysit prints this hint itself); (d) treat the babysit as an external system you cannot cancel and focus on the closeout post instead. Do NOT loop on \"tool not found\" — pick one fallback, post the closeout, and stop.\n- **Watchdog is silent by design**: only writes a log line when a job gets disabled. No daily digest.\n- **Watchdog requires the launchd plist to be installed AND loaded.** If the plist is missing from `~\u002FLibrary\u002FLaunchAgents\u002F`, every check is a no-op — babysit crons will spam forever after their PR terminal-states. Verified 2026-07-31: cron `wa-pr-8466-babysit` (job `124ad03896f5`) was still firing ~40 rate-limit-error polls\u002Fday into the user's real Slack thread 7+ days after [PR #8466](https:\u002F\u002Fgithub.com\u002F$GITHUB_REPOSITORY\u002Fpull\u002F8466) merged on 2026-07-24. The skill's \"Install\" section above is required, not optional. Verification recipe: `launchctl list | grep babysit-stale-watchdog` MUST return a row; `tail -5 ~\u002F.hermes\u002Fcron\u002Foutput\u002Fbabysit-stale-watchdog.log` MUST show a recent heartbeat. If either check fails, the watchdog is silently broken and stale babysits will run indefinitely. This is the canonical failure mode for the cron spam pattern; do not assume the watchdog is active just because the skill file exists.\n- **Babysit `gh pr view` failures are NOT terminal-state signals.** When the babysit's own `gh pr view` call returns \"rate limited\" \u002F \"could not fetch\", the in-script `is_pr_terminal()` falls through to \"not terminal, keep polling.\" This is correct for the babysit (don't spuriously exit on a transient gh failure) but combined with a missing watchdog it produces an unbounded poll storm. The fix for that storm is installing the watchdog (previous pitfall) — not patching `babysit.py` to treat gh failures as terminal, which would cause false-exits on legit transient blips. Verified 2026-07-31: cron `124ad03896f5` fired every ~1h with \"could not fetch PR 8466 state gh may be rate-limited\" for 7 days straight.\n- **Auto-merge cron while PR is alive but user has explicitly required human `MERGE APPROVED`** (added 2026-07-21, PR #8462 thread C0BCVG4F560\u002F1784219487): The watchdog currently watches only terminal-state transitions (MERGED \u002F CLOSED). A different alive-but-deferred failure mode exists: you arm a one-shot \"merge the PR once green\" babysit cron, then the user posts an update containing an explicit human-approval gate (`\"NOT auto-merging. Waiting for \\`MERGE APPROVED\\`\"`, `\"need your signoff before merge\"`, `\"don't merge until I review\"`). The PR is still OPEN and mergeable, but the original auto-merge intent is now superseded. Symptom pattern: the cron will run its full polling cycle (e.g. +30m) and execute the merge step on its own, which is exactly what the user just told you NOT to do. **Recipe:** every babysit prompt that the operator armed with auto-merge intent MUST re-check the originating thread for a \"waiting for \u003Ctoken> APPROVED\" \u002F \"no auto-merge\" \u002F \"manual approval required\" phrase BEFORE executing the merge step. If found, post a single-line acknowledgment in thread and `hermes cron remove \u003Cid>` immediately (same self-cancel discipline as terminal-state). Do NOT wait for the watchdog — the PR is alive, the merge is the disputed action, and the cron has minutes not days. Bug-ref thread C0BCVG4F560\u002F1784580796.416199 — agent armed `babysit-pr-8462-green` cron `a679edc9079d` with auto-merge intent on green, then user (Jeffrey) posted \"NOT auto-merging. Waiting for `MERGE APPROVED`\" 7 minutes later. Cron was deleted manually before it fired; the live `verify-pr-8462-rollout` +24h cron was correctly left armed because it only fires post-merge.\n\n- **Echo-loop + stale babysit recovery (added 2026-07-31, thread C09GRLXF9GR\u002Fp1784235989.925899, cron `124ad03896f5`)**: When a stale babysit cron is actively polluting the user's Slack thread AND the user's recent messages are gateway echoes of prior assistant turns with no new imperative content, **cancel the babysit IMMEDIATELY** via `cronjob action=remove job_id=\u003Cid>`. Do not wait for \"go.\" The user's silence IS the answer because they cannot see new messages while the babysit is spamming. Then post ONE short closeout reply and stop replying. Full recipe + verification: see `references\u002Fecho-loop-stale-babysit-recovery.md`. Companion skill: `slack-thread-echo-loop-recognition` Tier 2 covers the echo-loop detection half.\n\n- **Worker never spawned — three-way end-state check (added 2026-07-22, thread C0AH3RY3DK6\u002Fp1784721612.183329, cron `5a771c731157`)**: A babysit cron can fire while the worker it was supposed to be polling was never actually created. This is the third end-state the watchdog cares about — neither \"PR MERGED\" nor \"PR CLOSED\" but `worker_not_spawned_parked_handoff`. Symptom pattern: previous session left re-spawn attempts in `\u002Ftmp\u002Fwa-failures\u002F2026-07-22\u002Fao-spawn.log` showing `INTERNAL_ERROR` \u002F `PROMPT_TOO_LONG` \u002F daemon executor pool hard-fault, with a stale `\u002Ftmp\u002Fwa-failures\u002F2026-07-22\u002Fao-spawn-cmd.sh` re-spawn script on disk; the worker was supposed to be named `fix-daily-0722` but `ao session ls | grep fix-daily-0722` returned zero rows; the matching PR with head `fix-daily-0722` did not exist (`gh pr list --head \u003Cbranch>` empty); and the originating thread had no `U09GH5BR3QU` reply to the previous session's \"your call\" A\u002FB\u002FC question. **Recipe — three-way end-state check before posting the babysit status reply:**\n  1. `ao session ls 2>&1 | grep \u003Cexpected-session-name>` — zero hits means worker never spawned.\n  2. `gh pr list --repo \u003Crepo> --head \u003Cexpected-branch> --json url,state,headRefName,additions,changedFiles` — empty means no PR exists.\n  3. If both 1 and 2 hit AND the originating thread has zero user replies since the A\u002FB\u002FC hand-off was posted, the previous session's caller went silent → state is `worker_not_spawned_parked_handoff`.\n  4. Post the standard 1-line status to the originating thread (`Worker still iterating; no PR yet. (Cron \u003Cid> — no \u003Cexpected-session-name> AO session exists; \u003Croot-cause-from-prior-session>; user A\u002FB\u002FC decision never received. Self-cancelling this cron.)`) and `hermes cron rm \u003Cid>` immediately. Do NOT loop. Do NOT re-spawn. Do NOT post a separate \"investigation\" message. The cron firing IS the investigation; the parked-handoff is the end-state.\n  5. The PR-watching baby still has value if the operator manually re-spawns — but that is a fresh `ao spawn` invocation, not a babysit continuation. New work = new cron, not the old one reanimated.\n  This is distinct from the \"auto-merge superseded by human-approval gate\" pitfall: there the PR is alive and mergeable. Here the worker and PR both never existed. The silent-operator signal is the same — both recipes pivot on zero user replies since the last hand-off question — but the cancel reason and the in-thread message text differ. Bug-ref: cron `5a771c731157` self-cancelled cleanly after posting ts `1784763797.688999` with the parked-handoff text; AO daemon pool had later recovered (no ghost sessions in DB; 12 sessions created since restart but none matching `fix-daily-0722`), but the originating hand-off question was already 26h old with zero replies.\n\n## Companion pattern — no-agent hermes cron PR watchdog\n\nFor PRs that don't need an AO worker babysit, use `hermes cron create --no-agent --script \u003Cwatch-script>.sh` to run a bash polling script on a fixed cadence. The script exits silently except on state transitions (OPEN with failures \u002F OPEN with all-green \u002F MERGED \u002F CLOSED). Zero LLM tokens burned, instant state-transition pings to a Slack thread. See `references\u002Fno-agent-hermes-cron-pr-watchdog.md` for the full recipe plus the verified worked example (PR 8466 cron 124ad03896f5, 2026-07-20).\n\nThe script writes MERGED\u002FCLOSED to its state file and exits 0; the launchd babysit-stale-watchdog cron disables the stale cron within 30 min via this skill.\n\n## First-time investigation recipe (when you arrive at a thread that's already full of babysit noise)\n\nIf a user surfaces a thread where a babysit cron has been spamming rate-limit errors for days\u002Fweeks (the cron is stale, the PR is already MERGED\u002FCLOSED, but nobody canceled the cron), use `references\u002Fstale-babysit-investigation-recipe.md` for the 5-step investigate → cancel → verify recipe. Verified 2026-07-31 (cron `124ad03896f5`, ~40 noise posts\u002Fday for 7 days).","# ? IF YOU ARE READING THIS BECAUSE THE USER ASKED WHY A THREAD IS FULL OF CRON SPAM, JUMP TO `references\u002Fecho-loop-stale-babysit-recovery.md` FIRST ?\n\nThe recovery recipe there is the single-call cleanup. Do not read the rest of this SKILL.md until the babysit is cancelled and the thread is quiet. Companion skill for the loop half: `gateway-loop-standdown` (read its top-of-file warning before posting any reply in that noisy thread).\n\n---\n\n# babysit-stale-watchdog\n\n## Why\n\nBug-ref: 2026-07-03 — `babysit-wa-2403-PR7711` fired **251 polls over 11 days** after PR #7711 merged. The original `babysit.py` only recognized \"PR created\" (a worker output event) as terminal, not \"PR MERGED on GitHub\" (an external event). The cron kept spamming Slack with \"TERMINAL: merged\" pings until Jeffrey noticed.\n\n## What\n\nTwo-layer fix:\n\n1. **In-script** (`babysit.py` `is_pr_terminal()`): poll() now extracts any PR ref from the task_summary, calls `gh pr view --json state`, and if the PR is MERGED or CLOSED, posts one terminal message and exits the babysit loop. **19\u002F19 tests pass.**\n\n2. **Watchdog** (`babysit_stale_watchdog.py`): belt-and-suspenders. Runs every 30 min via launchd. Even if `babysit.py` is broken or running against an old prompt, the watchdog catches the stale job and disables it within 30 min. **9\u002F9 tests pass.**\n\n## Install\n\n```bash\n# 1. Copy template to deployed plist (substitute @HOME@)\ncp ~\u002F.hermes\u002Flaunchd\u002Fai.hermes.schedule.babysit-stale-watchdog.plist.template \\\n   ~\u002FLibrary\u002FLaunchAgents\u002Fai.hermes.schedule.babysit-stale-watchdog.plist\n\n# 2. Verify syntax\nplutil -lint ~\u002FLibrary\u002FLaunchAgents\u002Fai.hermes.schedule.babysit-stale-watchdog.plist\n\n# 3. Load + start\nlaunchctl load -w ~\u002FLibrary\u002FLaunchAgents\u002Fai.hermes.schedule.babysit-stale-watchdog.plist\nlaunchctl kickstart -k gui\u002F$(id -u)\u002Fai.hermes.schedule.babysit-stale-watchdog\n\n# 4. Verify it's running\nlaunchctl list | grep babysit-stale-watchdog\ntail -5 ~\u002F.hermes\u002Fcron\u002Foutput\u002Fbabysit-stale-watchdog.log\n```\n\n## Verify\n\n```bash\n# Run once manually\npython3 ~\u002F.hermes\u002Fscripts\u002Fbabysit_stale_watchdog.py\n\n# Run unit + e2e tests\npython3 ~\u002F.hermes\u002Fscripts\u002Ftests\u002Ftest_babysit_stale_watchdog.py    # 9 tests\npython3 ~\u002F.hermes\u002Fskills\u002Fao-babysit\u002Fscripts\u002Ftest_babysit_pr_exit.py  # 19 tests\n```\n\n## Files\n\n- `~\u002F.hermes\u002Fscripts\u002Fbabysit_stale_watchdog.py` — the watchdog\n- `~\u002F.hermes\u002Fscripts\u002Ftests\u002Ftest_babysit_stale_watchdog.py` — 9 tests\n- `~\u002F.hermes\u002Fskills\u002Fao-babysit\u002Fscripts\u002Fbabysit.py` — restored + patched with `is_pr_terminal()`\n- `~\u002F.hermes\u002Fskills\u002Fao-babysit\u002Fscripts\u002Ftest_babysit_pr_exit.py` — 19 tests\n- `~\u002F.hermes\u002Flaunchd\u002Fai.hermes.schedule.babysit-stale-watchdog.plist.template` — committed plist template\n\n## Pitfalls\n\n- **`babysit.py` was deleted** in commit `4a7befcfa4` (squash-merge of feat\u002Fhermes-agent-default into main) — only the .pyc survived. Every cron prompt that referenced `python3 ~\u002F.hermes\u002Fskills\u002Fao-babysit\u002Fscripts\u002Fbabysit.py poll ...` was failing silently. **Restored from `git show 4a7befcfa4^:skills\u002Fao-babysit\u002Fscripts\u002Fbabysit.py`** plus the new merged-PR check.\n- **Default repo for bare `PR #NNNN` refs**: defaults to `$GITHUB_REPOSITORY` since that's the most common babysit target (5 of 5 in the 2026-07-03 sweep). If babysits for other repos get created, the URL form `https:\u002F\u002Fgithub.com\u002Fo\u002Fr\u002Fpull\u002FN` is exact — prefer that.\n- **Parked-handoff end-state (worker never spawned)** — see `references\u002Fworker-not-spawned-parked-handoff.md` for the three-way check (session + PR + operator reply) and the verbatim cancel recipe. Verified 2026-07-22 on cron `5a771c731157` (thread `C0AH3RY3DK6\u002Fp1784721612.183329`); this is the third end-state the watchdog catches, alongside PR-MERGED and PR-CLOSED.\n- **gh failures fall through to \"not terminal\"** — if `gh` is down or rate-limited, the watchdog leaves the job enabled rather than disabling it. The in-script `is_pr_terminal()` has the same fallback.\n- **`cronjob` CLI may not exist on PATH** (verified 2026-07-31, thread C09GRLXF9GR\u002Fp1784235989.925899): the recovery recipe in `references\u002Fecho-loop-stale-babysit-recovery.md` assumes `cronjob action=remove job_id=\u003Cid>` works, but `cronjob` returned `command not found` from the gateway session. `~\u002F.hermes\u002Fscripts\u002Fcronjob*` files absent, `hermes_tools` Python module not importable. When the recovery recipe's `cronjob` invocation fails, fall back in this order: (a) `launchctl bootout gui\u002F$(id -u)\u002Fai.hermes.schedule.cronjob-\u003Cname>` if the babysit runs under a named launchd plist; (b) look for a cronjob dispatcher under `~\u002F.local\u002Fbin\u002F`, `~\u002F.hermes\u002Fbin\u002F`, or `~\u002Fbin\u002F` — many Hermes installs put it there rather than on PATH; (c) ask the user to type `stop reminder \u003Cbabysit-name>` in-thread (the babysit prints this hint itself); (d) treat the babysit as an external system you cannot cancel and focus on the closeout post instead. Do NOT loop on \"tool not found\" — pick one fallback, post the closeout, and stop.\n- **Watchdog is silent by design**: only writes a log line when a job gets disabled. No daily digest.\n- **Watchdog requires the launchd plist to be installed AND loaded.** If the plist is missing from `~\u002FLibrary\u002FLaunchAgents\u002F`, every check is a no-op — babysit crons will spam forever after their PR terminal-states. Verified 2026-07-31: cron `wa-pr-8466-babysit` (job `124ad03896f5`) was still firing ~40 rate-limit-error polls\u002Fday into the user's real Slack thread 7+ days after [PR #8466](https:\u002F\u002Fgithub.com\u002F$GITHUB_REPOSITORY\u002Fpull\u002F8466) merged on 2026-07-24. The skill's \"Install\" section above is required, not optional. Verification recipe: `launchctl list | grep babysit-stale-watchdog` MUST return a row; `tail -5 ~\u002F.hermes\u002Fcron\u002Foutput\u002Fbabysit-stale-watchdog.log` MUST show a recent heartbeat. If either check fails, the watchdog is silently broken and stale babysits will run indefinitely. This is the canonical failure mode for the cron spam pattern; do not assume the watchdog is active just because the skill file exists.\n- **Babysit `gh pr view` failures are NOT terminal-state signals.** When the babysit's own `gh pr view` call returns \"rate limited\" \u002F \"could not fetch\", the in-script `is_pr_terminal()` falls through to \"not terminal, keep polling.\" This is correct for the babysit (don't spuriously exit on a transient gh failure) but combined with a missing watchdog it produces an unbounded poll storm. The fix for that storm is installing the watchdog (previous pitfall) — not patching `babysit.py` to treat gh failures as terminal, which would cause false-exits on legit transient blips. Verified 2026-07-31: cron `124ad03896f5` fired every ~1h with \"could not fetch PR 8466 state gh may be rate-limited\" for 7 days straight.\n- **Auto-merge cron while PR is alive but user has explicitly required human `MERGE APPROVED`** (added 2026-07-21, PR #8462 thread C0BCVG4F560\u002F1784219487): The watchdog currently watches only terminal-state transitions (MERGED \u002F CLOSED). A different alive-but-deferred failure mode exists: you arm a one-shot \"merge the PR once green\" babysit cron, then the user posts an update containing an explicit human-approval gate (`\"NOT auto-merging. Waiting for \\`MERGE APPROVED\\`\"`, `\"need your signoff before merge\"`, `\"don't merge until I review\"`). The PR is still OPEN and mergeable, but the original auto-merge intent is now superseded. Symptom pattern: the cron will run its full polling cycle (e.g. +30m) and execute the merge step on its own, which is exactly what the user just told you NOT to do. **Recipe:** every babysit prompt that the operator armed with auto-merge intent MUST re-check the originating thread for a \"waiting for \u003Ctoken> APPROVED\" \u002F \"no auto-merge\" \u002F \"manual approval required\" phrase BEFORE executing the merge step. If found, post a single-line acknowledgment in thread and `hermes cron remove \u003Cid>` immediately (same self-cancel discipline as terminal-state). Do NOT wait for the watchdog — the PR is alive, the merge is the disputed action, and the cron has minutes not days. Bug-ref thread C0BCVG4F560\u002F1784580796.416199 — agent armed `babysit-pr-8462-green` cron `a679edc9079d` with auto-merge intent on green, then user (Jeffrey) posted \"NOT auto-merging. Waiting for `MERGE APPROVED`\" 7 minutes later. Cron was deleted manually before it fired; the live `verify-pr-8462-rollout` +24h cron was correctly left armed because it only fires post-merge.\n\n- **Echo-loop + stale babysit recovery (added 2026-07-31, thread C09GRLXF9GR\u002Fp1784235989.925899, cron `124ad03896f5`)**: When a stale babysit cron is actively polluting the user's Slack thread AND the user's recent messages are gateway echoes of prior assistant turns with no new imperative content, **cancel the babysit IMMEDIATELY** via `cronjob action=remove job_id=\u003Cid>`. Do not wait for \"go.\" The user's silence IS the answer because they cannot see new messages while the babysit is spamming. Then post ONE short closeout reply and stop replying. Full recipe + verification: see `references\u002Fecho-loop-stale-babysit-recovery.md`. Companion skill: `slack-thread-echo-loop-recognition` Tier 2 covers the echo-loop detection half.\n\n- **Worker never spawned — three-way end-state check (added 2026-07-22, thread C0AH3RY3DK6\u002Fp1784721612.183329, cron `5a771c731157`)**: A babysit cron can fire while the worker it was supposed to be polling was never actually created. This is the third end-state the watchdog cares about — neither \"PR MERGED\" nor \"PR CLOSED\" but `worker_not_spawned_parked_handoff`. Symptom pattern: previous session left re-spawn attempts in `\u002Ftmp\u002Fwa-failures\u002F2026-07-22\u002Fao-spawn.log` showing `INTERNAL_ERROR` \u002F `PROMPT_TOO_LONG` \u002F daemon executor pool hard-fault, with a stale `\u002Ftmp\u002Fwa-failures\u002F2026-07-22\u002Fao-spawn-cmd.sh` re-spawn script on disk; the worker was supposed to be named `fix-daily-0722` but `ao session ls | grep fix-daily-0722` returned zero rows; the matching PR with head `fix-daily-0722` did not exist (`gh pr list --head \u003Cbranch>` empty); and the originating thread had no `U09GH5BR3QU` reply to the previous session's \"your call\" A\u002FB\u002FC question. **Recipe — three-way end-state check before posting the babysit status reply:**\n  1. `ao session ls 2>&1 | grep \u003Cexpected-session-name>` — zero hits means worker never spawned.\n  2. `gh pr list --repo \u003Crepo> --head \u003Cexpected-branch> --json url,state,headRefName,additions,changedFiles` — empty means no PR exists.\n  3. If both 1 and 2 hit AND the originating thread has zero user replies since the A\u002FB\u002FC hand-off was posted, the previous session's caller went silent → state is `worker_not_spawned_parked_handoff`.\n  4. Post the standard 1-line status to the originating thread (`Worker still iterating; no PR yet. (Cron \u003Cid> — no \u003Cexpected-session-name> AO session exists; \u003Croot-cause-from-prior-session>; user A\u002FB\u002FC decision never received. Self-cancelling this cron.)`) and `hermes cron rm \u003Cid>` immediately. Do NOT loop. Do NOT re-spawn. Do NOT post a separate \"investigation\" message. The cron firing IS the investigation; the parked-handoff is the end-state.\n  5. The PR-watching baby still has value if the operator manually re-spawns — but that is a fresh `ao spawn` invocation, not a babysit continuation. New work = new cron, not the old one reanimated.\n  This is distinct from the \"auto-merge superseded by human-approval gate\" pitfall: there the PR is alive and mergeable. Here the worker and PR both never existed. The silent-operator signal is the same — both recipes pivot on zero user replies since the last hand-off question — but the cancel reason and the in-thread message text differ. Bug-ref: cron `5a771c731157` self-cancelled cleanly after posting ts `1784763797.688999` with the parked-handoff text; AO daemon pool had later recovered (no ghost sessions in DB; 12 sessions created since restart but none matching `fix-daily-0722`), but the originating hand-off question was already 26h old with zero replies.\n\n## Companion pattern — no-agent hermes cron PR watchdog\n\nFor PRs that don't need an AO worker babysit, use `hermes cron create --no-agent --script \u003Cwatch-script>.sh` to run a bash polling script on a fixed cadence. The script exits silently except on state transitions (OPEN with failures \u002F OPEN with all-green \u002F MERGED \u002F CLOSED). Zero LLM tokens burned, instant state-transition pings to a Slack thread. See `references\u002Fno-agent-hermes-cron-pr-watchdog.md` for the full recipe plus the verified worked example (PR 8466 cron 124ad03896f5, 2026-07-20).\n\nThe script writes MERGED\u002FCLOSED to its state file and exits 0; the launchd babysit-stale-watchdog cron disables the stale cron within 30 min via this skill.\n\n## First-time investigation recipe (when you arrive at a thread that's already full of babysit noise)\n\nIf a user surfaces a thread where a babysit cron has been spamming rate-limit errors for days\u002Fweeks (the cron is stale, the PR is already MERGED\u002FCLOSED, but nobody canceled the cron), use `references\u002Fstale-babysit-investigation-recipe.md` for the 5-step investigate → cancel → verify recipe. Verified 2026-07-31 (cron `124ad03896f5`, ~40 noise posts\u002Fday for 7 days).",{"name":5,"trigger":54,"description":7},"Run every 30 min via launchd. Also manually via `python3 ~\u002F.hermes\u002Fscripts\u002Fbabysit_stale_watchdog.py`.","main","42ccd02cbf5e8e47839dc3eab6fc754dc6b339cf","hermes\u002Fskills\u002Fbabysit-stale-watchdog",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill babysit-stale-watchdog",{"tool":68,"command":69},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill babysit-stale-watchdog",{"tool":71,"command":72},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill babysit-stale-watchdog","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fbabysit-stale-watchdog\u002FSKILL.md",true,[76,82,86,90,94,98,102,108],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fbabysit-cron-audit-recipe.md","REFERENCE","参考文档",5321,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fbabysit-stale-watchdog\u002Freferences\u002Fbabysit-cron-audit-recipe.md",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fecho-loop-stale-babysit-recovery.md",5988,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fbabysit-stale-watchdog\u002Freferences\u002Fecho-loop-stale-babysit-recovery.md",{"path":87,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Ffontes.md",611,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-leiloeiro-juridico\u002Freferences\u002Ffontes.md",{"path":91,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fno-agent-hermes-cron-pr-watchdog.md",7050,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fbabysit-stale-watchdog\u002Freferences\u002Fno-agent-hermes-cron-pr-watchdog.md",{"path":95,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fstale-babysit-investigation-recipe.md",4483,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fbabysit-stale-watchdog\u002Freferences\u002Fstale-babysit-investigation-recipe.md",{"path":99,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fworker-not-spawned-parked-handoff.md",5938,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fbabysit-stale-watchdog\u002Freferences\u002Fworker-not-spawned-parked-handoff.md",{"path":103,"resourceType":104,"resourceTypeDesc":105,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Fgovernance.py","SCRIPT","脚本",3689,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-leiloeiro-juridico\u002Fscripts\u002Fgovernance.py",{"path":109,"resourceType":104,"resourceTypeDesc":105,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Frequirements.txt",42,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-leiloeiro-juridico\u002Fscripts\u002Frequirements.txt",[113,121,128,135,143,152],{"skillNo":114,"name":115,"nameZh":13,"description":116,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":120},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":122,"name":123,"nameZh":13,"description":124,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":125,"categories":126,"keywords":127,"publishedAt":120},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":129,"name":48,"nameZh":13,"description":130,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":134},"01M7622KQJ32AV4K5BXEMVSSEB","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":136,"name":137,"nameZh":13,"description":138,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":142},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":144,"name":145,"nameZh":13,"description":146,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":147,"licenseFileUrl":148,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":142},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":153,"name":154,"nameZh":13,"description":155,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":156,"categories":157,"keywords":158,"publishedAt":142},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]