🧩UserMessage
Also known as SDK user message, tool result message, Claude Agent SDK UserMessage
The message that takes a tool's result, or your own words, back to Claude.
Think of it like
It is like the note a helper gets back once they check.
Example
Leo's tests fail inside the agent. He prints each UserMessage and sees the exact error Claude was given.
Why it matters
When the agent does something odd, the tool result is often why.
Definition
Common mistake
Key takeaways
- 1Tool results. After each call.
- 2Your streamed input. Too.
- 3What Claude saw. Before acting.