stop-hook-fires-on-idle-wait-state-false-positive-loop
The Stop hook triggers repeatedly (~30+ times) when the agent outputs minimal responses (single ’.’) while waiting for user input mid-conversation. The hook fires on every agent turn, not just on actual session termination, creating an infinite feedback loop. Root cause: the Stop hook_event_name fires on agent turn completion, not only on explicit stop() calls. Fix: add a guard that checks whether the agent actually initiated a stop action before evaluating session completion criteria.
Related
- stop-hook-false-positive-during-waiting-state
- stop-hook-false-positive-during-agent-wait-states
- stop-hook-false-positive-on-waiting-state
- stop-hook-fires-on-agent-idle-waiting-state-false-positive
- stop-hook-fires-false-positives-on-agent-waiting-state
- stop-hook-fires-on-waiting-state-not-just-session-end
- stop-hook-fires-on-user-wait-not-just-agent-stop
- stop-hook-fires-on-idle-agent-not-just-stop-calls
- stop-hook-fires-on-agent-wait-state-not-just-stop
- stop-hook-fires-on-every-agent-waiting-state