From fa35aefa505e4ba0cc39aa6c829e20ab0682086b Mon Sep 17 00:00:00 2001 From: Noah Horton Date: Tue, 14 Apr 2026 11:47:32 -0600 Subject: [PATCH] fix: add missing hook fields and event types to settings schema Add `if`, `asyncRewake`, `once`, `shell` fields to hookCommand definitions and add missing hook events: StopFailure, PermissionDenied, TaskCreated, FileChanged, CwdChanged. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../claude_settings.schema.json | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/src/deepwork/standard_schemas/claude_settings/claude_settings.schema.json b/src/deepwork/standard_schemas/claude_settings/claude_settings.schema.json index b4c94b09..261f7279 100644 --- a/src/deepwork/standard_schemas/claude_settings/claude_settings.schema.json +++ b/src/deepwork/standard_schemas/claude_settings/claude_settings.schema.json @@ -61,6 +61,26 @@ "statusMessage": { "type": "string", "description": "Custom spinner message displayed while the hook runs" + }, + "if": { + "$ref": "#/$defs/permissionRule", + "description": "Only run this hook when the tool call matches this permission rule pattern. Only evaluated for tool events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied); silently ignored on all other events. See https://code.claude.com/docs/en/hooks" + }, + "asyncRewake": { + "type": "boolean", + "description": "Run this hook in the background and wake Claude when the process exits with code 2 (implies async: true)" + }, + "once": { + "type": "boolean", + "description": "If true, runs once per session then removed" + }, + "shell": { + "type": "string", + "enum": [ + "bash", + "powershell" + ], + "description": "Shell interpreter to use (default: bash)" } } }, @@ -95,6 +115,14 @@ "statusMessage": { "type": "string", "description": "Custom spinner message displayed while the hook runs" + }, + "if": { + "$ref": "#/$defs/permissionRule", + "description": "Only run this hook when the tool call matches this permission rule pattern. Only evaluated for tool events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied); silently ignored on all other events. See https://code.claude.com/docs/en/hooks" + }, + "once": { + "type": "boolean", + "description": "If true, runs once per session then removed" } } }, @@ -129,6 +157,14 @@ "statusMessage": { "type": "string", "description": "Custom spinner message displayed while the hook runs" + }, + "if": { + "$ref": "#/$defs/permissionRule", + "description": "Only run this hook when the tool call matches this permission rule pattern. Only evaluated for tool events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied); silently ignored on all other events. See https://code.claude.com/docs/en/hooks" + }, + "once": { + "type": "boolean", + "description": "If true, runs once per session then removed" } } }, @@ -174,6 +210,14 @@ "statusMessage": { "type": "string", "description": "Custom spinner message displayed while the hook runs" + }, + "if": { + "$ref": "#/$defs/permissionRule", + "description": "Only run this hook when the tool call matches this permission rule pattern. Only evaluated for tool events (PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, PermissionDenied); silently ignored on all other events. See https://code.claude.com/docs/en/hooks" + }, + "once": { + "type": "boolean", + "description": "If true, runs once per session then removed" } } } @@ -677,6 +721,13 @@ "$ref": "#/$defs/hookMatcher" } }, + "PermissionDenied": { + "type": "array", + "description": "Hooks that run when auto mode denies a tool call. See https://code.claude.com/docs/en/hooks", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, "Notification": { "type": "array", "description": "Hooks that trigger on notifications", @@ -698,6 +749,13 @@ "$ref": "#/$defs/hookMatcher" } }, + "StopFailure": { + "type": "array", + "description": "Hooks that run when a turn ends due to an API error. See https://code.claude.com/docs/en/hooks", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, "SubagentStart": { "type": "array", "description": "Hooks that run when a subagent is spawned", @@ -747,6 +805,13 @@ "$ref": "#/$defs/hookMatcher" } }, + "TaskCreated": { + "type": "array", + "description": "Hooks that run when a task is created via TaskCreate. See https://code.claude.com/docs/en/hooks", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, "TaskCompleted": { "type": "array", "description": "Hooks that run when a task is being marked as completed. Exit code 2 prevents completion and sends feedback. Does not support matchers. See https://code.claude.com/docs/en/hooks#taskcompleted", @@ -775,6 +840,20 @@ "$ref": "#/$defs/hookMatcher" } }, + "FileChanged": { + "type": "array", + "description": "Hooks that run when a watched file changes on disk. See https://code.claude.com/docs/en/hooks", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, + "CwdChanged": { + "type": "array", + "description": "Hooks that run when the working directory changes. See https://code.claude.com/docs/en/hooks", + "items": { + "$ref": "#/$defs/hookMatcher" + } + }, "WorktreeCreate": { "type": "array", "description": "Hooks that run when a worktree is created via --worktree or isolation: \"worktree\" in subagents. Command handlers only, no matchers. Hook must print absolute path to created worktree on stdout; non-zero exit fails creation. See https://code.claude.com/docs/en/hooks#worktreecreate",