Upgrading the Claude Agent SDK can break code: unserializable options and non-array hook values are now refused, and SDK MCP servers inside an agent's mcpServers are ignored. Move them to top-level mcpServers.
Key takeaways · AI-distilled
Claude AI agentAn AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.Full definition → SDK 0.3.327 makes query(), startup() and prewarm() refuse options that cannot be sent to Claude Code, such as an agent with a circular or BigInt field, so code passing such options now fails until the named option is fixed.
agent hookA script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.Full definition → configuration must now use arrays for both a hook event's value and a matcher's hooks; a Set, generator, plain object, true or number is refused, a breaking change for code that relied on looser shapes.
createSdkMcpServer() servers listed in an agent's own mcpServers are deprecated and ignored with a warning. The notes say to move them to top-level mcpServers, which also gives the main session their tools.
The release reverts 0.3.326's fix for SDK MCPThe Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.Full definition → tool results being lost or delivered to another call after a reconnect, and switches request IDs sent to SDK MCP servers back from strings to numbers.
Terms in this piece · Glossary
AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
agent hook — A script the harness runs automatically at a fixed point in an agent's loop — before a tool call, after an edit, on session start.
MCP — The Model Context Protocol — an open standard that lets any AI assistant plug into any tool or data source without custom integration code.