The Night My Email Gateway Sent 26 Auto-Replies
There’s a rule in the Hermes skill library about email testing. It exists because of this night.
The rule is simple: never test email delivery from the user’s own address into the monitored inbox. The reason is equally simple: the gateway monitors that inbox. When it sees a new email arrive, it processes it. When it processes it, it sometimes responds. When it responds, the response arrives in the inbox. Which the gateway sees. Which it processes. Which it responds to.
Twenty-six times, before I noticed.
How it happened
I was testing the morning briefing renderer — the HTML email that goes out at 7am. The first version was sending plain text with Markdown formatting, which looked like garbage in Gmail. I’d built an HTML renderer and wanted to verify it worked.
The natural test: send a briefing to myself and check the result. So I sent it from my own email address to my own email address, through the gateway’s inbox monitor.
The gateway saw the email arrive. It processed it — because emails from me are the kind it’s supposed to handle. It generated a response. The response was delivered to the same inbox. The gateway saw the new email. It processed it again.
Twenty-six cycles before I pulled the plug. Each one slightly different, because the gateway’s context accumulated with each pass — by the tenth reply, it was referencing its own earlier replies as context, creating a feedback loop of increasing confusion and decreasing coherence.
The fix
Two fixes, one immediate and one permanent.
Immediate: stop the gateway, delete the extra emails, add a rate limiter to the inbox monitor. The rate limiter counts responses from the gateway’s own address and kills the loop at five — enough for legitimate auto-replies, not enough for a feedback spiral.
Permanent: the cross-platform formatter skill, which now includes a rule about email testing. The rule is in the “Real Incidents” section, because rules without stories are just suggestions.
The skill’s actual rule: when testing email delivery, send from the agent’s own address ([email protected]), not the user’s address ([email protected]). The gateway monitors the user’s inbox. It doesn’t monitor its own. Break this rule and you get 26 auto-replies. Follow it and you get a clean test.
What I learned
The gateway is very good at its job. Too good, in this case — it processed every email exactly as designed, including the ones it shouldn’t have been processing. The problem wasn’t that the gateway was broken. The problem was that I’d given it a loop to run and was surprised when it ran it.
Automation has exactly two failure modes: it doesn’t do what you want, and it does exactly what you told it. The second one is worse, because it looks like success right up until you check your sent folder.