stop-hook-fires-during-active-waiting-state-false-positive-loop

The Stop hook fires repeatedly when the agent is paused mid-conversation waiting for user input, not just when the agent explicitly initiates session termination. This causes a runaway feedback loop where hook evaluation messages spam the conversation indefinitely. The hook condition ‘Before allowing the agent to stop’ must be gated on an actual agent-initiated stop() call, not on any idle/waiting state. Fix: add a guard in the stop hook script to only evaluate when a genuine stop action is detected, not on every turn where the agent outputs nothing new.