Troll tries to bait AI sales agent, gets a serious 3-page report — and a lesson in gating tool calls
Icy_Comfort_6220 · reddit · 2026-10-16
A small company running six AI agents shares how their sales assistant "Flaminga" (Claude + tool use on Flask/Railway) handled a troll submitting a fake "adult entertainment" enquiry with a nonexistent email domain: it stayed professional and produced a full readiness report, but the format-only email validation let a junk lead through.
The author's same-day fixes and follow-up bugs make this a solid engineering writeup:
- Gate in code, not prompt: before any tool call that creates something — typo-domain detection, throwaway-domain rejection, DNS MX (fallback A/AAAA) lookup so no mail server means no report.
- Fail-open by design: only definite NXDOMAIN blocks; timeouts pass through, since a fake lead costs cents while DNS flakiness rejecting a real customer costs more.
- Fixes bred new bugs: the model guessed language from first names (English user got German replies); dramatic tool-result text ("NOT SENT…domain cannot receive email") made the model invent an email bounce that never happened; an EU AI Act self-disclosure check passed because the product name contained "AI".
Biggest takeaway: tool-result text is a prompt too — whatever you write there, the model will narrate it to the user.
More from coding & agent
- FireTrident lets thousands of coding agents work on one codebase at once — dinasaur_404 · 2026-10-16
- Dev builds MCP layer so Claude Code can work on servers without ever holding SSH keys — NETMESAFE · 2026-10-16
- As coding agents run longer autonomously, one dev's tip: don't parallel-session, just breathe — teropa · 2026-10-16
- 'Refusing to code with AI in 2026 is like refusing Google in 2005' — prasenx · 2026-10-16
- Claude Code adds idle compaction to save 1h prompt cache on idle sessions — EricBuess · 2026-10-16
- Handling agents that crash mid-task: the hard part is the unknown outcome across the network — Responsible-Dare5139 · 2026-10-16