{"version":"2.1.300","anchor":"mcp-task-end-notification-gets-a-taskkind-field","canonical_anchor":"mcp-task-end-notification-gets-a-taskkind-field","heading":"MCP task endings are saved to disk and labelled for SDK programs","tier":"use","area":"SDK","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300\/e\/mcp-task-end-notification-gets-a-taskkind-field","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.300","markdown":"### MCP task endings are saved to disk and labelled for SDK programs\n\nThe outcome of an MCP server's task is now saved until the model has read it, and its end notification carries taskKind 'mcp-task'\n\n**What**\n\nMCP (Model Context Protocol) is the way outside tools connect to Claude Code, and some MCP servers run long tasks of their own. How their endings are handled changed:\n\n- A new record on disk stores each MCP task's final outcome: completed, failed or cancelled. It is kept until the conversation transcript is confirmed saved and the model has read the notification, then deleted. Rewinding the conversation to before the call that started the task also deletes it.\n\n- The schema used by programs built on the Agent SDK gains an optional `taskKind` field with the value `'mcp-task'`. It appears only on a notification that an MCP server's own task has ended, not on every task notification, and the schema marks it `@internal`.\n\n**Why**\n\nThe result of a long MCP task is kept until the model has actually seen it, so it may survive a session resume. Programs reading these notifications can tell an MCP server's own task ending apart from other task endings.\n\n- Area: SDK\n- Tier: Use it now\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}