A three-line prompt tweak quietly raised token spend 30% in one week
Illustrious-Second-7 · reddit · 2026-07-23
A team found that a three-line prompt change had raised their token bill by 30% week over week.
What happened
- Traffic, retries, agent loops, and max tokens were all stable.
- The culprit was three example outputs added to a system prompt to fix a rare formatting edge case.
- Those examples were prepended to every request, even though the bug only appeared in about 1 in 200 calls.
Why it took a week
The only reliable clue was comparing the current system prompt with the version from the previous week and spotting exactly what text had been added. Without prompt version history, the team only saw a rising bill, not the source of the regression.
Fix and takeaway
They moved the examples behind a condition so they only load when needed, which brought spending back to baseline.
The post argues that prompts should be treated like code: prompt edits are cost changes, and prompt versions need diffable history if teams want to attribute spend regressions.
More from coding & agent
- Resin lets an agent build standalone LLM inference engines; vLLM and SGLang optimize DeepSeek kernels differently — AccBalanced · 2026-10-27
- How I let my cloud Grok Bot code on my Mac mini via Tailscale, no public ports — talkaboutdesign · 2026-10-27
- Context layout is a cost decision: one memory edit can bust your entire agent prompt cache — dscape · 2026-10-27
- Alchemy adds effect/Workflow support across Durable Objects, Workflows and Lambda Durable Functions — samgoodwin89 · 2026-10-27
- Alchemy's Lambda Web Functions run plain Node web servers on Lambda, no OpenNext needed — samgoodwin89 · 2026-10-27
- Alchemy makes all ~2,850 AWS bindings work from any cloud, not just S3/Lambda/DynamoDB — samgoodwin89 · 2026-10-27