3 ファイル変更 +11 -7

この更新の概要

エージェントフック機能が実験的段階であることが明示され、将来的に仕様が変更される可能性について警告が追加されました。本番環境のワークフローにはコマンドフックの使用が推奨されています。また、セットアップ手順におけるコードブロックの属性記述が整理され、冗長なメタデータが削除されました。

hooks-guide +3 -1

エージェント形式のフックが実験的機能であることを追記し、本番環境ではコマンドフックを優先して使用するよう促す注釈が追加されました。

@@ -415,7 +415,7 @@ Each hook has a `type` that determines how it runs. Most hooks use `"type": "com
- `"type": "http"`: POST event data to a URL. See [HTTP hooks](#http-hooks).
- `"type": "prompt"`: single-turn LLM evaluation. See [Prompt-based hooks](#prompt-based-hooks).
- `"type": "agent"`: multi-turn verification with tool access. See [Agent-based hooks](#agent-based-hooks).
- `"type": "agent"`: multi-turn verification with tool access. Agent hooks are experimental and may change. See [Agent-based hooks](#agent-based-hooks).
### Read input and return output
@@ -680,6 +680,8 @@ For full configuration options, see [Prompt-based hooks](/en/hooks#prompt-based-
## Agent-based hooks
Agent hooks are experimental. Behavior and configuration may change in future releases. For production workflows, prefer [command hooks](/en/hooks#command-hook-fields).
When verification requires inspecting files or running commands, use `type: "agent"` hooks. Unlike prompt hooks which make a single LLM call, agent hooks spawn a subagent that can read files, search code, and use other tools to verify conditions before returning a decision.
Agent hooks use the same `"ok"` / `"reason"` response format as prompt hooks, but with a longer default timeout of 60 seconds and up to 50 tool-use turns.
hooks +3 -1

エージェントフックの説明箇所に、動作や設定が将来のリリースで変更される可能性があるという免責事項が挿入されました。

@@ -255,7 +255,7 @@ Each object in the inner `hooks` array is a hook handler: the shell command, HTT
- **[Command hooks](#command-hook-fields)** (`type: "command"`): run a shell command. Your script receives the event's [JSON input](#hook-input-and-output) on stdin and communicates results back through exit codes and stdout.
- **[HTTP hooks](#http-hook-fields)** (`type: "http"`): send the event's JSON input as an HTTP POST request to a URL. The endpoint communicates results back through the response body using the same [JSON output format](#json-output) as command hooks.
- **[Prompt hooks](#prompt-and-agent-hook-fields)** (`type: "prompt"`): send a prompt to a Claude model for single-turn evaluation. The model returns a yes/no decision as JSON. See [Prompt-based hooks](#prompt-based-hooks).
- **[Agent hooks](#prompt-and-agent-hook-fields)** (`type: "agent"`): spawn a subagent that can use tools like Read, Grep, and Glob to verify conditions before returning a decision. See [Agent-based hooks](#agent-based-hooks).
- **[Agent hooks](#prompt-and-agent-hook-fields)** (`type: "agent"`): spawn a subagent that can use tools like Read, Grep, and Glob to verify conditions before returning a decision. Agent hooks are experimental and may change. See [Agent-based hooks](#agent-based-hooks).
#### Common fields
@@ -2131,6 +2131,8 @@ This `Stop` hook uses a detailed prompt to check three conditions before allowin
## Agent-based hooks
Agent hooks are experimental. Behavior and configuration may change in future releases. For production workflows, prefer [command hooks](#command-hook-fields).
Agent-based hooks (`type: "agent"`) are like prompt-based hooks but with multi-turn tool access. Instead of a single LLM call, an agent hook spawns a subagent that can read files, search code, and inspect the codebase to verify conditions. Agent hooks support the same events as prompt-based hooks.
### How agent hooks work
setup +5 -5

インストールコマンドなどのコードブロックにおいて、重複して記述されていた属性パラメータを削除し、記述を簡潔に修正しました。

@@ -38,19 +38,19 @@ To install Claude Code, use one of the following methods:
**macOS, Linux, WSL:**
```bash 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}
```powershell theme={null}
irm https://claude.ai/install.ps1 | iex
```
**Windows CMD:**
```batch 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
```
@@ -60,7 +60,7 @@ 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}
```bash theme={null}
brew install --cask claude-code
```
@@ -68,7 +68,7 @@ Homebrew offers two casks. `claude-code` tracks the stable release channel, whic
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}
```powershell theme={null}
winget install Anthropic.ClaudeCode
```