stop-hook-false-positive-on-waiting-state

The Stop hook fires repeatedly when the agent outputs minimal responses (e.g., ’.’) while waiting for user input, not only when the agent actually terminates. This causes a flood of hook feedback messages in the conversation thread. The hook’s condition ‘Before allowing the agent to stop’ is evaluated against idle/waiting states, not just genuine stop() calls. Fix: add detection in the hook script to distinguish agent-initiated stop events from passive waiting states before evaluating completion gates.