Course · Claude Code · Models & thinking
Match the model and the reasoning effort to the task
Two dials decide how much capability your agent brings to a task: which model answers, and how hard that model reasons before it acts (Claude Code, the terminal coding agent this course teaches, exposes the second as extended thinking). It is easy to find one setting that works, leave it there, and pay for it on every prompt - either burning budget and latency on trivial work, or flailing at a problem that needed real reasoning.
The trap is easiest to see on a day that spans the whole difficulty range. Take two tasks from a small TypeScript payments service (the example this course returns to; every page restates the facts it needs):
- In
src/payments/processor.ts, the duplicate check ends withthrow new Error("duplicate payment")- accurate, terse, and useless to an integrator asking whether money moved. The task is to rewrite the message so a caller who retries with the sameIdempotency-Keylearns what happened and what to do next. It is one string in one file. - In
src/payments/rate-limiter.ts, the async methodallowAsynchas anawaitsitting between its read and its write, so two concurrent callers can both pass the limit check. That is a genuine race: it only shows under load, and a confident wrong patch costs real rework to unpick.
The first task does not need deep reasoning - there is nothing to reason about. The second is exactly what deep reasoning is for. Running the heaviest setting on both, or the lightest on both, is the same mistake in opposite directions: a fixed setting against a variable workload.
The chapter, in three moves
Section titled “The chapter, in three moves”- Switch to a lighter model for the string edit: the
/modelpicker, what is saved across sessions versus what lasts only for this one, and the tax you pay for switching mid-conversation. - Turn the thinking up for the race: the
/effortdial, theultrathinkone-turn keyword, and a worked pass over the realallowAsynccode. - Make per-task spend a habit: two independent dials, the corners where money leaks, and the one case where you deliberately buy speed.
The two dials set the agent’s capability - what it can figure out and accomplish with its model and tools. The through-line is the course’s cost principle: what completing a task consumes in money, compute, elapsed time, attention, and rework. You may have met the same idea applied to the context window; this chapter applies it to the agent’s reasoning. The hard problem gets the heavier setting, the string edit gets the lighter one, and you stop paying maximum for a workload that is mostly mechanical.
Start with the small one: the error string, and the model switch that fits it.