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
- Kernel integrates Stripe Link so browser agents can pay with one API call — jeff_weinstein · 2026-09-11
- Same Echo Maze prompt, three frontier models: all passed visually but shipped the same hidden bug — eyishazyer · 2026-09-11
- The full prompt-to-3D-game workflow: Hyper3D Rodin MCP plus Codex, no reference image — FellMentKE · 2026-09-11
- Building a 3D landing page with GPT-6 Astra and Hyper3D Rodin MCP, no modeling needed — FellMentKE · 2026-09-11
- Astra storyboards plus Minimax H3 per-shot generation boost video success rates — Hailuo_AI · 2026-09-11
- Codex tip: use Sol with Astra and Luna sub-agents to save usage — pvncher · 2026-09-11