All posts

Cut Your Token Costs by Splitting Planning From Code

Cut Your Token Costs by Splitting Planning From Code cover image

Your coding sessions have a hidden cost structure. Exploration and code review eat roughly 60 percent of the tokens in a typical agent session. The actual code generation is output-heavy and gets billed at the highest rate. Orchestrate mode splits these workloads across different models so you stop paying frontier prices for routine implementation work.

The Problem: You Pay the Same Rate for Everything

In a single-model session the agent reads files, greps for patterns, reads more files, thinks about what it found, writes code, tests it, reads the test output, fixes a bug, and repeats. Every step runs on the same model at the same per-token price.

These steps have wildly different complexity. Reading a file and checking a function signature needs no frontier reasoning. Generating a 200-line React component with state management takes output tokens, but rarely requires the model that scores in the 95th percentile on graduate-level benchmarks.

You pay Claude Fable prices for grep operations and file reads. Research on agent token usage shows that 60 to 80 percent of input tokens on exploratory turns go to files that end up irrelevant to the final change. In a heavy coding session, 70 to 85 percent of total tokens never contribute to the implemented solution.

How Orchestrate Mode Works

Orchestrate mode separates your task into two phases. Each runs on the right model for the job.

Phase 1: Planning (Smart Model)

The orchestrator gets read-only tools: read files, search with grep, find by patterns, browse documentation. No writes or edits. Its job: understand what needs to change and break the work into small, concrete tasks.

The orchestrator creates a todo checklist with the smallest possible items. Each item names a single change a cheaper model can complete in one pass. “Add a login form component with email and password fields” becomes one task. “Add validation to the login form” becomes another. “Write the login API route” becomes a third.

Phase 2: Execution (Cheap Model)

For each todo item, the orchestrator spawns a subagent. Each subagent runs on the cheap model you configured and gets the full tool set: read, write, edit, bash, grep, everything. The subagent receives a focused prompt describing what to build and a system prompt defining its role.

The orchestrator reviews each result, checks off the todo, and spawns the next one. If something fails or hits ambiguity, it calls you with a question before continuing.

What the Orchestrator Never Does

The orchestrator never writes code. It never restricts subagent tools. It never passes model or provider parameters when spawning subagents. The system forces the cheap model and full tool set automatically. The orchestrator’s only jobs: understand, plan, delegate, review.

Setting Up Orchestrate Mode

You need one alias and optionally another. Both live in the same panel.

Open Project Settings, scroll to Advanced, find Model Aliases. Set the Cheap alias to any enabled model. Claude Haiku, GPT-4o-mini, Gemini Flash, DeepSeek, whatever fits your budget and quality threshold. This model handles all subagent work.

Optionally, set the Smart alias. When configured, the orchestrator uses Smart instead of your current chat model. Set Smart to Claude Fable or GPT-5.6 when you want the strongest possible planning. Leave Smart empty and the orchestrator runs on whatever model your chat is using.

Orchestrate mode now appears in your mode selector. No other configuration.

Using the /orchestrate Slash Command

Two ways to activate orchestrate mode.

From the mode selector. Click the mode dropdown next to the chat input and pick Orchestrate. Your next message runs in orchestrate mode. The mode stays active until you switch back.

From a prompt. Type /orchestrate at the start of your message, followed by your task. Tarsk switches into orchestrate mode for that message automatically.

/orchestrate add a dark mode toggle to the settings page with system preference detection

The slash command works anywhere in the chat input. Paste a task after it, type inline, or pick it from the autocomplete menu that opens when you type /.

Tarsk prepends /orchestrate when you pick the mode from the dropdown without typing it. Type /orchestrate without selecting the mode first and Tarsk switches the mode for you.

When Orchestrate Mode Saves the Most

Orchestrate mode costs tokens to plan. For single-file edits, simple fixes, or short messages, the overhead exceeds the savings. Switch into orchestrate mode only when the task warrants it.

The sweet spot is multi-file features with clear boundaries. Adding a page with a form, validation, and an API route. Refactoring a module across several files. Implementing something that touches frontend and backend. Any task where you normally watch the agent explore for several turns before writing a line of code.

