Prompt & Context Engineering·Question 52 of 68Advanced

Reasoning effort can now be changed per message, mid-conversation, without losing the prompt cache. Design an agent policy that raises and lowers effort turn by turn, and explain the effect on cost, latency and cache hit rate.

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

The mechanism first. In September 2026 Anthropic added per-message effort in beta: a mid-conversation system message carrying output_config.effort changes effort for later turns while preserving the prompt cache. OpenAI added mid-conversation reasoning-effort changes for GPT-6 Astra that keep the cached prefix. The point of both is that the change rides in the appended part of the conversation, so the long, cached prefix of system prompt, tools and history is untouched.

Full worked answer with diagram

The mechanism first. In September 2026 Anthropic added per-message effort in beta: a mid-conversation system message carrying output_config.effort changes effort for later turns while preserving the prompt cache. OpenAI added mid-conversation reasoning-effort changes for GPT-6 Astra that keep the cached prefix. The point of both is that the change rides in the appended part of the conversation, so the long, cached prefix of system prompt, tools and history is untouched.

That matters because the obvious alternatives are bad. A single effort setting for the whole session means you either pay high-effort prices on every trivial step or run hard steps at low effort. Switching models for hard steps means a different cache, so you re-prefill the entire context on the expensive model.

The policy I would build:

  • Default low (or medium for coding agents). Most agent steps are mechanical: read a file, call a search tool, format a result.
  • Escalate on signals, not on vibes. Raise effort when the agent is about to plan or re-plan, after a tool error or failing test, when two consecutive steps made no progress, before an irreversible action, and when the task spec is ambiguous. Each of these is cheap to detect from the transcript.
  • De-escalate after the hard step. Once the plan exists or the failing test passes, drop back for execution. Without this, effort only ratchets up and you end at max for the whole tail of the session.
  • Cap per session. Count reasoning tokens per session and stop escalating past a budget, so a stuck agent cannot loop at max effort.

Effects to state with numbers:

  • Cost. Reasoning tokens bill as output, which is typically several times the input price. If 15% of steps need high effort, running everything at high pays for the other 85% for nothing. Per-turn switching usually beats a single "medium" setting on both cost and quality, because medium is wrong for both ends.
  • Latency. Thinking tokens are generated serially, so high-effort turns are slow and low-effort turns stay fast. Users see fast routine steps and a visible pause before the hard ones, which is the right shape.
  • Cache hit rate. Should stay flat, which is the whole point. Verify it: log cache-read and cache-write tokens per turn and alert if effort changes correlate with cache misses. An implementation that edits the top-level system prompt to change effort, rather than appending a message, will quietly destroy the cache.

Worth sketching. Drawing it is optional, but the loop makes clear that the effort change is appended and the prefix never moves.

flowchart TD
    A["Cached prefix<br/>(system, tools, history)"] --> B["Next agent step"]
    B --> C{"Plan, error, stall<br/>or irreversible action?"}
    C -->|"yes"| D["Append message:<br/>effort high"]
    C -->|"no"| E["Append message:<br/>effort low"]
    D --> F["Run turn, log reasoning<br/>and cache-read tokens"]
    E --> F
    F --> B

Evaluate the policy, not just the model: run the same task set with fixed-low, fixed-high and the adaptive policy, and compare success rate, cost per task and p95 step latency. If adaptive does not beat fixed-high on cost at equal success, your escalation signals are wrong.

What a good answer covers

  • In September 2026 Anthropic added per-message effort in beta
  • OpenAI added mid-conversation reasoning-effort changes for GPT-6 Astra that keep the cached prefix
  • The point of both is that the change rides in the appended part of the conversation, so the long, cached…
  • That matters because the obvious alternatives are bad
  • A single effort setting for the whole session means you either pay high-effort prices on every trivial…

Key terms: Default low · De-escalate after the hard step · Cap per session · Cost · Latency · Cache hit rate

Interviewer follow-ups to expect

  1. Which escalation signal would you trust least, and why?

  2. How would you detect that the policy is ratcheting up and never coming back down?

  3. What changes if the provider's effort scale has no off or none level?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep