8 ファイル変更 +96 -23
この更新の概要
新機能としてバックグラウンドでスクリプトを実行し、出力を逐次監視できるMonitorツールの詳細が追加されました。PythonおよびTypeScript SDKにおけるMonitorツールの入力パラメータやタスク管理方法が具体的に示されています。Homebrewでのインストールにおいて、安定版のclaude-codeと最新版を追跡するclaude-code@latestの2つの選択肢が導入されました。各OS向けのセットアップ手順やトラブルシューティング情報も、新しいインストールオプションに合わせて更新されています。
@@ -119,6 +119,7 @@ Your agent can read files, run commands, and search codebases out of the box. Ke
| **Write** | Create new files |
| **Edit** | Make precise edits to existing files |
| **Bash** | Run terminal commands, scripts, git operations |
| **Monitor** | Watch a background script and react to each output line as an event |
| **Glob** | Find files by pattern (`**/*.ts`, `src/**/*.py`) |
| **Grep** | Search file contents with regex |
| **WebSearch** | Search the web for current information |
@@ -1510,7 +1510,7 @@ class RateLimitInfo:
### `TaskStartedMessage`
Emitted when a background task starts. A background task is anything tracked outside the main turn: a backgrounded Bash command, a subagent spawned via the Agent tool, or a remote agent. The `task_type` field tells you which. This naming is unrelated to the `Task`-to-`Agent` tool rename.
Emitted when a background task starts. A background task is anything tracked outside the main turn: a backgrounded Bash command, a [Monitor](#monitor) watch, a subagent spawned via the Agent tool, or a remote agent. The `task_type` field tells you which. This naming is unrelated to the `Task`-to-`Agent` tool rename.
```python
@dataclass
@@ -1530,7 +1530,7 @@ class TaskStartedMessage(SystemMessage):
| `uuid` | `str` | Unique message identifier |
| `session_id` | `str` | Session identifier |
| `tool_use_id` | `str \| None` | Associated tool use ID |
| `task_type` | `str \| None` | Which kind of background task: `"local_bash"`, `"local_agent"`, `"remote_agent"` |
| `task_type` | `str \| None` | Which kind of background task: `"local_bash"` for background Bash and Monitor watches, `"local_agent"`, or `"remote_agent"` |
### `TaskUsage`
@@ -1571,7 +1571,7 @@ class TaskProgressMessage(SystemMessage):
### `TaskNotificationMessage`
Emitted when a task completes, fails, or is stopped.
Emitted when a background task completes, fails, or is stopped. Background tasks include `run_in_background` Bash commands, Monitor watches, and background subagents.
```python
@dataclass
@@ -2265,6 +2265,33 @@ Asks the user clarifying questions during execution. See [Handle approvals and u
}
```
### Monitor
**Tool name:** `Monitor`
Runs a background script and delivers each stdout line to Claude as an event so it can react without polling. Monitor follows the same permission rules as Bash. See the [Monitor tool reference](/en/tools-reference#monitor-tool) for behavior and provider availability.
**Input:**
```python
{
"command": str, # Shell script; each stdout line is an event, exit ends the watch
"description": str, # Short description shown in notifications
"timeout_ms": int | None, # Kill after this deadline (default 300000, max 3600000)
"persistent": bool | None, # Run for the lifetime of the session; stop with TaskStop
}
```
**Output:**
```python
{
"taskId": str, # ID of the background monitor task
"timeoutMs": int, # Timeout deadline in milliseconds (0 when persistent)
"persistent": bool | None, # True when running until TaskStop or session end
}
```
### Edit
**Tool name:** `Edit`
@@ -1304,6 +1304,7 @@ type ToolInputSchemas =
| GrepInput
| ListMcpResourcesInput
| McpInput
| MonitorInput
| NotebookEditInput
| ReadMcpResourceInput
| SubscribeMcpResourceInput
@@ -1371,6 +1372,21 @@ type BashInput = {
Executes bash commands in a persistent shell session with optional timeout and background execution.
### Monitor
**Tool name:** `Monitor`
```typescript
type MonitorInput = {
command: string;
description: string;
timeout_ms?: number;
persistent?: boolean;
};
```
Runs a background script and delivers each stdout line to Claude as an event so it can react without polling. Set `persistent: true` for session-length watches such as log tails. Monitor follows the same permission rules as Bash. See the [Monitor tool reference](/en/tools-reference#monitor-tool) for behavior and provider availability.
### TaskOutput
**Tool name:** `TaskOutput`
@@ -1625,6 +1641,7 @@ type ToolOutputSchemas =
| GlobOutput
| GrepOutput
| ListMcpResourcesOutput
| MonitorOutput
| NotebookEditOutput
| ReadMcpResourceOutput
| TaskStopOutput
@@ -1721,6 +1738,20 @@ type BashOutput = {
Returns command output with stdout/stderr split. Background commands include a `backgroundTaskId`.
### Monitor
**Tool name:** `Monitor`
```typescript
type MonitorOutput = {
taskId: string;
timeoutMs: number;
persistent?: boolean;
};
```
Returns the background task ID for the running monitor. Use this ID with `TaskStop` to cancel the watch early.
### Edit
**Tool name:** `Edit`
@@ -2395,7 +2426,7 @@ type SDKStatusMessage = {
### `SDKTaskNotificationMessage`
Notification when a background task completes, fails, or is stopped.
Notification when a background task completes, fails, or is stopped. Background tasks include `run_in_background` Bash commands, [Monitor](#monitor) watches, and background subagents.
```typescript
type SDKTaskNotificationMessage = {
@@ -2520,7 +2551,7 @@ type SDKAuthStatusMessage = {
### `SDKTaskStartedMessage`
Emitted when a background task begins.
Emitted when a background task begins. The `task_type` field is `"local_bash"` for background Bash commands and [Monitor](#monitor) watches, `"local_agent"` for subagents, or `"remote_agent"`.
```typescript
type SDKTaskStartedMessage = {
@@ -382,7 +382,7 @@ If you see "unknown command" or the `/plugin` command doesn't appear:
1. **Check your version**: Run `claude --version` to see what's installed.
2. **Update Claude Code**:
- **Homebrew**: `brew upgrade claude-code`
- **Homebrew**: `brew upgrade claude-code` (or `brew upgrade claude-code@latest` if you installed that cask)
- **npm**: `npm update -g @anthropic-ai/claude-code`
- **Native installer**: Re-run the install command from [Setup](/en/setup)
3. **Restart Claude Code**: After updating, restart your terminal and run `claude` again.
@@ -28,19 +28,19 @@ To install Claude Code, use one of the following methods:
**macOS, Linux, WSL:**
```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```bash theme={null}
curl -fsSL https://claude.ai/install.sh | bash
```
**Windows PowerShell:**
```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```powershell theme={null}
irm https://claude.ai/install.ps1 | iex
```
**Windows CMD:**
```batch theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```batch theme={null}
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
```
@@ -50,13 +50,15 @@ If you see `The token '&&' is not a valid statement separator`, you're in PowerS
Native installations automatically update in the background to keep you on the latest version.
```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```bash theme={null}
brew install --cask claude-code
```
Homebrew installations do not auto-update. Run `brew upgrade claude-code` periodically to get the latest features and security fixes.
Homebrew offers two casks. `claude-code` tracks the stable release channel, which is typically about a week behind and skips releases with major regressions. `claude-code@latest` tracks the latest channel and receives new versions as soon as they ship.
Homebrew installations do not auto-update. Run `brew upgrade claude-code` or `brew upgrade claude-code@latest`, depending on which cask you installed, to get the latest features and security fixes.
```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```powershell theme={null}
winget install Anthropic.ClaudeCode
```
@@ -407,8 +407,10 @@ To install Claude Code, use one of the following methods:
brew install --cask claude-code
```
Homebrew offers two casks. `claude-code` tracks the stable release channel, which is typically about a week behind and skips releases with major regressions. `claude-code@latest` tracks the latest channel and receives new versions as soon as they ship.
<Info>
Homebrew installations do not auto-update. Run `brew upgrade claude-code` periodically to get the latest features and security fixes.
Homebrew installations do not auto-update. Run `brew upgrade claude-code` or `brew upgrade claude-code@latest`, depending on which cask you installed, to get the latest features and security fixes.
</Info>
</Tab>
@@ -47,19 +47,19 @@ To install Claude Code, use one of the following methods:
**macOS, Linux, WSL:**
```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```bash theme={null}
curl -fsSL https://claude.ai/install.sh | bash
```
**Windows PowerShell:**
```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```powershell theme={null}
irm https://claude.ai/install.ps1 | iex
```
**Windows CMD:**
```batch theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```batch theme={null}
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
```
@@ -69,13 +69,15 @@ If you see `The token '&&' is not a valid statement separator`, you're in PowerS
Native installations automatically update in the background to keep you on the latest version.
```bash theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```bash theme={null}
brew install --cask claude-code
```
Homebrew installations do not auto-update. Run `brew upgrade claude-code` periodically to get the latest features and security fixes.
Homebrew offers two casks. `claude-code` tracks the stable release channel, which is typically about a week behind and skips releases with major regressions. `claude-code@latest` tracks the latest channel and receives new versions as soon as they ship.
Homebrew installations do not auto-update. Run `brew upgrade claude-code` or `brew upgrade claude-code@latest`, depending on which cask you installed, to get the latest features and security fixes.
```powershell theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null} theme={null}
```powershell theme={null}
winget install Anthropic.ClaudeCode
```
@@ -161,11 +163,11 @@ Native installations automatically update in the background. You can [configure
Claude Code checks for updates on startup and periodically while running. Updates download and install in the background, then take effect the next time you start Claude Code.
Homebrew and WinGet installations do not auto-update. Use `brew upgrade claude-code` or `winget upgrade Anthropic.ClaudeCode` to update manually.
Homebrew and WinGet installations do not auto-update. For Homebrew, run `brew upgrade claude-code` or `brew upgrade claude-code@latest`, depending on which cask you installed. For WinGet, run `winget upgrade Anthropic.ClaudeCode`.
**Known issue:** Claude Code may notify you of updates before the new version is available in these package managers. If an upgrade fails, wait and try again later.
Homebrew keeps old versions on disk after upgrades. Run `brew cleanup claude-code` periodically to reclaim disk space.
Homebrew keeps old versions on disk after upgrades. Run `brew cleanup` periodically to reclaim disk space.
### Configure release channel
@@ -184,6 +186,8 @@ Configure this via `/config` → **Auto-update channel**, or add it to your [set
For enterprise deployments, you can enforce a consistent release channel across your organization using [managed settings](/en/permissions#managed-settings).
Homebrew installations choose a channel by cask name instead of this setting: `claude-code` tracks stable and `claude-code@latest` tracks latest.
### Disable auto-updates
Set `DISABLE_AUTOUPDATER` to `"1"` in the `env` key of your [`settings.json`](/en/settings#available-settings) file:
@@ -371,12 +375,18 @@ Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
### Homebrew installation
Remove the Homebrew cask:
Remove the Homebrew cask you installed. If you installed the stable cask:
```bash
brew uninstall --cask claude-code
```
If you installed the latest cask:
```bash
brew uninstall --cask claude-code@latest
```
### WinGet installation
Remove the WinGet package:
@@ -166,7 +166,7 @@ Uninstall an npm global install:
npm uninstall -g @anthropic-ai/claude-code
```
Remove a Homebrew install on macOS:
Remove a Homebrew install on macOS (use `claude-code@latest` if you installed that cask):
```bash
brew uninstall --cask claude-code