Tasks with heavy exploration waste benefit the most. The agent spends 10 turns reading files, discovers half are irrelevant. In a single-model session you pay the frontier rate for every one of those wasted reads. Orchestrate mode shifts those reads to the orchestrator’s planning budget. The orchestrator is smarter about picking relevant files. The cheap subagents never see the irrelevant ones.

The Token Savings Breakdown

Take a typical multi-file feature with Claude Fable as your main model and Claude Haiku 4.5 as cheap.

A single-model session might burn 80,000 tokens: 45,000 input at $15 per million, 35,000 output at $75 per million. That costs roughly $3.30.

With orchestrate mode, the orchestrator does exploration and planning: 20,000 input, 5,000 output at Opus prices. That is $0.68. Five subagents get focused tasks with minimal context: 15,000 input and 25,000 output combined, at Haiku pricing of $1 per million input and $5 per million output. That is $0.14. Total: $0.82.

A 75 percent reduction for this scenario. Companies running similar orchestration patterns report 40 to 90 percent savings depending on task complexity and model choices. Expect 40 to 60 percent lower token spend on tasks that benefit from orchestration.

Savings come from three places. The cheap model handles output-heavy code generation at a fraction of the per-token price. Subagents get scoped context instead of the full exploration history. The orchestrator plans before building, so fewer turns get wasted on irrelevant files.

Where Orchestrate Fits Among the Modes

Tarsk has four chat modes. You switch between them from the mode selector next to the input.

Default. Handles your message in a single response with whatever tools the agent needs. Use for questions, quick fixes, short tasks.

Plan. Read-only agent that explores, designs, and writes a plan without editing files. Use for understanding scope before committing to changes.

Ralph. Autonomous loop with a todo checklist. The agent works through items until everything is done. Use for well-defined multi-step tasks where you want the agent to keep going without follow-ups.

Orchestrate. Adds model routing to the autonomous loop. Combines Plan’s discipline with Ralph’s autonomy, then delegates implementation to cheaper models. Use for multi-file features where token cost matters.

Switch modes mid-session. Plan something in Plan mode, then switch to Orchestrate to build it. Start in Orchestrate and switch to Default for follow-up tweaks.

Model Selection Tips

The cheap model does the heavy lifting on code generation. Pick a model that writes correct code in your stack. Test with a few single-file tasks first. A model at $0.15 per million tokens that generates broken React hooks on every attempt wastes more tokens in retries than it saves.

The smart model reasons and plans. It needs reading comprehension and task decomposition more than competitive programming ability. A model that can read code and identify patterns matters more than one that can solve Advent of Code problems.

Different stacks favor different cheap models. Claude Haiku handles TypeScript and React well. GPT-4o-mini is strong on Python and data tasks. Gemini Flash brings a large context window for tasks spanning many files. DeepSeek offers the lowest per-token cost when budget matters most. Test what works for your codebase.

Limits to Know

Task granularity matters. The orchestrator breaks work into pieces a cheap model can handle. Tasks that are too large or vague produce subagent failures and incomplete work. The orchestrator catches failures and can re-spawn, but that costs extra tokens.

No mid-execution redirection. Once subagents start building, the orchestrator cannot redirect them if a later task changes assumptions.

Cheap models have blind spots. Every cheap model struggles with something. Complex type inference trips up some. Edge cases in state management flummox others. If your codebase depends on patterns the cheap model handles poorly, orchestrate mode costs more than it saves.

Simple tasks do not benefit. For single-file changes, quick fixes, or questions, switch to Default. The orchestration overhead eats any savings.

What You See During an Orchestrated Session

The chat shows the orchestrator’s exploration and planning in the main thread. Todo items appear as the orchestrator creates them. Each subagent spawn appears as a tool call in the conversation: the prompt sent, the result returned. You can see which model each subagent ran on in the usage metadata.

The orchestrator reports progress as it works through the todo list. When it hits a blocking question, it pauses and asks you before spawning more subagents. You stay in the loop without approving every small edit.

When all todos are done, the orchestrator reports a summary of what changed. Review the diff, run tests, commit. Same as any other session.

Set your Cheap alias, type /orchestrate with your next multi-file task, and watch it plan and delegate. Most users see the savings after the first session.