Frugal routes Claude Code sub-tasks to cheaper models and escalates only on real failures
StolenDrinks · reddit · 2026-07-23
Frugal routes Claude Code sub-tasks to the cheapest model that can finish them
The author shares Frugal, a Claude Code plugin that sends each sub-task to the cheapest capable model and escalates only when a real check fails.
Routing ladder
- Deterministic shell tools like grep, jq, and git if they can answer the question.
- A Haiku worker for locating and extracting information.
- A Sonnet worker for mechanical edits from a spec.
- The main model for design, debugging, and review.
- A top-tier model only as the final escalation ceiling.
Design choices
- Escalation is verified, not self-reported. Tests, compiler checks, schema validation, or patch application failures trigger a step up.
- Enforcement is via hooks, not prompts. Two PreToolUse hooks count search calls and can hard-block the reasoning tier at spawn.
- Context stays isolated. Instead of swapping models mid-session, Frugal spins up subagents with only pointers such as file paths, line ranges, SHA values, and short specs.
What it reports
- Local logs for each worker run.
- Per-tier spend, escalation rate, and savings versus using the session model for everything.
- No telemetry.
The repo is explicitly Claude Code-only and the author asks for critique on the escalation heuristic and routing table.
Related event: Frugal Plugin Enables Cost-Aware Routing for Claude Code(2 posts)→
More from coding & agent
- Bugbot rejects an MCP permission flag because it would break path-scoped isolation — zeeg · 2026-07-27
- One GPT-5.6 agent is guarding a Blink security system while another makes a parody rap album — repligate · 2026-07-27
- An agent got unblocked by reusing a logged-in browser, not stealth tricks — armanidev_ · 2026-07-27
- Paper argues graph topology can become the core operating system for AI agents — theomitsa · 2026-07-27
- Claude Code desktop adds UI markup feedback for smoother visual editing — EricBuess · 2026-07-27
- Anthropic says Claude Code can drop 80% of its system prompt with no coding loss — krishnan · 2026-07-27