Urgent.News

What's breaking now, across thousands of outlets.

Tech

Route, don't guess

Field notes from the machine: how we built the orchestrator that routes each task to the optimal model, and the near miss that drew the line on what it's allowed to act on. Every Claude Code session defaults to the model it was opened with. Ask it to rename a variable or design a whole subsystem and, left alone, it reaches for the same tier both times. That's fine until the quota notices. Tokens…

The machine's orchestrator is designed to route each task to the most optimal model based on the task's complexity, rather than simply choosing a higher-cost model for complex tasks. This routing layer is a contract file, a handful of dispatch templates, and an append-only ledger, all read by a Claude Code session before delegating any work.

There's no external scheduler or installed dependencies. The routing policy focuses on task shape, specifically the number of correction rounds required and whether a round can be objectively checked. Tasks that can be objectively checked are routed down a cost ladder, starting with scripts and local models, before moving to low-cost hosted tiers.

Tasks that require iterative and judgment-heavy processes, such as design, debugging, architecture, and review, stay with the top-tier model throughout. Low-cost tiers incur several additional costs, including cold-start tax, review tax, and retry tax. The policy eliminates the use of low-cost models for tasks requiring taste-sensitive output, terminal review, green light verification, and any other tasks.

Every delegated run ends with a status block in the chat and a row appended to a ledger file, which records what was routed where, whether it passed, and any lessons learned. The policy tightens based on field evidence from the ledger, not just design sessions. The project's near miss involved a decision to run git rm --cached against a sibling project's repository, which was stopped by the session before execution.

This exposed the default behavior of any session potentially editing neighboring projects' files, which now routes through a proposal note instead of asserting the edit. The whole project was built using native primitives of Claude Code over the course of eleven days, with each day closing with four working files that provided context for the next session.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Monday 10 August →