Your agent has thinking on, and a tool call fails with a 400 after you trimmed the assistant turn to just its tool_use block. What is the fix?
Why B is the answer
Pass back every thinking block exactly as received
During tool use, thinking and redacted_thinking blocks from the assistant turn must be returned unchanged. Trimming or editing them breaks the exchange.
In detail
- During tool use, thinking and redacted_thinking blocks must be returned unchanged.
- Trimming or editing them breaks the exchange.
- Treat assistant content as opaque when you pass it back.
Use case
An illustrative scenario, not a real incident.
An agent with thinking on returns a 400 after a helper tidies the assistant turn to just the tool call. Passing the whole turn back unchanged fixes it.
See it in different ways
sequenceDiagram participant App as Your code participant C as Claude C-->>App: thinking block plus tool_use App->>C: Same thinking block plus tool_use, then tool_result C-->>App: Final answer
sequenceDiagram participant A as Your code participant C as Claude A->>C: Request with tools C-->>A: tool_use blocks A->>A: Run the tools A->>C: tool_result blocks first, then any text C-->>A: Final answer
sequenceDiagram participant P0 as Your code participant P1 as Claude P0->>P1: Request with thinking on P1-->>P0: thinking and tool_use blocks P0->>P1: All blocks unchanged, plus tool_result
Key point: Return thinking blocks exactly as received.
Why the other options are wrong
- A. Turn off streaming
- Streaming has nothing to do with this.
- C. Move the tool result into the system prompt so that the turn stays short
- Tool results belong in the user turn, and this is not the cause.
- D. Raise the tool_result size limit
- The failure is the missing thinking block, not a size limit.

