Most agentic coding setups run one model for the whole job: it decomposes the task, writes the code, and then wades through thousand-line test logs looking for the one line that matters. That wastes a good model twice over — you're paying frontier-model rates for work a much cheaper model would do just as well, and you're diluting the model's context with noise while you're at it.

My method is simple to state: treat a coding turn as a sequence of phases, and give each phase the model best suited to it. I've packaged it as pi-tiered-router, an extension for the pi coding agent — but the method matters more than the package, so that's what this post is really about.

The method: decompose by phase, not by subtask

A coding turn breaks into phases:

classify → plan → validate → execute