Stop paying frontier LLM prices for work a deterministic script can do in milliseconds.
Subsidised model pricing makes it easy to ignore token bloat during prototyping, where a 64k-token prompt costs pennies. Once an agent moves into high-throughput production workflows, those token economics catch up fast. If your harness burns reasoning tokens to walk file trees, grep codebases, or parse standard syntax, your architecture is burning margin on solved problems.
Three ways to tighten the harness:
Pre-digest repo state with local tools: Use AST parsers, ripgrep, and plain shell scripts to filter and structure codebase context before anything reaches an LLM.
Distill context aggressively: Stop dumping raw files into the prompt window. Extract only the interface signatures, diff slices, and relevant memory nodes required for that specific step.
Route by task complexity: Send simple classification, formatting, or linting checks to smaller specialised or open-weight models, saving frontier reasoning models for planning and ambiguity.
Trimming unnecessary tokens lowers API bills, cuts end-to-end latency, and keeps the model’s attention focused on the code that actually matters.