CodexSaver: Reducing Codex Costs via DeepSeek Routing
CodexSaver is an MCP tool that routes low-risk tasks to cheaper models like DeepSeek, reducing costs by up to 100% on specific tasks while keeping Codex for final judgment.
Fendouai has released CodexSaver, an MCP tool that transforms Codex into a cost-aware router to reduce expenses without sacrificing engineering judgment. It delegates low-risk, high-volume tasks to cheaper workers like DeepSeek V4 Flash, leaving expensive models to handle architecture, security, and final reviews. In v2 benchmarks across five bounded tasks, the tool achieved estimated savings between 45% and 100%.
Routing low-risk tasks to cheaper workers
CodexSaver splits responsibilities between high-level reasoning and repetitive execution. It is most effective for code explanation, repository scanning, docstring maintenance, and bounded test generation. Tasks involving authentication, security, payment permissions, or destructive migrations remain exclusively with Codex.
The tool uses an interaction block to make routing decisions visible to the user. This block indicates whether a task was delegated to a worker, stayed with Codex due to high risk, or was a routing preview. When worker-output compression is active, the block also displays the compression level used for the delegated reply.
Bounded work packets in v2
The v2 version implements a strict delegation lane using bounded work packets. Instead of open-ended requests, Codex provides the worker with a specific goal, allowed files, forbidden paths, and acceptance criteria. Patches are applied only within a temporary sandbox and are accepted only if they pass allowlisted checks.
Users can trigger this via the MCP tool codexsaver.delegate_work_packet or through the CLI:
codexsaver work-packet \
"Create docs/v2-smoke.md with one sentence." \
--files README.md \
--allowed-file docs/v2-smoke.md \
--acceptance "docs/v2-smoke.md exists in sandbox" \
--allowed-command "python -c \"from pathlib import Path; assert Path('docs/v2-smoke.md').exists()\"" \
--workspace .Orchestrated specialists and Agent Cards in v3
Version 3 introduces a work graph that allows readonly specialists to run in parallel, reducing total latency to the runtime of the slowest specialist plus orchestration overhead. This version includes a readonly_swarm that has been tested with Pi Agent and DeepSeek API capabilities.
Version 3.4 enables action-level delegation, where a single task is split into safe prep nodes for workers and blocked actions for Codex. Version 3.5 adds a verification plan and patch linting to reject empty patches or duplicate file writes, with a node-local repair mechanism for failures.
The latest v3.6 update replaces hardcoded assumptions with a dynamic Agent Card registry. Workers are discovered via .agent-card.json files, and routing is determined by a weighted score based on capability match (0.40), historical success (0.25), and cost weight (0.20).
Sources
Related news
AI Cost OptimizationUsing Luna Max as a Codex Subagent Based on DeepSWE DataOptimize Codex costs by delegating specific tasks to Luna Max, which offers a significant price advantage over Sol Max according to DeepSWE benchmarks.·mentions Codex
Cost OptimizationDeepSeek Introduces All-Day Off-Peak API Pricing for WeekendsDeepSeek is updating its API pricing structure to provide consistent off-peak rates throughout Saturdays and Sundays starting August 23.·by shared tag
Open Sourcepxpipe reduces Claude Code token costs by rendering context as imagespxpipe is a local proxy that converts bulky text context into PNGs, reducing token usage for models like Claude Fable 5 and Gemini 4.·by shared tag
DeepSeekNVIDIA releases quantized DeepSeek-V4.1-Flash-1017-NVFP4NVIDIA has launched a quantized version of DeepSeek-V4.1-Flash-1017, reducing the model size by 81 GB while maintaining performance in coding and agentic tasks.·by shared tag
Comments
Weekly digest
The best of vibe coding, AI agents and open source — once a week, no spam.