Why this works

Stop paying the reasoning tax.

When an agent does the same kind of task again and again, it often starts from scratch each time: rereading context, planning the steps, choosing tools, and checking the same rules.

That repeated planning is the reasoning tax.You are paying the model to tread the same ground on every run.
01 / The pattern

History shows what keeps repeating.

Past agent sessions are execution traces. Look across enough of them and the repeated path becomes visible.

01ReadThe same instructions and sources
02PlanThe same sequence of steps
03ReasonThrough the same rules and state
04CheckThe same completion conditions
02 / The rewrite

Separate repetition from judgment.

Once the repeated path is clear, rewrite the workflow so each part is handled by the right tool.

Predictable work → code

Loading files, applying fixed rules, tracking state, calling tools, validating results, and deciding when the workflow is complete.

+

Judgment → AI

Understanding meaning, resolving ambiguity, choosing among valid options, and producing useful language.

The result: the same workflow, rewritten to avoid repeated reasoning while preserving the parts that actually benefit from an AI model.
03 / The method

Find. Separate. Rewrite. Measure.

The shared prompt asks your agent to perform the whole optimization in a separate folder before changing anything you already use.

01

Find

Examine historical sessions for a workflow that repeats often.

02

Separate

Identify the deterministic steps and the steps that need judgment.

03

Rewrite

Turn repeated procedure into code and keep focused model calls where needed.

04

Measure

Replay old tasks and compare tokens, time, calls, and useful output.

On typical repeatable agent workflows:

94–96%fewer gross tokens
87–92%less elapsed time
Sameuseful output quality
Measured across 15 matching historical scenarios. These results show what is possible, not what every workflow will achieve.
04 / Watch

Go deeper in two short videos.

Vivek Haldar explains the idea and its implementation.

Specialized Harness Engineering

The case for purpose-built agent workflows.

Specialized Harness Compiler

How repeated reasoning becomes a smaller, faster system.

Try it on your own agent history

Find where you are paying the reasoning tax.

Copy the prompt and drop it into Codex, Claude Code, or your agent of choice.

Get the optimization prompt →