What
MCP (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:
- 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.
- The schema used by programs built on the Agent SDK gains an optional
taskKindfield 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.
Why
The 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.