1 ファイル変更 +1 -1
この更新の概要
hooks設定におけるonceプロパティの適用範囲がより具体的に明記されました。このフラグはスキルのフロントマターで宣言されたフックに対してのみ有効であり、設定ファイルやエージェントのフロントマターでは無視されることが明確化されています。セッション中に一度だけ実行される挙動についての条件が詳細になったことで、設定ミスを防ぐためのガイドラインが強化されました。
@@ -267,7 +267,7 @@ These fields apply to all hook types:
| `if` | no | Permission rule syntax to filter when this hook runs, such as `"Bash(git *)"` or `"Edit(*.ts)"`. The hook only spawns if the tool call matches the pattern. Only evaluated on tool events: `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `PermissionRequest`, and `PermissionDenied`. On other events, a hook with `if` set never runs. Uses the same syntax as [permission rules](/en/permissions) |
| `timeout` | no | Seconds before canceling. Defaults: 600 for command, 30 for prompt, 60 for agent |
| `statusMessage` | no | Custom spinner message displayed while the hook runs |
| `once` | no | If `true`, runs only once per session then is removed. Skills only, not agents. See [Hooks in skills and agents](#hooks-in-skills-and-agents) |
| `once` | no | If `true`, runs once per session then is removed. Only honored for hooks declared in [skill frontmatter](#hooks-in-skills-and-agents); ignored in settings files and agent frontmatter |
#### Command hook fields