Back to feed
Dev.to
Dev.to
7/5/2026
A missing `model:` line was half my AI agent overspend — auditing 34 days of multi-model Claude Code

A missing `model:` line was half my AI agent overspend — auditing 34 days of multi-model Claude Code

Short summary

A solo developer built an audit tool that backfilled 26,000 traces of Claude Code usage over 34 days and discovered 22.6% policy deviation ($1,248 overspend). Root cause: subagents silently inherit the parent thread's expensive model when not explicitly pinned in definitions. The deeper insight: half your routing cost drift comes from miscalibrated policy itself, not actually bad behavior.

  • Audit of 26,000 traces revealed $1,248 in unintended spend (22.6% policy deviation)
  • Root cause: subagents silently inherit parent model unless model: is explicitly pinned in agent definitions
  • Actionable fixes: pin each agent's model, snapshot logs immutably, write actual routing policy down

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more