cd /news/large-language-models/claude-cost-optimization-instruction… · home topics large-language-models article
[ARTICLE · art-106128] src=gist.github.com ↗ pub= topic=large-language-models verified=true sentiment=· neutral

claude cost optimization instructions

Anthropic has published a set of cost-optimization instructions for Claude, emphasizing a plan-first gate, delegation of exploration to subagents, and defaulting to the cheaper Haiku model for subagent tasks. The guidance also advises against proactive context pruning to preserve prompt cache stability and recommends batching actions and parallelizing independent subtasks.

read2 min views1 publishedAug 21, 2026

Plan-first gate. Before the first tool call on any task you expect to take more than ~3 tool calls, output a visible 3-6 bullet plan and execute against it instead of exploring turn-by-turn. If a task that looked simple grows past 3 tool calls without a plan having been stated, stop and write one before the next call — don't let "I'll just check one thing" silently turn into an unplanned multi-step investigation.

Delegate-exploration gate. The moment discovery needs more than 2 exploratory lookups to find the right source/location/API (schema searches, grep sweeps, doc reads, table/tool discovery), stop doing it inline and hand the rest of the discovery to a subagent (fork, or Explore for pure search). Bring back only its 1-3 sentence conclusion — not the raw tool output — into the main thread. This applies even when the lookups are individually cheap (e.g. find_tables/schema calls); it's the count that triggers delegation, not the size of any one call.

Cheap-model-by-default gate. When spawning a subagent, default to Haiku. Only use Sonnet 5 or higher for that subagent when its task genuinely requires judgment, synthesis, or multi-step reasoning beyond mechanical lookup/transformation — and when you reach for a higher model, note in one clause why the task needs it. Reserve Sonnet 5+ in the main loop for orchestration and judgment calls.

Don't proactively re-summarize or prune context on a fixed cadence — rewriting/discarding earlier turns breaks the prompt cache's stable prefix and forces an expensive full rewrite of everything downstream, often costing more than it saves. Let the harness's automatic compaction handle context growth; if you deliberately compact, do it at natural phase boundaries (e.g. finishing research before starting implementation), not on a tool-call counter.

Never paste full file contents, full command output, or full logs into your reasoning. Use rg -n, sed -n, or head -n 50 / tail -n 50 to pull only the lines relevant to the current step.

Batch related actions into a single turn (e.g. read + edit + verify) instead of one tool call per turn.

Prefer editing files with targeted patches over rewriting whole files.

If a task naturally splits into independent phases, start a fresh session per phase and carry forward only a short written handoff summary, not the full prior transcript. Match agent type to the task: use the narrowest agent suited to the job (e.g. Explore for pure search) instead of defaulting to a general-purpose agent, to cut tool-access and context overhead.

Parallelize by default: when subtasks are independent (don't need each other's output), run them concurrently — batched tool calls in one turn, or multiple agent calls in a single message — rather than sequentially.

── more in #large-language-models 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/claude-cost-optimiza…] indexed:0 read:2min 2026-08-21 ·