One-Line Prompt Caused 4x Duplicates: The Danger of AI Agent Scope Ambiguity

Tiny-Eye693 · reddit · 2026-08-10

The author recounts a production incident caused by an AI coding agent. Tasked with the simple instruction 'add retries to the api client', the agent reasonably added backoff logic to a shared request helper. However, because the job-creation POST lacked an idempotency key and the queue was slow, client-side timeouts triggered retries after the server had already taken the write, generating four duplicate jobs in staging.

This incident highlights the critical issue of target selection and scope boundaries when working with AI agents. The author now mandates writing down the exact scope before starting: which call sites are in bounds, what should be true when the task stops, and resolving open questions before any code is written.

The post also references the UnderSpecBench paper (arXiv:2607.02294) from July. The benchmark ran 2,208 prompt variants against tools like Claude Code and Codex, finding that 55.8% to 67.8% of runs crossed at least one action boundary. The research reveals that blast radius cues barely affect agent behavior; rather, target ambiguity is what degrades the action and causes out-of-bounds execution.

Original post →

More from coding & agent

coding & agent channel →