{"version":"2.1.323","anchor":"sdk-message-schema-supersedes-now-covers-unparseable-tool-c","canonical_anchor":"sdk-message-schema-supersedes-now-covers-unparseable-tool-c","heading":"SDK messages can now replace earlier ones after a tool call fails to parse","tier":"notice","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323\/e\/sdk-message-schema-supersedes-now-covers-unparseable-tool-c","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.323","markdown":"### SDK messages can now replace earlier ones after a tool call fails to parse\n\nIn the SDK message stream, a message can now replace earlier ones after an unparseable tool call, including your own messages\n\n**What**\n\nThe Agent SDK is a toolkit for building your own programs on top of Claude Code. It sends a stream of messages. One field on a message names earlier messages that it replaces. That field's description now covers a new case: a response whose tool call could not be parsed. A tool call is a single action Claude asks to take. Before, it covered only the fallback after a refusal. The messages it replaces can now include user messages as well.\n\nSeparately, Claude Code now also removes worker-only fields from a control response when that response has an `error_code` field.\n\n**Why**\n\nA program that displays the stream should remove every message that has been replaced, including user messages. Otherwise it can go on showing messages that no longer apply.\n\n- Area: SDK\n- Tier: You'll notice\n- Useful: 2\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}