buddymon/hooks-handlers
pyr0ball c12a234652 fix: catch_pending race condition — hook clears flag, not the roll script
Previously the catch roll script wrote catch_pending=False to disk before
the Bash process exited. The PostToolUse hook fired after exit, saw False,
and could auto-resolve the encounter on the same run as the catch attempt.

Fix: the hook now owns the flag lifecycle.
- Hook clears catch_pending after consuming it (protects exactly one run)
- Roll script never touches catch_pending (no premature clear)
- On failure, flag stays True through the roll, cleared by hook afterward
- Next /buddymon catch call re-sets it at the top as before

Net effect: a failed catch attempt always gets one full clean Bash run of
grace before auto-resolve can fire again.
2026-04-05 23:58:08 -07:00
..
post-tool-use.py fix: catch_pending race condition — hook clears flag, not the roll script 2026-04-05 23:58:08 -07:00
session-start.sh fix: SESSION_FILE shadow bug + hooks matcher + 5 security/privacy mons 2026-04-05 23:24:27 -07:00
session-stop.sh fix: SESSION_FILE shadow bug + hooks matcher + 5 security/privacy mons 2026-04-05 23:24:27 -07:00
user-prompt-submit.py feat: per-session buddy isolation via PGRP-keyed state files 2026-04-02 23:11:19 -07:00