disinto/lib/hooks
openhands 742b64e743 fix: stop hook should nudge Claude when PHASE file is empty — prevents silent exit without PHASE:done (#585)
When Claude finishes a response but hasn't written to the PHASE file,
the stop hook now injects a nudge into the tmux session instead of just
marking idle. This gives Claude another chance to complete the phase
protocol before the monitor loop times out.

Key changes:
- on-idle-stop.sh: check phase file emptiness, nudge via tmux (max 2)
- agent-session.sh: pass phase_file + session to stop hook, clean up
  nudge counter on session teardown

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 09:56:49 +00:00
..
on-compact-reinject.sh fix: Hook scripts don't follow #!/usr/bin/env bash convention from AGENTS.md (#330) 2026-03-23 08:59:56 +00:00
on-idle-stop.sh fix: stop hook should nudge Claude when PHASE file is empty — prevents silent exit without PHASE:done (#585) 2026-03-23 09:56:49 +00:00
on-phase-change.sh fix: Hook scripts don't follow #!/usr/bin/env bash convention from AGENTS.md (#330) 2026-03-23 08:59:56 +00:00
on-pretooluse-guard.sh fix: Hook scripts don't follow #!/usr/bin/env bash convention from AGENTS.md (#330) 2026-03-23 08:59:56 +00:00
on-session-end.sh fix: Hook scripts don't follow #!/usr/bin/env bash convention from AGENTS.md (#330) 2026-03-23 08:59:56 +00:00
on-stop-failure.sh fix: Hook scripts don't follow #!/usr/bin/env bash convention from AGENTS.md (#330) 2026-03-23 08:59:56 +00:00
on-stop-matrix.sh fix: Hook scripts don't follow #!/usr/bin/env bash convention from AGENTS.md (#330) 2026-03-23 08:59:56 +00:00