You are running a reasoning model in a multi-turn tool-use loop. What do you do with its reasoning between calls, and what breaks if you drop it?
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
Pass the reasoning state back exactly as the API returned it, at least within the current tool-use turn, and let the provider decide what it keeps after that. Dropping or editing it is a common reason agents get worse after their first tool call.
Full worked answer with diagram
Pass the reasoning state back exactly as the API returned it, at least within the current tool-use turn, and let the provider decide what it keeps after that. Dropping or editing it is a common reason agents get worse after their first tool call.
Why it matters: in a tool loop the model reasons, emits a tool call and stops. When you send the tool result, the model continues the same turn. If its earlier reasoning is missing, it has to work out from the call alone why it made the call, so plans get lost and steps get repeated. That looks like a weak model when it is really a plumbing bug.
Providers expose this differently, so it belongs in your adapter layer:
- Anthropic returns thinking blocks that carry a signature. When you send a tool result, the preceding assistant turn must include those blocks complete and unmodified, and the signature lets the API detect tampering. Redacted thinking blocks are opaque and go back as-is. Since September 2026 the API preserves thinking blocks only for the model that produced them or a newer one, so if you fall back to an older model mid-conversation, do not count on the earlier reasoning carrying over.
- OpenAI's Responses API returns reasoning items. Either chain requests through server-side state or, when you cannot let the provider store state, request the encrypted reasoning content and send it back with the next call. Endpoints that throw reasoning away between calls give you no way to preserve it.
The engineering consequences:
- Never rewrite the transcript inside a tool-use turn. Compaction, redaction and trimming happen only at turn boundaries.
- Treat reasoning as opaque. Do not parse it, edit it or use it as your audit log. Summaries returned for display are for humans, not for feeding back.
- Budget for it. Carried reasoning counts against the window, and providers differ on whether earlier turns' reasoning is stripped automatically. Measure actual context growth per step rather than assuming.
- Caching. Changing what you send back for earlier turns changes the prefix and costs a cache rebuild.
A test worth keeping through every migration: run the same multi-step tasks with reasoning passed back and with it stripped. The gap shows how much your loop depends on it.
Worth sketching. The fifth arrow is the whole answer: the reasoning goes back unchanged inside the turn.
sequenceDiagram
participant App
participant Model
participant Tool
App->>Model: Messages and tool schemas
Model-->>App: Reasoning block plus tool call
App->>Tool: Execute the call
Tool-->>App: Result
App->>Model: Same reasoning block, unmodified, plus the result
Model-->>App: More reasoning, then the final answer
Note over App,Model: Compact or trim only at turn boundaries
What a good answer covers
- Pass the reasoning state back exactly as the API returned it, at least within the current tool-use turn,…
- Dropping or editing it is a common reason agents get worse after their first tool call
- Why it matters: in a tool loop the model reasons, emits a tool call and stops
- When you send the tool result, the model continues the same turn
- If its earlier reasoning is missing, it has to work out from the call alone why it made the call, so…
Key terms: Anthropic · OpenAI's Responses API · Treat reasoning as opaque · Budget for it · Caching
In the glossary: Tool call · Compaction
Interviewer follow-ups to expect
Your compaction job runs on a timer and sometimes fires mid tool-use turn. What breaks, and how do you fix it?
How do zero-data-retention requirements change how you carry reasoning between calls?
Why should you not use the model's reasoning as your audit trail?
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