By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
The reconciliation job gets about one ticket in twenty wrong. An engineer responds the way most of us do: a longer instruction. Work step by step. Show your reasoning. Check the total twice.
Quality moves a little. Latency goes up, the replies get wordier, and the wrong totals stay wrong. The instruction asked the model to reason inside the answer, which is not where reasoning is cheapest.
With extended thinking enabled, the response can include thinking blocks before the answer. They are the model's working notes. You can read them, and you pay for them as output tokens.
That last part is the trap. Thinking tokens count against your output ceiling, so a ceiling sized for the answer alone can be consumed before the answer starts. Check stop_reason before you parse anything.
In a tool loop, send the thinking blocks back with the assistant turn. They carry the reasoning the next step depends on, and some models reject a request that drops them. Keep the whole assistant message intact.
Sampling settings interact with thinking. When thinking is on, follow the settings documented for that model instead of copying values from a non-thinking call.
Effort is a per-call setting for how much work the model spends. Low effort answers fast with less deliberation. High effort spends more tokens and more time on hard problems. Adaptive thinking lets the model choose the amount within the ceiling you set.
| Effort | Typical call | What you trade | Confirm it with |
|---|---|---|---|
| Low | Classification, routing, extraction against a clear rubric | Weaker handling of edge cases | A labelled sample and a confusion matrix |
| Medium | Drafting, summarising, most agent tool calls | Balanced quality and latency | A side-by-side score against low effort |
| High | Multi-step analysis, reconciliation, planning | Latency and output tokens on every call | Accuracy gained per added unit of cost |
Choose effort the way you choose a tier: name the binding constraint, then test the cheapest setting that clears it. Set it per call. A triage call and a reconciliation call rarely need the same amount of work.
Measure the gain, not the effort. Run both settings on the same labelled set. If high effort buys two points of accuracy for triple the cost, take the cheaper setting and spend the difference on a better rubric.
Fast mode serves a model with lower latency. The speed comes from somewhere: cost, availability, or the conditions under which it applies. Read the current documentation for the model you use before you depend on it.
Treat it as a separate configuration for the latency-sensitive path. An interactive reply and a nightly backfill have opposite needs, and the backfill should not pay for speed it cannot use.
Test it the same way you test a tier change: same inputs, same assertions, and a note on latency and cost. A speedup that changes the answer is a different product.
Thinking makes the first visible token arrive later, so an interface that waits for the full response feels broken. Stream the response instead. The official SDKs wrap the REST API and hand you typed events, so you read content blocks as they arrive rather than parsing raw chunks.
Claude streams over HTTPS with server-sent events: one long response in one direction, from server to client. A websocket is a two-way channel, and it fits when the client also pushes events during the request. Match the transport to the direction of the traffic.
# A local policy, not an API rule. The guard protects the answer's room.
MIN_ANSWER_TOKENS = 1024
POLICY = {
"classify": {"effort": "low", "max_tokens": 512, "thinking": False},
"draft": {"effort": "medium", "max_tokens": 2048, "thinking": False},
"reconcile": {"effort": "high", "max_tokens": 8192, "thinking": True},
}
def plan(call: str, policy: dict) -> dict:
if call not in policy:
raise KeyError(f"no policy for {call!r}")
settings = policy[call]
if settings["thinking"] and settings["max_tokens"] < MIN_ANSWER_TOKENS:
raise ValueError(f"{call}: thinking leaves no room for the answer")
return settings
for name in POLICY:
print(name, plan(name, POLICY))
try:
plan("reconcile", {**POLICY, "reconcile": {
"effort": "high", "max_tokens": 512, "thinking": True}})
except ValueError as exc:
print("rejected:", exc)Find the one call in your app that most deserves thinking, and the one that least deserves it.
Key takeaways
Extended thinking buys reasoning depth in a separate channel that you pay for as output.
Thinking competes with the answer for the output ceiling, so check stop_reason before parsing.
Set effort per call and confirm the gain on a labelled set.
Fast mode trades cost or availability for latency; scope it to interactive paths.
Stream with server-sent events for one-way output, and use websockets only when the client also pushes.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.