Skip to main content

Steve Kinney

Cost Management in Claude Code

Cost management in Claude Code is mostly context management. Expensive models and large context windows are useful, but they should be tied to task value.

Spend on the Hard Part

Use stronger models for planning, security review, migration design, and high-risk debugging. Use cheaper or default models for routine implementation once the plan is clear.

The opusplan alias is a good example: spend more on the plan, then implement with a faster model.

Keep Context Small

Before using a one-million-token context alias, ask whether the task really depends on that much input. A targeted prompt with file references is often better:

Read @src/lib/server/invitations.ts and the closest tests. Do not scan unrelated
routes unless the implementation requires it.

Large context should solve a real evidence problem, not a prompting habit.

Use Plan Mode Before Expensive Edits

Plan mode can prevent wasted implementation turns. If the plan names the wrong files, stop before paying for a long edit loop.

Use Fallbacks Deliberately

Fallback chains improve reliability, but they can also change capability. Do not let a fallback silently weaken a task that needs a specific reasoning level or retention policy.

Measure by Quality Gates

The cheapest agent run is the one that ends with a passing targeted test and a small diff. The expensive run is the one that edits broadly, fails lint, and needs a human to untangle it.

Last modified on .