9 ファイル変更+340-12

この更新の概要

Agent SDKにおけるタスク管理機能が大幅に刷新され、従来のTodoWriteツールが非推奨となりました。新たにTaskCreate、TaskUpdate、TaskGet、TaskListの4つのツールが導入され、タスクごとに独立したID管理やステータス更新が可能になっています。これらの新機能を利用するには環境変数CLAUDE_CODE_ENABLE_TASKS=1の設定が必要であり、移行ガイドも合わせて公開されました。その他、MCPやセキュリティ関連の設定、ツールの参照情報についても細かな修正が行われています。

agent-sdk/python+110-0

Python SDKにおいて非推奨となったTodoWriteの代替として、TaskCreateやTaskUpdateなど新しいタスク管理ツールの入出力仕様が追加されました。

@@ -2596,6 +2596,8 @@ Runs a background script and delivers each stdout line to Claude as an event so
**Tool name:** `TodoWrite`
`TodoWrite` is deprecated and will be removed in a future release. Use `TaskCreate`, `TaskGet`, `TaskUpdate`, and `TaskList` instead. Set `CLAUDE_CODE_ENABLE_TASKS=1` to opt in. See [Migrate to Task tools](/en/agent-sdk/todo-tracking#migrate-to-task-tools) for how monitoring code changes.
**Input:**
```python
@@ -2619,6 +2621,114 @@ Runs a background script and delivers each stdout line to Claude as an event so
}
```
### TaskCreate
**Tool name:** `TaskCreate`
**Input:**
```python
{
"subject": str, # Short task title
"description": str, # Detailed task body
"activeForm": str | None, # Present-tense label shown while in progress
"metadata": dict | None, # Arbitrary caller metadata
}
```
**Output:**
```python
{
"task": {"id": str, "subject": str}, # Created task with assigned ID
}
```
### TaskUpdate
**Tool name:** `TaskUpdate`
**Input:**
```python
{
"taskId": str, # ID of the task to patch
"status": Literal["pending", "in_progress", "completed", "deleted"] | None,
"subject": str | None,
"description": str | None,
"activeForm": str | None,
"addBlocks": list[str] | None, # Task IDs this task now blocks
"addBlockedBy": list[str] | None, # Task IDs that now block this task
"owner": str | None,
"metadata": dict | None,
}
```
**Output:**
```python
{
"success": bool,
"taskId": str,
"updatedFields": list[str], # Names of fields that changed
"error": str | None,
"statusChange": {"from": str, "to": str} | None,
}
```
### TaskGet
**Tool name:** `TaskGet`
**Input:**
```python
{
"taskId": str, # ID of the task to read
}
```
**Output:**
```python
{
"task": {
"id": str,
"subject": str,
"description": str,
"status": Literal["pending", "in_progress", "completed"],
"blocks": list[str],
"blockedBy": list[str],
} | None, # None when the ID is not found
}
```
### TaskList
**Tool name:** `TaskList`
**Input:**
```python
{}
```
**Output:**
```python
{
"tasks": [
{
"id": str,
"subject": str,
"status": Literal["pending", "in_progress", "completed"],
"owner": str | None,
"blockedBy": list[str],
}
],
}
```
### BashOutput
**Tool name:** `BashOutput`
agent-sdk/todo-tracking+54-0

新しいタスク管理ツールへの移行ガイドが追加され、ツールごとの挙動の違いや環境変数による有効化方法、実装例が詳しく説明されています。

@@ -9,6 +9,8 @@ source: https://code.claude.com/docs/en/agent-sdk/todo-tracking.md
Todo tracking provides a structured way to manage tasks and display progress to users. The Claude Agent SDK includes built-in todo functionality that helps organize complex workflows and keep users informed about task progression.
`TodoWrite` is the current default in the Agent SDK and the examples on this page use it. The replacement Task tools are available now behind `CLAUDE_CODE_ENABLE_TASKS=1` and will become the default in a future release. See [Migrate to Task tools](#migrate-to-task-tools) for how monitoring code changes.
### Todo Lifecycle
Todos follow a predictable lifecycle:
@@ -176,6 +178,58 @@ tracker = TodoTracker()
await tracker.track_query("Build a complete authentication system with todos")
```
## Migrate to Task tools
The Task tools split the single `TodoWrite` call into `TaskCreate` for each new item and `TaskUpdate` for each status change, with `TaskList` and `TaskGet` available for the model to read back the current list. Your monitoring code still inspects `tool_use` blocks in the assistant stream, but maintains a map keyed by task ID instead of replacing the whole list on every call. To opt in before the Task tools become the default, set `CLAUDE_CODE_ENABLE_TASKS=1` in `options.env`.
| With `TodoWrite` | With Task tools |
| - | - |
| One tool call rewrites the full `todos` array | `TaskCreate` adds one item, `TaskUpdate` patches one item by `taskId` |
| Match `block.name === "TodoWrite"` | Match `block.name === "TaskCreate"` or `"TaskUpdate"` |
| Item shape: `{ content, status, activeForm }` | `TaskCreate` input: `{ subject, description, activeForm?, metadata? }`. `TaskUpdate` input: `{ taskId, status?, subject?, description?, activeForm?, addBlocks?, addBlockedBy?, owner?, metadata? }`. `status` is `"pending"`, `"in_progress"`, or `"completed"`; set `status: "deleted"` to delete |
| Render `block.input.todos` directly | Accumulate items across calls, or read a snapshot from a `TaskList` tool result |
The assigned task ID is not in the `TaskCreate` input. It comes back in the matching `tool_result` as `{ task: { id, subject } }`, so capture it from the result block to key your map. The following example shows the minimal change to the [Monitoring Todo Changes](#monitoring-todo-changes) loop. To render a complete list, watch for a `TaskList` tool result in the stream or accumulate `TaskCreate` results and `TaskUpdate` inputs into a map:
```typescript TypeScript theme={null}
import { query } from "@anthropic-ai/claude-agent-sdk";
for await (const message of query({
prompt: "Optimize my React app performance",
options: { env: { ...process.env, CLAUDE_CODE_ENABLE_TASKS: "1" } },
})) {
if (message.type !== "assistant") continue;
for (const block of message.message.content) {
if (block.type !== "tool_use") continue;
if (block.name === "TaskCreate") {
const input = block.input as { subject: string };
console.log(`+ ${input.subject}`);
} else if (block.name === "TaskUpdate") {
const input = block.input as { taskId: string; status?: string };
if (input.status) console.log(` ${input.taskId} -> ${input.status}`);
}
}
}
```
```python Python theme={null}
from claude_agent_sdk import query, ClaudeAgentOptions, AssistantMessage, ToolUseBlock
async for message in query(
prompt="Optimize my React app performance",
options=ClaudeAgentOptions(env={"CLAUDE_CODE_ENABLE_TASKS": "1"}),
):
if not isinstance(message, AssistantMessage):
continue
for block in message.content:
if not isinstance(block, ToolUseBlock):
continue
if block.name == "TaskCreate":
print(f"+ {block.input['subject']}")
elif block.name == "TaskUpdate" and block.input.get("status"):
print(f" {block.input['taskId']} -> {block.input['status']}")
```
## Related Documentation
- [TypeScript SDK Reference](/en/agent-sdk/typescript)
agent-sdk/typescript+140-0

TypeScript環境向けに、TaskCreateおよびTaskUpdateツールの入力型定義と非推奨事項に関する記述が追加されました。

@@ -1834,6 +1834,69 @@ type TodoWriteInput = {
Creates and manages a structured task list for tracking progress.
`TodoWrite` is deprecated and will be removed in a future release. Use `TaskCreate`, `TaskGet`, `TaskUpdate`, and `TaskList` instead. Set `CLAUDE_CODE_ENABLE_TASKS=1` to opt in. See [Migrate to Task tools](/en/agent-sdk/todo-tracking#migrate-to-task-tools) for how monitoring code changes.
### TaskCreate
**Tool name:** `TaskCreate`
```typescript
// Not yet exported from the SDK; define locally.
type TaskCreateInput = {
subject: string;
description: string;
activeForm?: string;
metadata?: Record<string, unknown>;
};
```
Creates a single task and returns its assigned ID.
### TaskUpdate
**Tool name:** `TaskUpdate`
```typescript
// Not yet exported from the SDK; define locally.
type TaskUpdateInput = {
taskId: string;
status?: "pending" | "in_progress" | "completed" | "deleted";
subject?: string;
description?: string;
activeForm?: string;
addBlocks?: string[];
addBlockedBy?: string[];
owner?: string;
metadata?: Record<string, unknown>;
};
```
Patches one task by ID. Set `status` to `"deleted"` to remove it.
### TaskGet
**Tool name:** `TaskGet`
```typescript
// Not yet exported from the SDK; define locally.
type TaskGetInput = {
taskId: string;
};
```
Returns full details for one task, or `null` when the ID is not found.
### TaskList
**Tool name:** `TaskList`
```typescript
// Not yet exported from the SDK; define locally.
type TaskListInput = {};
```
Returns a snapshot of all tasks in the current list.
### ExitPlanMode
**Tool name:** `ExitPlanMode`
@@ -2266,6 +2329,83 @@ type TodoWriteOutput = {
Returns the previous and updated task lists.
`TodoWrite` is deprecated and will be removed in a future release. Use `TaskCreate`, `TaskGet`, `TaskUpdate`, and `TaskList` instead. Set `CLAUDE_CODE_ENABLE_TASKS=1` to opt in. See [Migrate to Task tools](/en/agent-sdk/todo-tracking#migrate-to-task-tools) for how monitoring code changes.
### TaskCreate
**Tool name:** `TaskCreate`
```typescript
// Not yet exported from the SDK; define locally.
type TaskCreateOutput = {
task: {
id: string;
subject: string;
};
};
```
Returns the created task with its assigned ID.
### TaskUpdate
**Tool name:** `TaskUpdate`
```typescript
// Not yet exported from the SDK; define locally.
type TaskUpdateOutput = {
success: boolean;
taskId: string;
updatedFields: string[];
error?: string;
statusChange?: {
from: string;
to: string;
};
};
```
Returns the update result, including which fields changed.
### TaskGet
**Tool name:** `TaskGet`
```typescript
// Not yet exported from the SDK; define locally.
type TaskGetOutput = {
task: {
id: string;
subject: string;
description: string;
status: "pending" | "in_progress" | "completed";
blocks: string[];
blockedBy: string[];
} | null;
};
```
Returns the full task record, or `null` when the ID is not found.
### TaskList
**Tool name:** `TaskList`
```typescript
// Not yet exported from the SDK; define locally.
type TaskListOutput = {
tasks: Array<{
id: string;
subject: string;
status: "pending" | "in_progress" | "completed";
owner?: string;
blockedBy: string[];
}>;
};
```
Returns a snapshot of all tasks in the current list.
### ExitPlanMode
**Tool name:** `ExitPlanMode`
agent-teams+2-0

チーム利用に関連するドキュメントの内容が一部更新されました。

@@ -118,6 +118,8 @@ Create a team with 4 teammates to refactor these modules in parallel.
Use Sonnet for each teammate.
```
Teammates don't inherit the lead's `/model` selection by default. To change the model used when the prompt doesn't specify one, set **Default teammate model** in `/config`. Pick **Default (leader's model)** to have teammates follow the lead's current model.
### Require plan approval for teammates
For complex or risky tasks, you can require teammates to plan before implementing. The teammate works in read-only plan mode until the lead approves their approach:
agent-view+11-2

エージェントの表示やビューに関する記述に微細な修正と追加が行われました。

@@ -56,7 +56,7 @@ Pinned
✽ clawd walk cycle Write assets/sprites/clawd-walk.png 3m
Ready for review
∙ jump physics github.com/anthropics/example/pull/2048 2h
∙ jump physics github.com/anthropics/example/pull/2048 ● 2h
Needs input
✻ power-up design needs input: double jump or wall climb? 1m
@@ -90,7 +90,16 @@ Sessions persist on disk: closing your terminal or an auto-update doesn't lose t
The one-line summary in each row is generated by your configured [Haiku-class model](/en/model-config) so the row can tell you what the session is doing, what it needs, or what it produced without opening the transcript. While a session is actively working, the summary refreshes at most once every 15 seconds, plus once when each turn ends. Each refresh is one short Haiku-class request through your normal provider, billed and handled under the same [data usage terms](/en/data-usage) as the session itself.
When a session opens a pull request, the row shows the PR link and a status indicator for its CI checks. For most tasks this row is where you pick up the result: review and merge the pull request when its checks pass.
When a session opens a pull request, a status dot appears at the right edge of the row, linked to the pull request in terminals that support hyperlinks. When the session has opened more than one pull request, the count appears before the dot and the color reflects whichever one most needs attention.
| Dot color | Pull request status |
| :- | :- |
| Yellow | Waiting on checks or review, or checks failed |
| Green | Checks passed and no review is blocking |
| Purple | Merged |
| Grey | Draft or closed |
For most tasks this row is where you pick up the result: review and merge the pull request when the dot turns green.
### Peek and reply
mcp+20-8

Model Context Protocol(MCP)に関する説明文の修正と情報の更新が行われました。

@@ -22,17 +22,29 @@ With MCP servers connected, you can ask Claude Code to:
- **Automate workflows**: "Create Gmail drafts inviting these 10 users to a feedback session about the new feature."
- **React to external events**: An MCP server can also act as a [channel](/en/channels) that pushes messages into your session, so Claude reacts to Telegram messages, Discord chats, or webhook events while you're away.
## Popular MCP servers
## Find and build MCP servers
Here are some commonly used MCP servers you can connect to Claude Code:
Browse reviewed connectors in the [Anthropic Directory](https://claude.ai/directory). Directory connectors use the same MCP infrastructure as Claude Code, so you can add any remote server listed there with `claude mcp add`.
Use third party MCP servers at your own risk - Anthropic has not verified
the correctness or security of all these servers.
Make sure you trust MCP servers you are installing.
Be especially careful when using MCP servers that could fetch untrusted
content, as these can expose you to prompt injection risk.
Verify you trust each server before connecting it. Servers that fetch external content can expose you to [prompt injection risk](/en/security#protect-against-prompt-injection).
**Need a specific integration?** [Find hundreds more MCP servers on GitHub](https://github.com/modelcontextprotocol/servers), or build your own using the [MCP SDK](https://modelcontextprotocol.io/quickstart/server).
To build your own server, see the [MCP server guide](https://modelcontextprotocol.io/docs/develop/build-server) for protocol fundamentals and the [Claude connector building docs](https://claude.com/docs/connectors/building) for authentication, testing, and Directory submission.
You can also have Claude scaffold a server for you with the official [`mcp-server-dev` plugin](https://github.com/anthropics/claude-plugins-official/tree/main/plugins/mcp-server-dev).
In a Claude Code session, run:
```
/plugin install mcp-server-dev@claude-plugins-official
```
Then run `/reload-plugins` to activate it in the current session.
```
/mcp-server-dev:build-mcp-server
```
Claude asks about your use case and scaffolds a remote HTTP or local stdio server.
## Installing MCP servers
security+1-1

セキュリティ設定に関する記述の微調整が実施されました。

@@ -84,7 +84,7 @@ with any AI tool.
Claude Code allows users to configure Model Context Protocol (MCP) servers. The list of allowed MCP servers is configured in your source code, as part of Claude Code settings engineers check into source control.
We encourage either writing your own MCP servers or using MCP servers from providers that you trust. You are able to configure Claude Code permissions for MCP servers. Anthropic does not manage or audit any MCP servers.
We encourage either writing your own MCP servers or using MCP servers from providers that you trust. You are able to configure Claude Code permissions for MCP servers. Anthropic reviews connectors against its [listing criteria](https://claude.com/docs/connectors/building/review-criteria) before adding them to the [Anthropic Directory](https://claude.ai/directory), but does not security-audit or manage any MCP server.
## IDE security
settings+1-0

設定項目に関するドキュメントに新しい記述が1行追加されました。

@@ -254,6 +254,7 @@ Versions before v2.1.119 also store `autoScrollEnabled`, `editorMode`, `showTurn
| `autoConnectIde` | Automatically connect to a running IDE when Claude Code starts from an external terminal. Default: `false`. Appears in `/config` as **Auto-connect to IDE (external terminal)** when running outside a VS Code or JetBrains terminal. The [`CLAUDE_CODE_AUTO_CONNECT_IDE`](/en/env-vars) environment variable overrides this when set | `true` |
| `autoInstallIdeExtension` | Automatically install the Claude Code IDE extension when running from a VS Code terminal. Default: `true`. Appears in `/config` as **Auto-install IDE extension** when running inside a VS Code or JetBrains terminal. You can also set the [`CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL`](/en/env-vars) environment variable | `false` |
| `externalEditorContext` | Prepend Claude's previous response as `#`-commented context when you open the external editor with `Ctrl+G`. Default: `false`. Appears in `/config` as **Show last response in external editor** | `true` |
| `teammateDefaultModel` | Default model for [agent team](/en/agent-teams) teammates when the spawn prompt doesn't specify one. Set to a model alias such as `"sonnet"`, or `null` to inherit the lead's current `/model` selection. Appears in `/config` as **Default teammate model** | `"sonnet"` |
### Worktree settings
tools-reference+1-1

ツールリファレンスの内容に軽微な修正が加えられました。

@@ -46,7 +46,7 @@ To add custom tools, connect an [MCP server](/en/mcp). To extend Claude with reu
| `TaskUpdate` | Updates task status, dependencies, details, or deletes tasks | No |
| `TeamCreate` | Creates an [agent team](/en/agent-teams) with multiple teammates. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set | No |
| `TeamDelete` | Disbands an agent team and cleans up teammate processes. Only available when `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1` is set | No |
| `TodoWrite` | Manages the session task checklist. Available in non-interactive mode and the [Agent SDK](/en/headless); interactive sessions use TaskCreate, TaskGet, TaskList, and TaskUpdate instead | No |
| `TodoWrite` | Manages the session task checklist. Deprecated in favor of `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate`. Interactive sessions already use the Task tools by default. When you run `claude -p` or use the [Agent SDK](/en/agent-sdk/overview), `TodoWrite` is still the default. Set `CLAUDE_CODE_ENABLE_TASKS=1` to switch those to the Task tools before `TodoWrite` is removed | No |
| `ToolSearch` | Searches for and loads deferred tools when [tool search](/en/mcp#scale-with-mcp-tool-search) is enabled | No |
| `WebFetch` | Fetches content from a specified URL. See [WebFetch tool behavior](#webfetch-tool-behavior) | Yes |
| `WebSearch` | Performs web searches. See [WebSearch tool behavior](#websearch-tool-behavior) | Yes |