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

✍️ OpenClawRadar📅 Published: May 27, 2026🔗 Source
ClawCodex /advisor Mode: Pair Cheap Worker with Expensive Reviewer to Cut Costs Without Losing Quality
Ad

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.
Ad

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

Ad

👀 See Also