Two weeks after I let a coding agent run unattended on backlog chores, the provider invoice told me something my logs hadn't: the agent had spent the majority of its budget on a frontier model doing work like regenerating docstrings, bumping pinned dependency versions, and normalizing import order. Meanwhile, the one genuinely subtle bug it touched — a time-ordering issue in a queue consumer — got the same model as the docstrings, with the same shallow retry behavior, and shipped a patch I reverted four days later.

That inversion is the actual problem. Not "models are expensive," but: an unattended agent makes a spend decision on every single call, and the default decision is always the same.

My previous post argued that agent permissions belong in version control. This is the same instinct applied to model selection: routing is policy, policy should be a file, and files should be reviewable in git. What follows is the setup I run now, with placeholders where model identifiers go — catalogs change too fast for any name I write today to survive your reading of it.

The policy file

Instead of burying tiers in code, the routing rules live in a JSON document that's diffable, reviewable, and rollbackable: