$ lexprog.com

// notes from an old coder -- php, databases, and the occasional rant

[October 31, 2026] AI

Separate Planner Tokens from Worker Tokens

Use a smaller model to break a task into tool calls, then a stronger model only for the hard edit. You cut cost without losing the critical patch.

────────────────────────────────────────────────────────

Separate Planner Tokens from Worker Tokens

Tip: A cheap model can plan the steps

Use a smaller model to break a task into tool calls, then a stronger model only for the hard edit. You cut cost without losing the critical patch.

plan = cheap.complete(f'Outline steps for: {task}')
result = strong.complete(plan, tools=repo_tools)

Gotcha: The cheap planner invents APIs

If the planner has no tool schema, it will invent endpoints. Pass the same tool list into the planner, or constrain it to numbered steps with no APIs.

plan = cheap.complete(task)  # no tools → fictional functions

Source: https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview

────────────────────────────────────────────────────────
<-- back to posts