Before
- One expensive model handled almost every task.
- Bloated context and repeated inputs increased token use.
- Spending was difficult to relate to useful completed work.
Token optimization
4 teams · 32 developers
Four teams cut coding-agent token costs by 53%. Cortiscale matched model capability to task difficulty and customized the Pi harness, which manages an agent's context, tools, and execution loop.
Impact
Task-based routing and focused context reduced spend while task success stayed broadly stable.
Nearly every task used the same expensive model. Simple documentation edits and test updates received the same treatment as difficult debugging, even when they did not need the same capability.
Long instructions, repeated file reads, and full build logs inflated context. Repeated inputs and attempts made agent spending difficult to predict.
Cortiscale introduced task-based routing. Lower-cost models handled predictable edits and summaries; stronger models handled complex debugging and design decisions. Failed checks or uncertain results triggered escalation, with explicit retry limits.
Custom Pi extensions loaded relevant instructions and code context for each task. Tools returned focused file excerpts and concise test failures, while full logs stayed available when needed. Long sessions kept a compact decision record instead of repeatedly sending the entire history.
A shared dashboard tracked model choice, token usage, retries, and cost per completed task. The teams compared representative workloads and task success before expanding the routing rules.
Model API cost per successful task fell by 53%, including failed attempts and retries. Task-based routing and a focused harness reduced unnecessary model spend.
The teams reduced token costs and gained a clearer view of the cost of useful agent output. Model routing and focused context made the platform more economical while task success stayed broadly stable.
Start a conversation
Tell us how your software team uses AI today and what you’d like to improve. We’ll discuss whether tailored training or an ongoing collaboration fits.