ClawCodex /advisor Mode: Pair Cheap Worker with Expensive Reviewer to Cut Costs Without Losing Quality

Most agent CLIs force you to pick a single model: Opus delivers great decisions but burns through your budget, while Haiku is cheap but misses critical architectural calls. ClawCodex, an open-source Python port of Claude Code, solves this with an /advisor mode that pairs a cheap worker model with an expensive reviewer model at key decision points.
How It Works
The cheap worker (e.g., haiku-4-5, deepseek-v4-pro) handles the heavy lifting — file reads, edits, test runs. At decision points — before committing to an interpretation, before declaring a task done, or when stuck — the worker pauses and consults a stronger reviewer (e.g., opus-4-7). The reviewer sees the full conversation (every tool call, every result) and returns a short Gaps / Risks / Do-next advice snippet. The worker then continues.
Two Execution Modes
- Server-side (Anthropic 1P): Uses an advisor beta header — one roundtrip, prompt-cache friendly. Both worker and advisor run on Anthropic.
- Client-side (any provider): The worker emits a regular
tool_use, the agent intercepts it and makes a separate call to the configured advisor model. Two roundtrips, but you can mix providers — e.g., DeepSeek worker + Claude Opus advisor, or Gemini worker + GLM advisor.
Configuration & Monitoring
Configuration is a single line in the REPL:
/advisor anthropic:claude-opus-4-7
/advisor deepseek:deepseek-v4-pro
The status bar shows worker tokens, advisor tokens, and USD cost separately, so you can see exactly where your spend is going.
Benchmarks & Compatibility
ClawCodex natively supports Anthropic, OpenAI, Gemini, DeepSeek, GLM, Minimax, and OpenRouter. On SWE-bench Verified the agent scores 58.2% with Gemini 2.5 Pro vs. OpenClaude’s 53% under the same harness.
The Hard Part: Prompts
The trickiest engineering challenge was preventing the advisor from simply echoing the worker’s plan back — early versions wasted context on verbatim repeats. The fix was a strict “no first-person voice, no echoes” rule combined with the Gaps / Risks / Do-next template.
Who It's For
Developers using AI coding agents who want Opus-level architectural judgment without paying Opus rates for every single call.
📖 Read the full source: r/openclaw
👀 See Also

9 Building Blocks for Running Claude Code as a Persistent OS Across 18 Businesses
One developer runs 18 Claude Code instances as a shared OS with selective sync, state moved to MCP servers, receipt-based verification, and auto-loading rules. Details the architecture.

SimplePDF Copilot: Client-Side AI Tool Calling for PDF Form Filling
SimplePDF Copilot uses client-side tool calling to let an LLM fill fields, add fields, delete pages, and more in PDFs — without the PDF leaving the browser.

Learning-Kit: A Claude Code Plugin for Codebase Onboarding and Exploration
Learning-kit is a free Claude Code plugin that analyzes repositories to generate structured learning plans and interactive tutorials. It helps developers understand unfamiliar codebases before making changes, with configurable enforcement modes and progress tracking.

Solitaire: Open-Source Identity Infrastructure for AI Agents
Solitaire is an open-source identity infrastructure for AI agents that focuses on improving how agents work with users over time, not just recall. It's local-first, model-agnostic, and available via pip install solitaire-ai.