Why "my agent burns my 7-day quota in 3 days" and "my agent ignores my style guide" are the exact same attention bug
retained text
I keep seeing the same two complaints in almost every thread about coding agents right now: people running out of their weekly usage quota by Wednesday, and models ignoring style guides to write overly defensive, nullable, fallback-heavy code. Usually the thread turns into a debate over whether switching from Gemini to Claude or ChatGPT fixes it. When I traced my own failed runs, I realized those two complaints are actually a single closed loop. To stop the agent from writing a bad pattern, we naturally paste an example of the bad code into our system prompt under a "DON'T do this" comment. In transformer self-attention, putting `function foo(d?: Date | string | null)` inside the prompt loads those exact token sequences into the active KV-cache. Under autoregressive generation, tokens sitting in the KV-cache act as semantic attractors. Telling a model "do not think of a pink elephant while staring at this high-definition code snippet of a pink elephant" actively primes its logits to emit the exact nullable union types and silent fallbacks you wanted to ban. Then the model violates the rule, you spend 25 turns arguing and pasting diffs at 50k tokens a pop, you add three more "DON'T" rules to the prompt file, attention dilutes even further, and your 7-day quota is gone in 72 hours. And because public training repos are full of defensive tutorial JavaScript and TypeScript, switching vendors with the same prompt file just moves the loop to a different billing page. Two things finally broke that cycle for me across my last 238 production tickets: First, replacing negative "DON'T" examples with a 4-part override structure (`1-2-3-4 -> NOOO! -> E-F-G-H`) that names the runtime crash, calls out the exact tutorial shortcut the weights are tempted to emit, gives the agent explicit permission to halt and counter-offer if the API signature is a trap, and gives it the exact positive sequence to climb instead. Second, having our archaeology subagent pass call-graph blast radii and state machines to the coder and reviewer subagents using 1991 AT&T Bell Labs Graphviz DOT (`strict digraph`) instead of English prose or Mermaid. Prose descriptions drop incoming caller edges, and Mermaid chokes on dense type attributes, whereas `strict digraph` switches the model straight into its LLVM and GCC compiler control-flow training. Has anyone else noticed that adding code examples of what *not* to do makes your agent produce that exact pattern *more* often?
document fetched 2026-10-30 00:18 · canonical https://reddit.com/r/AI_Agents/comments/1xivr6s/why_my_agent_burns_my_7day_quota_in_3_days_and_my