> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gork.email/llms.txt
> Use this file to discover all available pages before exploring further.

# Reply Storm Loop Breaker

> Preventing infinite auto-responder loops and runaway token consumption.

## The Out-of-Office Disaster

When an AI agent sends an email to a prospect or customer who has an automated responder enabled (e.g. "I am out of the office until Monday"), the auto-reply lands in the agent's inbox.

Without loop detection:

1. The agent receives the auto-reply.
2. The agent interprets the email and sends a polite response ("Thanks for letting me know!").
3. The recipient's mail server fires another auto-reply.
4. The loop repeats indefinitely, burning hundreds of dollars in OpenAI/Claude tokens in minutes.

## Detection & Suppression

gork.email automatically inspects incoming RFC headers:

* `Auto-Submitted: auto-replied`
* `X-Autoreply: yes`
* `Precedence: auto_reply` / `bulk`
* Repeated identical subject lines within a rolling 10-minute window.

When detected, the webhook payload sets:

```json theme={null}
{
  "loop_breaker": {
    "is_auto_reply": true,
    "is_loop_suppressed": true
  }
}
```

If loop suppression is active, outgoing replies back to the looping sender are automatically paused, containing token burn immediately.
