Claude docs changes for March 8th, 2026 [diff]

Executive Summary

  • The Task tool has been renamed to Agent across the entire Agent SDK (introduced in Claude Code v2.1.63); Task remains accepted as an alias for backwards compatibility
  • Python SDK gains list_sessions() and get_session_messages() functions, plus new add_mcp_server() / remove_mcp_server() methods on ClaudeSDKClient
  • New task lifecycle message types added to Python SDK: TaskStartedMessage, TaskProgressMessage, and TaskNotificationMessage for tracking background task progress
  • Hook inputs (PreToolUseHookInput, PostToolUseHookInput, PostToolUseFailureHookInput) now include agent_id and agent_type fields when firing inside a subagent
  • TypeScript SDK adds getSessionMessages() function and a new toolConfig.askUserQuestion.previewFormat option enabling rich HTML/Markdown previews in AskUserQuestion options

Claude Code changes

Changed documents

mcp [Source]

  • List of available remote MCP servers reordered and updated with new entries (Vibe Prospecting, Magic Patterns, Midpage Legal Research, Clerk, Postman added; listing order of existing servers changed).

API changes

Changed documents

agent-loop [Source]

  • The orchestration tool Task has been renamed to Agent in the built-in tools table. [line 84] [Source]

claude-code-features [Source]

  • Reference to allowedTools: ["Task"] updated to allowedTools: ["Agent"] in the subagent delegation row of the feature configuration table. [line 165] [Source]

hooks [Source]

  • Matcher description updated: built-in tool list now shows Agent instead of Task. [line 148] [Source]
  • Guidance for discovering tool names updated to point to the TypeScript SDK reference for the full list. [line 154] [Source]
  • Hook callback arguments reformatted to bullet list; new agent_id and agent_type fields documented on all hook inputs — these are populated when the hook fires inside a subagent. [lines 161-172] [Source]

mcp [Source]

  • bypassPermissions description updated: propagation now refers to the Agent tool instead of Task. [line 116] [Source]

python [Source]

  • New list_sessions() function documented with parameters (directory, limit, include_worktrees), SDKSessionInfo return type, and example. [lines 199-260] [Source]
  • New get_session_messages() function documented with parameters (session_id, directory, limit, offset), SessionMessage return type, and example. [lines 262-292] [Source]
  • ClaudeSDKClient.get_mcp_status() return type changed from dict to list[McpServerStatus]. [line 314] [Source]
  • New add_mcp_server(name, config) and remove_mcp_server(name) methods added to ClaudeSDKClient. [lines 315-316] [Source]
  • New McpServerStatus type documented (returned by get_mcp_status()), with fields for name, status, serverInfo, error, config, scope, and tools. [lines 1048-1079] [Source]
  • New TaskStartedMessage, TaskUsage, TaskProgressMessage, and TaskNotificationMessage types documented for tracking background task lifecycle events (subagents, backgrounded Bash commands, remote agents). [lines 1224-1318] [Source]
  • agent_id and agent_type optional fields added to PreToolUseHookInput, PostToolUseHookInput, and PostToolUseFailureHookInput — populated when the hook fires inside a subagent. [lines 1551-1615] [Source]
  • Task tool section renamed to Agent (with note that Task is still accepted as an alias). [line 1884] [Source]

remote-mcp-servers [Source]

  • Several MCP servers reordered in the listing; new servers added: Airtable, Vibe Prospecting, Magic Patterns, Gusto, SignNow, PagerDuty, Clerk, Postman, Base44, and lastminute.com.

sessions [Source]

  • Updated to mention both SDKs now expose session listing and message retrieval: list_sessions() / get_session_messages() in Python, and listSessions() / getSessionMessages() in TypeScript (previously only TypeScript was mentioned). [line 233] [Source]

subagents [Source]

  • Task tool renamed to Agent throughout; allowedTools examples updated accordingly. [lines 52-68] [Source]
  • Compatibility note added: the rename from Task to Agent happened in v2.1.63; current SDK emits "Agent" in tool_use blocks but still uses "Task" in system:init and permission_denials. Checking both values is recommended. [lines 197-200] [Source]
  • Detection example updated to match on both "Task" and "Agent" in tool_use blocks for cross-version compatibility. [lines 221-228] [Source]

typescript [Source]

  • listSessions() updated: options.dir description clarified; new options.includeWorktrees parameter documented (default true, controls whether worktree sessions are included when dir is inside a git repo). [lines 93-112] [Source]
  • New getSessionMessages() function documented with parameters (sessionId, dir, limit, offset), SessionMessage return type, and example. [lines 130-176] [Source]
  • New toolConfig option added to ClaudeAgentOptions — see ToolConfig type. [line 226] [Source]
  • New ToolConfig type documented: askUserQuestion.previewFormat ("markdown" or "html") enables a preview field on AskUserQuestion options for visual mockups. [lines 498-512] [Source]
  • AskUserQuestionInput and AskUserQuestionOutput updated: each option now has an optional preview field (string). [lines 1241-1583] [Source]
  • BaseHookInput updated with optional agent_id and agent_type fields (present when hook fires inside a subagent). [lines 893-894] [Source]
  • ModelInfo updated with new supportsFastMode boolean field. [line 2056] [Source]
  • Task tool sections renamed to Agent (with note that Task is still accepted as an alias).

user-input [Source]

  • New "Option previews (TypeScript)" section documents the toolConfig.askUserQuestion.previewFormat option, explaining "markdown" and "html" modes, how Claude decides when to include previews, and SDK-side sanitization of HTML. [lines 325-371] [Source]
  • Limitation note updated to reference Agent tool instead of Task. [line 488] [Source]