{
 "area": "hooks",
 "version": "2.1.282",
 "items": [
  {
   "id": "hook-pre-tool-use",
   "title": "PreToolUse",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON of tool call arguments.\nExit code 0 - stdout/stderr not shown\nExit code 2 - show stderr to model and block tool call\nOther exit codes - show stderr to user only but continue with tool call",
   "when": "Before tool execution (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#pretooluse",
   "details": {
    "summary": "Before tool execution",
    "matcher": {
     "fieldToMatch": "tool_name",
     "values": "computed at runtime"
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "tool_name",
      "tool_input",
      "tool_use_id"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type",
      "mcp_server"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "tool_name": {
      "type": "string"
     },
     "tool_input": {
      "type": "any JSON value"
     },
     "tool_use_id": {
      "type": "string"
     },
     "mcp_server": {
      "type": "object {name, source}",
      "optional": true,
      "description": "The MCP server serving this tool, for `mcp__*` tools: `name` is the server's config key (for `source: \"sdk\"`, exactly the name the SDK host registered in `sdkMcpServers` / `mcp_set_servers`; for any other source, the key as authored in that configuration — untrusted text, the same value `mcp_status` and system/init report, to be escaped before display), `source` is where its definition came from — `sdk` (an in-process server the SDK host runs; only the host can register one, so a configured server of the same name never reads `sdk`), `plugin` (a server a plugin ships or registers at runtime), or a config scope (`user`, `project`, `local`, `dynamic` for --mcp-config / `mcp_set_servers` process servers, `managed`, `enterprise`, `claudeai`, `agent`). Key trust on `source`, not on the name or the tool-name prefix. Absent for non-MCP tools."
     }
    },
    "hookSpecificOutput": {
     "permissionDecision": {
      "type": "\"allow\" | \"deny\" | \"ask\" | \"defer\"",
      "optional": true
     },
     "permissionDecisionReason": {
      "type": "string",
      "optional": true
     },
     "updatedInput": {
      "type": "record<string, any JSON value>",
      "optional": true
     },
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197194852,
     "length": 215,
     "sha256": "73538c8efbf530cefb41c4a9895223cf0bf238199c12669f76ce46dbb435ac3d",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178341,
     "length": 12,
     "sha256": "253fc8ec641be14f9b8c49de8642cbcb27ad2a6f0e200b82a8ae048f53a73f79",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183180706,
     "length": 106,
     "sha256": "ef253e52d43d2762f21b187f21cfd8b8a1d183a3a8757854fff7716a9b253006",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175523514,
     "length": 128,
     "sha256": "f5f22aa0862e4e9dae719dd1fdca2323299a71bcd99c7e4012023e47bd72a0bf",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-post-tool-use",
   "title": "PostToolUse",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with fields \"inputs\" (tool call arguments) and \"response\" (tool call response).\nExit code 0 - stdout shown in transcript mode (ctrl+o)\nExit code 2 - show stderr to model immediately\nOther exit codes - show stderr to user only",
   "when": "After tool execution (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#posttooluse",
   "details": {
    "summary": "After tool execution",
    "matcher": {
     "fieldToMatch": "tool_name",
     "values": "computed at runtime"
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "tool_name",
      "tool_input",
      "tool_response",
      "tool_use_id",
      "duration_ms"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type",
      "mcp_server"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "tool_name": {
      "type": "string"
     },
     "tool_input": {
      "type": "any JSON value"
     },
     "tool_response": {
      "type": "any JSON value"
     },
     "tool_use_id": {
      "type": "string"
     },
     "duration_ms": {
      "type": "number",
      "optional": true,
      "description": "Tool execution time in milliseconds. Excludes permission-prompt and hook time."
     },
     "mcp_server": {
      "type": "object {name, source}",
      "optional": true,
      "description": "The MCP server serving this tool, for `mcp__*` tools: `name` is the server's config key (for `source: \"sdk\"`, exactly the name the SDK host registered in `sdkMcpServers` / `mcp_set_servers`; for any other source, the key as authored in that configuration — untrusted text, the same value `mcp_status` and system/init report, to be escaped before display), `source` is where its definition came from — `sdk` (an in-process server the SDK host runs; only the host can register one, so a configured server of the same name never reads `sdk`), `plugin` (a server a plugin ships or registers at runtime), or a config scope (`user`, `project`, `local`, `dynamic` for --mcp-config / `mcp_set_servers` process servers, `managed`, `enterprise`, `claudeai`, `agent`). Key trust on `source`, not on the name or the tool-name prefix. Absent for non-MCP tools."
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     },
     "classifierContext": {
      "type": "string",
      "optional": true,
      "description": "Host-asserted context shown to the auto-mode permission classifier alongside this tool call's result. In the live session the classifier may weigh a user statement relayed here as user intent (it can satisfy a consent bar a user turn would satisfy, never a hard boundary); values restored from saved session state are treated as unverified context only. Relay discipline is the host's obligation: put ONLY genuine user statements in intent-bearing positions — never tool output or model text dressed as one. Capped at 2000 UTF-16 code units, a budget shared across all hooks that contribute to one call (surrogate-pair-safe; emoji and other astral characters count as two). Honored on synchronous hook responses only: an async hook's late response arrives after the result message is frozen and this field in it is silently ignored. Security note: do not copy untrusted tool output or third-party text into it blindly — content placed here reaches the permission classifier with host-application framing. Applies only to calls the classifier transcript shows: read-only lookups the transcript omits (file reads, searches), inner REPL calls, and remote-engine shells produce no per-result line, and context attached to them is silently unused. Not a delivery channel: it is bound to a single call id and sized for a short assertion, not for relaying messages or events. Rewrite integrity: if this assertion describes output you are rewriting, return it in the SAME hook result as the rewrite — it is then dropped automatically if your rewrite is rejected or superseded by a later hook's rewrite; assertions returned without a rewrite are never invalidated by other hooks' rewrites, so a non-rewriting hook should assert only what holds regardless of other hooks' rewrites — hosts that need an assertion bound to exact output bytes should make it in the hook that produces those bytes. (Do NOT return an identity rewrite just to pair an assertion: hooks run in parallel on the ORIGINAL output, so an identity rewrite competes last-write-wins with sibling rewrites and can clobber a real redaction.)"
     },
     "updatedToolOutput": {
      "type": "any JSON value",
      "optional": true,
      "description": "Replaces the tool output before it is sent to the model"
     },
     "updatedMCPToolOutput": {
      "type": "any JSON value",
      "optional": true,
      "description": "Replaces the output for MCP tools only. Prefer updatedToolOutput, which works for all tools"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197195177,
     "length": 252,
     "sha256": "4d158142fee7f10e77f82d9c05e99b6358ed1bea48fdd324373a9c941800fa39",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178354,
     "length": 13,
     "sha256": "9fc152c7d1b42d7fde295c7352b0fdc8f53e80f419499b3f63347e742939ae04",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183181381,
     "length": 137,
     "sha256": "74b951f39369010f5fd953a525dc4be8487845cfbb26e44deb6d1c5b0014d8a2",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175523805,
     "length": 266,
     "sha256": "427aebaad3d216b4d670c7a089496e5558f4bf7c453624517d9f7091cf3effe7",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-post-tool-use-failure",
   "title": "PostToolUseFailure",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with tool_name, tool_input, tool_use_id, error, error_type, is_interrupt, and is_timeout.\nExit code 0 - stdout shown in transcript mode (ctrl+o)\nExit code 2 - show stderr to model immediately\nOther exit codes - show stderr to user only",
   "when": "After tool execution fails (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#posttoolusefailure",
   "details": {
    "summary": "After tool execution fails",
    "matcher": {
     "fieldToMatch": "tool_name",
     "values": "computed at runtime"
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "tool_name",
      "tool_input",
      "tool_use_id",
      "error",
      "is_interrupt",
      "duration_ms"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type",
      "mcp_server"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "tool_name": {
      "type": "string"
     },
     "tool_input": {
      "type": "any JSON value"
     },
     "tool_use_id": {
      "type": "string"
     },
     "error": {
      "type": "string"
     },
     "is_interrupt": {
      "type": "boolean",
      "optional": true
     },
     "duration_ms": {
      "type": "number",
      "optional": true,
      "description": "Tool execution time in milliseconds. Excludes permission-prompt and hook time."
     },
     "mcp_server": {
      "type": "object {name, source}",
      "optional": true,
      "description": "The MCP server serving this tool, for `mcp__*` tools: `name` is the server's config key (for `source: \"sdk\"`, exactly the name the SDK host registered in `sdkMcpServers` / `mcp_set_servers`; for any other source, the key as authored in that configuration — untrusted text, the same value `mcp_status` and system/init report, to be escaped before display), `source` is where its definition came from — `sdk` (an in-process server the SDK host runs; only the host can register one, so a configured server of the same name never reads `sdk`), `plugin` (a server a plugin ships or registers at runtime), or a config scope (`user`, `project`, `local`, `dynamic` for --mcp-config / `mcp_set_servers` process servers, `managed`, `enterprise`, `claudeai`, `agent`). Key trust on `source`, not on the name or the tool-name prefix. Absent for non-MCP tools."
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197195552,
     "length": 262,
     "sha256": "134dcd9d6e86222e2790e6a50f6797db94af428bfd410e22f26188c0fa62fc2f",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178368,
     "length": 20,
     "sha256": "769dd262305b05bba5356197e0fa2cca05be6131018c2e777f044558425928f5",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183181854,
     "length": 151,
     "sha256": "19c80231a956cbf7d48cb7ca246959619327f5a012694b7627e609b7a53d8427",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175524072,
     "length": 292,
     "sha256": "a8d35417fcb4659d2eea9cb614b56a032138f9b79b4784e0c24e0b3f50b32664",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-post-tool-batch",
   "title": "PostToolBatch",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Fires once after every tool call in a batch has resolved, before the next model request. Input includes tool_calls (array of {tool_name, tool_input, tool_use_id, tool_response}).\nReturn additionalContext via hookSpecificOutput to inject context once for the whole batch.\nExit code 2 - stop the agentic loop (stderr shown to user only)\nOther exit codes - show stderr to user only",
   "when": "After a batch of tool calls resolves (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#posttoolbatch",
   "details": {
    "summary": "After a batch of tool calls resolves",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "tool_calls"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "tool_calls": {
      "type": "array of object {tool_name, tool_input, tool_use_id, tool_response}"
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197195942,
     "length": 380,
     "sha256": "cfcc9c8da8f4b6fd9f21c009ff13b272a543615d7785b9683776adabf8cb640a",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178389,
     "length": 15,
     "sha256": "da2f5e913fa3f8a83fca81a65e5862fcd67c986fdf524511c0e9915fc3175add",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183182278,
     "length": 72,
     "sha256": "de5bdf10cc4654e3d6a4cdb4fb4b03100894c70c5242f1f91cd7cc1a5a27e3ee",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175524456,
     "length": 349,
     "sha256": "c4c10cccf91f4054595669548f08a2c46ee34888d8c1c3664313c27d65f6f057",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-notification",
   "title": "Notification",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with notification message and type.\nExit code 0 - stdout/stderr not shown\nOther exit codes - show stderr to user only",
   "when": "When notifications are sent (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#notification",
   "details": {
    "summary": "When notifications are sent",
    "matcher": {
     "fieldToMatch": "notification_type",
     "values": [
      "permission_prompt",
      "idle_prompt",
      "auth_success",
      "elicitation_dialog",
      "agent_needs_input",
      "agent_completed",
      "elicitation_url_dialog",
      "worker_permission_prompt",
      "push_notification",
      "computer_use_enter",
      "computer_use_exit",
      "quota_auto_resume_fired",
      "quota_auto_resume_stale",
      "quota_auto_resume_disabled",
      "model_refusal_fallback",
      "elicitation_complete",
      "elicitation_response"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "message",
      "title",
      "notification_type"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "message": {
      "type": "string"
     },
     "title": {
      "type": "string",
      "optional": true
     },
     "notification_type": {
      "type": "string"
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197196818,
     "length": 144,
     "sha256": "7d7621b81e3724416d7e56a38b0355481ba993bf6a52a42413995433ebe0d2c2",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178405,
     "length": 14,
     "sha256": "b38fedbdf79b7ccc84557fa5e84ddb06ffe3b7003b70444d517259fa325ead3b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183082119,
     "length": 84,
     "sha256": "ef1fb19a460e7dc0ff2c7338b8ec78e9f4c072d6aa81d8fe7f9ad16159b9dac8",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175524952,
     "length": 112,
     "sha256": "9e5847c023220cd9a15ddaa04d0b3927a160f052ca3a03a0f205f4c9315776b1",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-user-prompt-submit",
   "title": "UserPromptSubmit",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with original user prompt text.\nExit code 0 - stdout shown to Claude\nExit code 2 - block processing, erase original prompt, and show stderr to user only\nOther exit codes - show stderr to user only",
   "when": "When the user submits a prompt (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#userpromptsubmit",
   "details": {
    "summary": "When the user submits a prompt",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "prompt",
      "session_title"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 2,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "prompt": {
      "type": "string"
     },
     "source": {
      "type": "\"user\" | \"sdk\" | \"system\" | \"loop_wakeup\" | \"schedule_wakeup\" | \"poll_event\"",
      "optional": true,
      "description": "Who authored/injected the prompt: `user` = submitted from the interactive composer, `sdk` = non-interactive entrypoint (`-p` / Agent SDK), `loop_wakeup` = dynamic /loop wakeup, `schedule_wakeup` = scheduled-task fire (CronCreate/routine), `system` = other machine-injected turns (peer/channel messages, task notifications, auto-continuation), `poll_event` = the poll-event channel enqueue-time pass (the hook fires when the host submits an event, before its delivery ack exists — a blocking verdict rejects the event). Payloads may omit it while the field rolls out."
     },
     "session_title": {
      "type": "string",
      "optional": true
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     },
     "sessionTitle": {
      "type": "string",
      "optional": true,
      "description": "Set the session title"
     },
     "suppressOriginalPrompt": {
      "type": "boolean",
      "optional": true,
      "description": "When decision is \"block\", omit the original prompt from the block message"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197197148,
     "length": 223,
     "sha256": "c6a6bb39281daa5df7d6fa1acdb17598fa33f0b0d45a798d9aadb03d576479f3",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178420,
     "length": 18,
     "sha256": "eb741316be7958143bbcf80f56a417ef48bf656f58cbd2b12012292c5d751bbf",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183092052,
     "length": 90,
     "sha256": "b699854b5213ad7690243785453cf12eeb60b873e2d0d32239ba531e06883967",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183092406,
     "length": 106,
     "sha256": "635494ae405ee47dfe744c88afa8941fc489b55324663dcbea903ec12dc5cf87",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175525065,
     "length": 775,
     "sha256": "a51c2eb32d8251ea460154bf1178bb628f83fa8b723bd3829a3f8ff3993e360b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-user-prompt-expansion",
   "title": "UserPromptExpansion",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with expansion_type, command_name, command_args, command_source, and original prompt.\nExit code 0 - stdout shown to Claude\nExit code 2 - block expansion and show stderr to user only\nOther exit codes - show stderr to user only",
   "when": "When a user-typed slash command expands into a prompt (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#userpromptexpansion",
   "details": {
    "summary": "When a user-typed slash command expands into a prompt",
    "matcher": {
     "fieldToMatch": "command_name",
     "values": []
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "expansion_type",
      "command_name",
      "command_args",
      "command_source",
      "prompt"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "expansion_type": {
      "type": "\"slash_command\" | \"mcp_prompt\""
     },
     "command_name": {
      "type": "string"
     },
     "command_args": {
      "type": "string"
     },
     "command_source": {
      "type": "string",
      "optional": true
     },
     "prompt": {
      "type": "string"
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     },
     "suppressOriginalPrompt": {
      "type": "boolean",
      "optional": true,
      "description": "When decision is \"block\", omit the original prompt from the block message"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197197470,
     "length": 252,
     "sha256": "e5532096ec4da951832e584cd56bf65ca65f3074931269feca040130195a2dc0",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178439,
     "length": 21,
     "sha256": "d5e4bf67157f66a52abb3e26d49f7f93a9e468fca161ce8e7711c07fe8ee4d4b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183087597,
     "length": 136,
     "sha256": "b0e98a6802797c003035c767a48092c110b964ff493696ea2b5296e50eae827a",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175525841,
     "length": 188,
     "sha256": "f9edad4e227fa8bbf1c303656234487250ec5b840a718b5c9fbfc075e631523f",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-session-start",
   "title": "SessionStart",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with session start source.\nExit code 0 - stdout shown to Claude\nExit code 2 - show stderr to user only\nOther exit codes - show stderr to user only",
   "when": "When a new session is started (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#sessionstart",
   "details": {
    "summary": "When a new session is started",
    "matcher": {
     "fieldToMatch": "source",
     "values": [
      "startup",
      "resume",
      "clear",
      "compact",
      "fork"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "source",
      "agent_type",
      "model",
      "session_title"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id"
     ],
     "unresolvedSpreads": 1,
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "source": {
      "type": "\"startup\" | \"resume\" | \"clear\" | \"compact\" | \"fork\""
     },
     "model": {
      "type": "string",
      "optional": true
     },
     "session_title": {
      "type": "string",
      "optional": true
     },
     "seconds_since_last_response": {
      "type": "number",
      "optional": true,
      "description": "resume/fork: seconds since the resumed transcript's last assistant response"
     },
     "context_tokens": {
      "type": "number",
      "optional": true,
      "description": "resume/fork: the resumed transcript's last response input + cache_read + cache_creation + output tokens (for a server-side tool loop, its last iteration's window, not the summed totals)"
     },
     "prompt_cache_likely_expired": {
      "type": "boolean",
      "optional": true,
      "description": "resume/fork: seconds_since_last_response exceeds the prompt-cache TTL, so the first request re-caches context_tokens"
     },
     "estimated_cache_write_usd": {
      "type": "number",
      "optional": true,
      "description": "resume/fork: estimated cost of re-caching context_tokens on the session model — the managed modelPricing when set, otherwise list price; excludes the response"
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     },
     "initialUserMessage": {
      "type": "string",
      "optional": true
     },
     "sessionTitle": {
      "type": "string",
      "optional": true,
      "description": "Set the session title"
     },
     "watchPaths": {
      "type": "array of string",
      "optional": true,
      "description": "Absolute paths to watch for FileChanged hooks"
     },
     "reloadSkills": {
      "type": "boolean",
      "optional": true,
      "description": "Re-scan skill and command directories after SessionStart hooks complete, so skills installed by the hook are available in the same session"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197197846,
     "length": 173,
     "sha256": "3bfa51016525f318ec66801490f7b564c23b5d989895ecd414449d031036dcb3",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178461,
     "length": 14,
     "sha256": "e8f766020a649cd2d2eb8c347a76eb633ba1b5ef9d15d938bd84eee0cb1acf00",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183082628,
     "length": 109,
     "sha256": "73ced40309116c4d6519f777b64baffd01ba9a1c62bc2b2b8521f163b0dae198",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175526030,
     "length": 937,
     "sha256": "cbd889062e0ddcfcdd0305815a7273b46549afd734c91bb082d8d8beadd8917b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-session-end",
   "title": "SessionEnd",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with session end reason.\nExit code 0 - command completes successfully\nOther exit codes - show stderr to user only",
   "when": "When a session is ending (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#sessionend",
   "details": {
    "summary": "When a session is ending",
    "matcher": {
     "fieldToMatch": "reason",
     "values": [
      "clear",
      "resume",
      "logout",
      "prompt_input_exit",
      "other"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "reason"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "reason": {
      "type": "\"clear\" | \"resume\" | \"logout\" | \"prompt_input_exit\" | \"other\""
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197201111,
     "length": 140,
     "sha256": "487473dddafee3c3fef5ea0ee9e53d0bff16dafc5a7f18bb8f60e9a917347c64",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178476,
     "length": 12,
     "sha256": "0e3316327adeaf2aff8575946bf590a847ba3ff29ab2fb1691fe91b481159baf",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183083923,
     "length": 53,
     "sha256": "f97edc85fcae8ab518900cf192c78882c3d697756a54e02f6673a4ec32b7147f",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175535767,
     "length": 67,
     "sha256": "219c1b4dbb1e2522eb6586543ae294a73bb2dca148562d4c0b775b5f88760d16",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-stop",
   "title": "Stop",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Exit code 0 - stdout/stderr not shown\nExit code 2 - show stderr to model and continue conversation\nOther exit codes - show stderr to user only",
   "when": "Right before Claude concludes its response (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#stop",
   "details": {
    "summary": "Right before Claude concludes its response",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "stop_hook_active",
      "last_assistant_message",
      "background_tasks",
      "session_crons"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "stop_hook_active": {
      "type": "boolean"
     },
     "last_assistant_message": {
      "type": "string",
      "optional": true,
      "description": "Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file."
     },
     "background_tasks": {
      "type": "array of object {id, type, status, description, command, agent_type, server, tool, name}",
      "optional": true,
      "description": "In-flight background work (running/pending + backgrounded) registered in this session. Lets hooks distinguish \"session is done\" from \"session is paused waiting for background work to wake it\". Empty array when nothing is in flight."
     },
     "session_crons": {
      "type": "array of object {id, schedule, recurring, prompt}",
      "optional": true,
      "description": "Session-scoped cron tasks (CronCreate, ScheduleWakeup, /loop) that will wake this session later. Empty array when none are scheduled."
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197198185,
     "length": 144,
     "sha256": "7510886ec1801c3bd686308aa042580b93cb3398c8740c763aa101813a6fa417",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178489,
     "length": 6,
     "sha256": "4a784e3e95a08715513ca46cee31eccacff2cae8533a976da4e173138d137776",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183086274,
     "length": 81,
     "sha256": "76ed4fca426280f9f57fcf904604d08e1f42cbeca0b593dbddaab39f9bf2d5c5",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175528276,
     "length": 694,
     "sha256": "ee7a12f5c482a8c6cccd7c2ca4c9a9e454bd1277142af03490d1938ae73f6846",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-stop-failure",
   "title": "StopFailure",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Fires instead of Stop when an API error (rate limit, auth failure, etc.) ended the turn. Fire-and-forget — hook output and exit codes are ignored.",
   "when": "When the turn ends due to an API error (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#stopfailure",
   "details": {
    "summary": "When the turn ends due to an API error",
    "matcher": {
     "fieldToMatch": "error",
     "values": "computed at runtime"
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "error",
      "error_details",
      "last_assistant_message"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "error": {
      "type": "\"authentication_failed\" | \"oauth_org_not_allowed\" | \"account_on_hold\" | \"verification_required\" | \"billing_error\" | \"rate_limit\" | \"overloaded\" | \"invalid_request\" | \"model_not_found\" | \"server_error\" | \"unknown\" | \"max_output_tokens\" | \"cloud_credential_error\""
     },
     "error_details": {
      "type": "string",
      "optional": true
     },
     "last_assistant_message": {
      "type": "string",
      "optional": true
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197198405,
     "length": 153,
     "sha256": "91c9a01ee0fd11a66bf004afb441bb5b6817afa85b35ee3d596915598d4bed94",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178496,
     "length": 13,
     "sha256": "15fcb9c0f161924942c29dcc2ed4a61d9df425369b7ef2ed8eab6c326e00c5f1",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183085277,
     "length": 124,
     "sha256": "6a376cd93c188f57d00de19f78766404e1eefef761321062cb62b6b2b69c674c",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175528971,
     "length": 134,
     "sha256": "edd8f1b844bd4f2caff99993de84ca17d83cbb7356bc6009bc68a06ce2c35c10",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-subagent-start",
   "title": "SubagentStart",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with agent_id and agent_type.\nExit code 0 - JSON additionalContext shown to subagent\nExit code 2 - show stderr to user only\nOther exit codes - show stderr to user only",
   "when": "When a subagent (Agent tool call) is started (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#subagentstart",
   "details": {
    "summary": "When a subagent (Agent tool call) is started",
    "matcher": {
     "fieldToMatch": "agent_type",
     "values": []
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "agent_type"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {},
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197198942,
     "length": 194,
     "sha256": "9136568b9a160f6c3e54642f786e07a4e3582c3187d11f0bf7e0a49769e11b2a",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178510,
     "length": 15,
     "sha256": "5be631abb55cf4c7e655bc5a3986bcb499001b16a27ac4dcc3c8fa8caec2bc6a",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183083533,
     "length": 79,
     "sha256": "6285001bb99faf67cb69a2ed1c3968df256ce86c872adbd6bcea6dc4d3d415fd",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175529106,
     "length": 86,
     "sha256": "63a721671f67c785874f86960d226da7176263bad4b016e417d1f62f351a945e",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-subagent-stop",
   "title": "SubagentStop",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with agent_id, agent_type, and agent_transcript_path.\nExit code 0 - stdout/stderr not shown\nExit code 2 - show stderr to subagent and continue having it run\nOther exit codes - show stderr to user only",
   "when": "Right before a subagent (Agent tool call) concludes its response (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#subagentstop",
   "details": {
    "summary": "Right before a subagent (Agent tool call) concludes its response",
    "matcher": {
     "fieldToMatch": "agent_type",
     "values": []
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "stop_hook_active",
      "agent_transcript_path",
      "agent_type",
      "last_assistant_message",
      "background_tasks",
      "session_crons"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "stop_hook_active": {
      "type": "boolean"
     },
     "agent_transcript_path": {
      "type": "string"
     },
     "last_assistant_message": {
      "type": "string",
      "optional": true,
      "description": "Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file."
     },
     "background_tasks": {
      "type": "array of object {id, type, status, description, command, agent_type, server, tool, name}",
      "optional": true,
      "description": "In-flight background work (running/pending + backgrounded) registered in this session. Lets hooks distinguish \"session is done\" from \"session is paused waiting for background work to wake it\". Empty array when nothing is in flight."
     },
     "session_crons": {
      "type": "array of object {id, schedule, recurring, prompt}",
      "optional": true,
      "description": "Session-scoped cron tasks (CronCreate, ScheduleWakeup, /loop) that will wake this session later. Empty array when none are scheduled."
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197199293,
     "length": 227,
     "sha256": "8d6b66949afb70a7ffeb8104d406ecc5c5487c970c50fa5af76908e1ca51fa41",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178526,
     "length": 14,
     "sha256": "aff4c9d99bfa48fdf8e9692971fb0f0a83027835cbd12e0fd1acfbcf5000c95e",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183086113,
     "length": 160,
     "sha256": "7bf099870f81923c085784ff26659c77cb7b9c4f69e28356013bba2de4eb7e35",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175529193,
     "length": 756,
     "sha256": "e194feba79f3f1b3403bd5cbaf3f6e2ad97d47f54155e422d36931f5e823a022",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-pre-compact",
   "title": "PreCompact",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with compaction details.\nExit code 0 - stdout appended as custom compact instructions\nExit code 2 - block compaction\nOther exit codes - show stderr to user only but continue with compaction",
   "when": "Before conversation compaction (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#precompact",
   "details": {
    "summary": "Before conversation compaction",
    "matcher": {
     "fieldToMatch": "trigger",
     "values": [
      "manual",
      "auto"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "trigger",
      "custom_instructions"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "trigger": {
      "type": "\"manual\" | \"auto\""
     },
     "custom_instructions": {
      "type": "string"
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197199641,
     "length": 216,
     "sha256": "e5ebe813cefdb4b7f5f4cdca4752aa88f87fcffb5f072399f728a5888ee0ef50",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178541,
     "length": 12,
     "sha256": "67b94e3ae4443863b4428c825977932046af4482342812d76b92ed654c20a66b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183071857,
     "length": 103,
     "sha256": "7505ae498083b149ee72c77a5e64f8e85b941c7d951ce91db047adbfb13150f0",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175529950,
     "length": 119,
     "sha256": "ceae81308c6e214c3cde6f23174196585592438a80bd285e56695b2c65b2b574",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-post-compact",
   "title": "PostCompact",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with compaction details and the summary.\nExit code 0 - stdout shown to user\nOther exit codes - show stderr to user only",
   "when": "After conversation compaction (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#postcompact",
   "details": {
    "summary": "After conversation compaction",
    "matcher": {
     "fieldToMatch": "trigger",
     "values": [
      "manual",
      "auto"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "trigger",
      "compact_summary"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "trigger": {
      "type": "\"manual\" | \"auto\""
     },
     "compact_summary": {
      "type": "string",
      "description": "The conversation summary produced by compaction"
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197199990,
     "length": 146,
     "sha256": "00b084064dc051ccaa9a316d5b78d3e2a67ff7b6e81c3779306e6fee117cc1bb",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178554,
     "length": 13,
     "sha256": "4d755a2b330f9a6f49f3801cd36880c2fc20467683a0923ad072901c6fa148df",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183073043,
     "length": 96,
     "sha256": "07a99fb2b75c14555e7e1df912f9ea1987939d1ba4461992bcf52879e70177b5",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175530070,
     "length": 165,
     "sha256": "9625546507a1d0d40a02e5a041751c0725caea0b0da9bade9de855a0d79c0de5",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-pre-model-switch",
   "title": "PreModelSwitch",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with from_model, to_model, requested_model, source, context_tokens and the estimated re-cache cost.\nExit code 0 - switch proceeds; JSON permissionDecision allow/deny/ask as for PreToolUse\nExit code 2 - block the switch and show stderr to user\nOther exit codes - show stderr to user only and continue",
   "when": "Before a requested model switch (/model, model picker, set_model) (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#premodelswitch",
   "details": {
    "summary": "Before a requested model switch (/model, model picker, set_model)",
    "matcher": {
     "fieldToMatch": "to_model",
     "values": []
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "from_model",
      "to_model",
      "requested_model",
      "source",
      "context_tokens",
      "prompt_cache_warm",
      "cache_ttl",
      "estimated_cache_write_usd",
      "pricing"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "from_model": {
      "type": "string",
      "description": "Resolved model id the session was running before the switch"
     },
     "to_model": {
      "type": "string",
      "description": "Resolved model id the session runs after the switch"
     },
     "requested_model": {
      "type": "string",
      "description": "What was asked for (alias such as \"opus\", a full id, or null for \"default\")"
     },
     "source": {
      "type": "\"command\" | \"picker\" | \"sdk\""
     },
     "context_tokens": {
      "type": "number",
      "description": "Prompt tokens the next request re-sends: the last main-thread response's input + cache_read + cache_creation + output tokens (0 before the first response; for a server-side tool loop, its last iteration's window, not the summed totals)"
     },
     "prompt_cache_warm": {
      "type": "boolean",
      "description": "Whether the current model's prompt cache is likely still warm (a switch then forfeits it)"
     },
     "cache_ttl": {
      "type": "\"5m\" | \"1h\""
     },
     "estimated_cache_write_usd": {
      "type": "number",
      "description": "Estimated cost of re-caching context_tokens on to_model at its cache-write rate — the managed modelPricing when set, otherwise list price; excludes the response"
     },
     "pricing": {
      "type": "\"configured\" | \"catalog\" | \"default\"",
      "description": "configured: priced at the managed modelPricing setting; catalog: list price; default: to_model unknown, the default tier was assumed"
     }
    },
    "hookSpecificOutput": {
     "permissionDecision": {
      "type": "\"allow\" | \"deny\" | \"ask\"",
      "optional": true
     },
     "permissionDecisionReason": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197200308,
     "length": 326,
     "sha256": "d4c9310e90c425e8a23693197a9b615280aa053b09693c96889402ce77b884dc",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178568,
     "length": 16,
     "sha256": "693283eaaf22fb13183237672087cb8a9ae6f5bf8f3d673c8948658273e2441b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183078013,
     "length": 157,
     "sha256": "e6bd95d8ecea4e9058a05a239c391605984a3c8abe561c983ca9b370e89359b2",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175531749,
     "length": 95,
     "sha256": "823114c1c5e8731b6f8de3756dd1292e5a6519aa7e5bcd22b34cd06cf11dbf55",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-post-model-switch",
   "title": "PostModelSwitch",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with from_model, to_model, requested_model, source, context_tokens and the estimated re-cache cost.\nExit code 0 - stdout shown to Claude on the next request\nOther exit codes - show stderr to user only",
   "when": "After the session model changes (any cause) (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#postmodelswitch",
   "details": {
    "summary": "After the session model changes (any cause)",
    "matcher": {
     "fieldToMatch": "to_model",
     "values": []
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "from_model",
      "to_model",
      "requested_model",
      "source",
      "context_tokens",
      "prompt_cache_warm",
      "cache_ttl",
      "estimated_cache_write_usd",
      "pricing"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "from_model": {
      "type": "string",
      "description": "Resolved model id the session was running before the switch"
     },
     "to_model": {
      "type": "string",
      "description": "Resolved model id the session runs after the switch"
     },
     "requested_model": {
      "type": "string",
      "description": "What was asked for (alias such as \"opus\", a full id, or null for \"default\")"
     },
     "source": {
      "type": "\"command\" | \"picker\" | \"sdk\" | \"auto\" | \"resume\""
     },
     "context_tokens": {
      "type": "number",
      "description": "Prompt tokens the next request re-sends: the last main-thread response's input + cache_read + cache_creation + output tokens (0 before the first response; for a server-side tool loop, its last iteration's window, not the summed totals)"
     },
     "prompt_cache_warm": {
      "type": "boolean",
      "description": "Whether the current model's prompt cache is likely still warm (a switch then forfeits it)"
     },
     "cache_ttl": {
      "type": "\"5m\" | \"1h\""
     },
     "estimated_cache_write_usd": {
      "type": "number",
      "description": "Estimated cost of re-caching context_tokens on to_model at its cache-write rate — the managed modelPricing when set, otherwise list price; excludes the response"
     },
     "pricing": {
      "type": "\"configured\" | \"catalog\" | \"default\"",
      "description": "configured: priced at the managed modelPricing setting; catalog: list price; default: to_model unknown, the default tier was assumed"
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197200771,
     "length": 227,
     "sha256": "ba63621965ca81e2589310cb0a1d454e19669c0d16e8253044022991c39943fd",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178585,
     "length": 17,
     "sha256": "3aae5bb478c1c933461ad4e50fca2e842d682712a668947c0cb5d254c4adbba2",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183079866,
     "length": 158,
     "sha256": "254b8d559cb030041c197214c0eea3f69790f5cabd1d41b951f33babb3491db3",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175531845,
     "length": 112,
     "sha256": "02ac4ebb9d3c30910db9b08621b38bf7a14a3cb592c1f49e17c822a08d032fdd",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-permission-request",
   "title": "PermissionRequest",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with tool_name, tool_input, and tool_use_id.\nOutput JSON with hookSpecificOutput containing decision to allow or deny.\nExit code 0 - use hook decision if provided\nOther exit codes - show stderr to user only",
   "when": "When a permission dialog is displayed (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#permissionrequest",
   "details": {
    "summary": "When a permission dialog is displayed",
    "matcher": {
     "fieldToMatch": "tool_name",
     "values": "computed at runtime"
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "tool_name",
      "tool_input",
      "permission_suggestions"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type",
      "mcp_server"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "tool_name": {
      "type": "string"
     },
     "tool_input": {
      "type": "any JSON value"
     },
     "permission_suggestions": {
      "type": "array of object | object | object | object | object | object",
      "optional": true
     },
     "mcp_server": {
      "type": "object {name, source}",
      "optional": true,
      "description": "The MCP server serving this tool, for `mcp__*` tools: `name` is the server's config key (for `source: \"sdk\"`, exactly the name the SDK host registered in `sdkMcpServers` / `mcp_set_servers`; for any other source, the key as authored in that configuration — untrusted text, the same value `mcp_status` and system/init report, to be escaped before display), `source` is where its definition came from — `sdk` (an in-process server the SDK host runs; only the host can register one, so a configured server of the same name never reads `sdk`), `plugin` (a server a plugin ships or registers at runtime), or a config scope (`user`, `project`, `local`, `dynamic` for --mcp-config / `mcp_set_servers` process servers, `managed`, `enterprise`, `claudeai`, `agent`). Key trust on `source`, not on the name or the tool-name prefix. Absent for non-MCP tools."
     }
    },
    "hookSpecificOutput": {
     "decision": {
      "type": "object {behavior, updatedInput, updatedPermissions} | object {behavior, message, interrupt}"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197201388,
     "length": 233,
     "sha256": "5273aa4458d6866ba6dfc0fc1647b523f0cde389a6c6f719305ce47f72c4a840",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178603,
     "length": 19,
     "sha256": "16e7da4b1c2eb49561b695b3884aa99cb11e9869549077df693743c0bf4b6ed8",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183182912,
     "length": 124,
     "sha256": "dfc0d2662de68f53d0d861aa5ac2ebce03fb58d46c3215dc2e8acc17403330ae",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175523643,
     "length": 161,
     "sha256": "a0d355c88b2ed9dbf62628a97eed621ca00d122dea43de34b4c161fa9a0d0a48",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-permission-denied",
   "title": "PermissionDenied",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with tool_name, tool_input, tool_use_id, and reason.\nReturn {\"hookSpecificOutput\":{\"hookEventName\":\"PermissionDenied\",\"retry\":true}} to tell the model it may retry.\nExit code 0 - stdout shown in transcript mode (ctrl+o)\nOther exit codes - show stderr to user only",
   "when": "After auto mode classifier denies a tool call (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#permissiondenied",
   "details": {
    "summary": "After auto mode classifier denies a tool call",
    "matcher": {
     "fieldToMatch": "tool_name",
     "values": "computed at runtime"
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "tool_name",
      "tool_input",
      "tool_use_id",
      "reason"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type",
      "mcp_server"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "tool_name": {
      "type": "string"
     },
     "tool_input": {
      "type": "any JSON value"
     },
     "tool_use_id": {
      "type": "string"
     },
     "reason": {
      "type": "string"
     },
     "mcp_server": {
      "type": "object {name, source}",
      "optional": true,
      "description": "The MCP server serving this tool, for `mcp__*` tools: `name` is the server's config key (for `source: \"sdk\"`, exactly the name the SDK host registered in `sdkMcpServers` / `mcp_set_servers`; for any other source, the key as authored in that configuration — untrusted text, the same value `mcp_status` and system/init report, to be escaped before display), `source` is where its definition came from — `sdk` (an in-process server the SDK host runs; only the host can register one, so a configured server of the same name never reads `sdk`), `plugin` (a server a plugin ships or registers at runtime), or a config scope (`user`, `project`, `local`, `dynamic` for --mcp-config / `mcp_set_servers` process servers, `managed`, `enterprise`, `claudeai`, `agent`). Key trust on `source`, not on the name or the tool-name prefix. Absent for non-MCP tools."
     }
    },
    "hookSpecificOutput": {
     "retry": {
      "type": "boolean",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197196410,
     "length": 290,
     "sha256": "621bd4957404090165ead51d9539ce62a89db2e5a19b5821f2a54366bb771585",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178623,
     "length": 18,
     "sha256": "b22a1c41c6e659b4bff0a28e2d63c9878dc826a1e54773251b69e13d8b496423",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183182583,
     "length": 121,
     "sha256": "62118320b5436e47952749567a4aa1c56b6c9f43aee61c3bb8746542a808775a",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175524806,
     "length": 145,
     "sha256": "71358398ae2dfd899b532c37dd31f6ff919f2abf7146a5cd0059421f2a3969d4",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-setup",
   "title": "Setup",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with trigger (init or maintenance).\nExit code 0 - JSON additionalContext shown to Claude\nExit code 2 - show stderr to user only\nOther exit codes - show stderr to user only",
   "when": "Repo setup hooks for init and maintenance (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#setup",
   "details": {
    "summary": "Repo setup hooks for init and maintenance",
    "matcher": {
     "fieldToMatch": "trigger",
     "values": [
      "init",
      "maintenance"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "trigger"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "trigger": {
      "type": "\"init\" | \"maintenance\""
     }
    },
    "hookSpecificOutput": {
     "additionalContext": {
      "type": "string",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197201746,
     "length": 198,
     "sha256": "c1e52a7ab95c33b0f35a90c6d0532360bf2735d0ec5ed2cac30380872fac45fd",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178642,
     "length": 7,
     "sha256": "58c1181addaa53b91d632bea9f49129710402ad6da7ca86a80e7d4a7b8a28525",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183083254,
     "length": 49,
     "sha256": "ff339c8adc07da8624c00fefd979fa37137122d8bd44a3e1f8f96aaf81f85a1f",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175526968,
     "length": 84,
     "sha256": "76dfbf925d5d76c055ddebb1689831f5a120148579e9d72c98742c0598c4e776",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-teammate-idle",
   "title": "TeammateIdle",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with teammate_name and team_name.\nExit code 0 - stdout/stderr not shown\nExit code 2 - show stderr to teammate and prevent idle (teammate continues working)\nOther exit codes - show stderr to user only",
   "when": "When a teammate is about to go idle (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#teammateidle",
   "details": {
    "summary": "When a teammate is about to go idle",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "teammate_name",
      "team_name"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "teammate_name": {
      "type": "string"
     },
     "team_name": {
      "type": "string",
      "description": "@deprecated Sessions have a single implicit team; this carries the session-derived team name and will be removed in a future release."
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197202089,
     "length": 226,
     "sha256": "50951a9246afab03c25d949e7be5df403bfc2d91cc51470160b0a79012592b87",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178650,
     "length": 14,
     "sha256": "6ffbdc77d0361eef1f41d2b7a63b900003ea7acf4fdcc28ed1e2dad16efe256b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183086702,
     "length": 84,
     "sha256": "524af1a3b43a12b7641f5d3e401ae71e3f2e0022e4dc398ee840e534e4859217",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175531958,
     "length": 235,
     "sha256": "9f15c347e991f93d2c280de060231e249da1c2353938816619db44b01a8a6086",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-task-created",
   "title": "TaskCreated",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.\nExit code 0 - stdout/stderr not shown\nExit code 2 - show stderr to model and prevent task creation\nOther exit codes - show stderr to user only",
   "when": "When a task is being created (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#taskcreated",
   "details": {
    "summary": "When a task is being created",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "task_id",
      "task_subject",
      "task_description",
      "teammate_name",
      "team_name"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "task_id": {
      "type": "string"
     },
     "task_subject": {
      "type": "string"
     },
     "task_description": {
      "type": "string",
      "optional": true
     },
     "teammate_name": {
      "type": "string",
      "optional": true
     },
     "team_name": {
      "type": "string",
      "optional": true,
      "description": "@deprecated Sessions have a single implicit team; this carries the session-derived team name and will be removed in a future release."
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197202381,
     "length": 245,
     "sha256": "15885caa72a55198a201b8e1c94549a2b3c6218c5d2b8a96e26d4b4b0171d040",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178665,
     "length": 13,
     "sha256": "95e828b84dde609784d4b6737082a93b593ec6a999cfaf16ff5a648dc5228e8d",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183086930,
     "length": 127,
     "sha256": "c61ae5f09044f439b47341f48b7b35d1e62dbee11211a6309bf72137a2a60f72",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175532194,
     "length": 317,
     "sha256": "247807e61c7dd343aabefb695826f05803a78979e9679bcb136ba88d95e6604b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-task-completed",
   "title": "TaskCompleted",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with task_id, task_subject, task_description, teammate_name, and team_name.\nExit code 0 - stdout/stderr not shown\nExit code 2 - show stderr to model and prevent task completion\nOther exit codes - show stderr to user only",
   "when": "When a task is being marked as completed (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#taskcompleted",
   "details": {
    "summary": "When a task is being marked as completed",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "task_id",
      "task_subject",
      "task_description",
      "teammate_name",
      "team_name"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "task_id": {
      "type": "string"
     },
     "task_subject": {
      "type": "string"
     },
     "task_description": {
      "type": "string",
      "optional": true
     },
     "teammate_name": {
      "type": "string",
      "optional": true
     },
     "team_name": {
      "type": "string",
      "optional": true,
      "description": "@deprecated Sessions have a single implicit team; this carries the session-derived team name and will be removed in a future release."
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197202706,
     "length": 247,
     "sha256": "c5c3839376b0997aaa7e7113f119fe6938cbc60263a2cfff2f4c26d1e29eab8c",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178679,
     "length": 15,
     "sha256": "85cbf4a0c1b90467b48c2c86d84b9f00c299b3895a636d8efad8f6787a06e650",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183087201,
     "length": 129,
     "sha256": "e47d9687309a8fa15280d3aee11c37276ce0bb05e58759dca7beebc2f1869622",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175532512,
     "length": 319,
     "sha256": "5445cdb9b9696377ba8444900e1276f74870211ec341c9d89717d63374ef8eea",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-elicitation",
   "title": "Elicitation",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with mcp_server_name, message, and requested_schema.\nOutput JSON with hookSpecificOutput containing action (accept/decline/cancel) and optional content.\nExit code 0 - use hook response if provided\nExit code 2 - deny the elicitation\nOther exit codes - show stderr to user only",
   "when": "When an MCP server requests user input (elicitation) (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#elicitation",
   "details": {
    "summary": "When an MCP server requests user input (elicitation)",
    "matcher": {
     "fieldToMatch": "mcp_server_name",
     "values": []
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "mcp_server_name",
      "message",
      "mode",
      "url",
      "elicitation_id",
      "requested_schema"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "mcp_server_name": {
      "type": "string"
     },
     "message": {
      "type": "string"
     },
     "mode": {
      "type": "\"form\" | \"url\"",
      "optional": true
     },
     "url": {
      "type": "string",
      "optional": true
     },
     "elicitation_id": {
      "type": "string",
      "optional": true
     },
     "requested_schema": {
      "type": "record<string, any JSON value>",
      "optional": true
     }
    },
    "hookSpecificOutput": {
     "action": {
      "type": "\"accept\" | \"decline\" | \"cancel\"",
      "optional": true
     },
     "content": {
      "type": "record<string, any JSON value>",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197203043,
     "length": 302,
     "sha256": "8e5c88f4bd0775748fbfe18b11539a521279252167e209a42e63c562556ad1d7",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178695,
     "length": 13,
     "sha256": "4a03ab477976a2f655237ff6caf2253689ddf56b57805aa6ae6784f76e1dc8e6",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183074503,
     "length": 124,
     "sha256": "5d39a55b822a5ea49c85915afc506c90bc21453e53dda6b2a74a4a0ac20dc472",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175532832,
     "length": 379,
     "sha256": "1a81e9ef23a103563cbd54fb2c08ee9d160712e5f6013c75d7a40dd33ddeb786",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-elicitation-result",
   "title": "ElicitationResult",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with mcp_server_name, action, content, mode, and elicitation_id.\nOutput JSON with hookSpecificOutput containing optional action and content to override the response.\nExit code 0 - use hook response if provided\nExit code 2 - block the response (action becomes decline)\nOther exit codes - show stderr to user only",
   "when": "After a user responds to an MCP elicitation (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#elicitationresult",
   "details": {
    "summary": "After a user responds to an MCP elicitation",
    "matcher": {
     "fieldToMatch": "mcp_server_name",
     "values": []
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "mcp_server_name",
      "elicitation_id",
      "mode",
      "action",
      "content"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "mcp_server_name": {
      "type": "string"
     },
     "elicitation_id": {
      "type": "string",
      "optional": true
     },
     "mode": {
      "type": "\"form\" | \"url\"",
      "optional": true
     },
     "action": {
      "type": "\"accept\" | \"decline\" | \"cancel\""
     },
     "content": {
      "type": "record<string, any JSON value>",
      "optional": true
     }
    },
    "hookSpecificOutput": {
     "action": {
      "type": "\"accept\" | \"decline\" | \"cancel\"",
      "optional": true
     },
     "content": {
      "type": "record<string, any JSON value>",
      "optional": true
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197203491,
     "length": 338,
     "sha256": "feda6eee211411adb19e3c3a1504d0f5398bb040db84b9e0a1df4452e6bde227",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178709,
     "length": 19,
     "sha256": "9f90e80838561da44bbee6fa0a51b4b3dba82688dc494ad9913895a221784773",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183075002,
     "length": 114,
     "sha256": "a1985e06bc63f1f12531aa49b539eccad0cfc9328a47f9091f88dbcad400fe95",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175533212,
     "length": 403,
     "sha256": "9332345cbce9e613df638cbabac26e00ec62c7af0a7ed882a0926ce9f3ea144d",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-config-change",
   "title": "ConfigChange",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with source (user_settings, project_settings, local_settings, policy_settings, skills) and file_path.\nExit code 0 - allow the change\nExit code 2 - block the change from being applied to the session\nOther exit codes - show stderr to user only",
   "when": "When configuration files change during a session (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#configchange",
   "details": {
    "summary": "When configuration files change during a session",
    "matcher": {
     "fieldToMatch": "source",
     "values": [
      "user_settings",
      "project_settings",
      "local_settings",
      "policy_settings",
      "skills"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "source",
      "file_path"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "source": {
      "type": "\"user_settings\" | \"project_settings\" | \"local_settings\" | \"policy_settings\" | \"skills\""
     },
     "file_path": {
      "type": "string",
      "optional": true
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197203975,
     "length": 268,
     "sha256": "2f6536a0229a9d104afb44e52d17ab030f52459f302a4d1ec3c82e257cde10e9",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178729,
     "length": 14,
     "sha256": "09825f3041547a8198f3fe5f5ee0e01b2ecd361ed17d24ef4f5d1aa631ab9593",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183073809,
     "length": 67,
     "sha256": "83b637a56e3e57acd2f24c38d93adce75cfc6a0940a10032a4d4d966a4ce695c",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175533700,
     "length": 95,
     "sha256": "b934c87617303d7c7054cb0d3eebd5c07b93aadb7ddb0b6ba4bc355151fb4b7f",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-worktree-create",
   "title": "WorktreeCreate",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with name (suggested worktree slug).\nStdout should contain the absolute path to the created worktree directory.\nExit code 0 - worktree created successfully\nOther exit codes - worktree creation failed",
   "when": "Create an isolated worktree for VCS-agnostic isolation (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#worktreecreate",
   "details": {
    "summary": "Create an isolated worktree for VCS-agnostic isolation",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "name"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "name": {
      "type": "string"
     }
    },
    "hookSpecificOutput": {
     "worktreePath": {
      "type": "string"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197205239,
     "length": 226,
     "sha256": "15bd16daadd75032c9e283629b62ca02b9e7f11523bf470eeba316f32dff5f5c",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178744,
     "length": 16,
     "sha256": "438da0f61af72972b93644aeab84aab7450f4f606ac6c02941a4cd924a1cfa31",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183092869,
     "length": 55,
     "sha256": "5475a7bc55bc72edf59e2c5a2859ca2116325b7f0e57e5c48379a77ae1cdfa3d",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175534117,
     "length": 68,
     "sha256": "20788ddbc7a332a590800d471bd1d2b51d356e9b42ddbb3aa3b1ad9a4dec0327",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-worktree-remove",
   "title": "WorktreeRemove",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with worktree_path (absolute path to worktree).\nExit code 0 - worktree removed successfully\nOther exit codes - show stderr to user only",
   "when": "Remove a previously created worktree (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#worktreeremove",
   "details": {
    "summary": "Remove a previously created worktree",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "worktree_path"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "worktree_path": {
      "type": "string"
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197205542,
     "length": 162,
     "sha256": "0d5a6e0a1b40a8519cfdc1933280b874694b7cdd5402101c6625a97c32ace021",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178761,
     "length": 16,
     "sha256": "22e8fa25e93a206bec9a4e863467bce7fea915e28cf59a0815ccf813636e825c",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183093759,
     "length": 64,
     "sha256": "4255e557e589ca53594361c83d17be1fb945fa42080c203a118c13897f663899",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175534186,
     "length": 77,
     "sha256": "ec1c98c55925d9de622ab1b23a106a31a02b5e3c83cd4df705c9c5af3d07f91b",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-instructions-loaded",
   "title": "InstructionsLoaded",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with file_path, memory_type (User, Project, Local, Managed), load_reason (session_start, nested_traversal, path_glob_match, include, compact), globs (optional — the paths: frontmatter patterns that matched), trigger_file_path (optional — the file Claude touched that caused the load), and parent_file_path (optional — the file that @-included this one).\nExit code 0 - command completes successfully\nOther exit codes - show stderr to user only\nThis hook is observability-only and does not support blocking.",
   "when": "When an instruction file (CLAUDE.md or rule) is loaded (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#instructionsloaded",
   "details": {
    "summary": "When an instruction file (CLAUDE.md or rule) is loaded",
    "matcher": {
     "fieldToMatch": "load_reason",
     "values": [
      "session_start",
      "nested_traversal",
      "path_glob_match",
      "include",
      "compact"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "file_path",
      "memory_type",
      "load_reason",
      "globs",
      "trigger_file_path",
      "parent_file_path"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "file_path": {
      "type": "string"
     },
     "memory_type": {
      "type": "\"User\" | \"Project\" | \"Local\" | \"Managed\""
     },
     "load_reason": {
      "type": "\"session_start\" | \"nested_traversal\" | \"path_glob_match\" | \"include\" | \"compact\""
     },
     "globs": {
      "type": "array of string",
      "optional": true
     },
     "trigger_file_path": {
      "type": "string",
      "optional": true
     },
     "parent_file_path": {
      "type": "string",
      "optional": true
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197204470,
     "length": 547,
     "sha256": "670752ef74b5807007b5ff524d7462b31c8024b1ef7b473e776b9f4209b60f6e",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178778,
     "length": 20,
     "sha256": "3715d0b394a68c33f517bec90eb0ebed28de8db005a02281b5e05478dfc948e2",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183076020,
     "length": 139,
     "sha256": "1b977c61ab39a066360b795b4cf3b6cfb05da528fd7e24ba25429e234a74e959",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175533914,
     "length": 202,
     "sha256": "cfbc0222f217d29bfcc48afdee489e912783636358a2a1fb0a3bb94b385acf1f",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-cwd-changed",
   "title": "CwdChanged",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with old_cwd and new_cwd.\nCLAUDE_ENV_FILE is set — write bash exports there to apply env to subsequent BashTool commands.\nHook output can include hookSpecificOutput.watchPaths (array of absolute paths) to register with the FileChanged watcher.\nExit code 0 - command completes successfully\nOther exit codes - show stderr to user only",
   "when": "After the working directory changes (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#cwdchanged",
   "details": {
    "summary": "After the working directory changes",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "old_cwd",
      "new_cwd"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "old_cwd": {
      "type": "string"
     },
     "new_cwd": {
      "type": "string"
     }
    },
    "hookSpecificOutput": {
     "watchPaths": {
      "type": "array of string",
      "optional": true,
      "description": "Absolute paths to watch for FileChanged hooks"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197205776,
     "length": 364,
     "sha256": "aa434ac8544d367715f5e906d9fcdd2b31aee6b3661a695c6c5bf934ed45e786",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178799,
     "length": 12,
     "sha256": "6dbfd38fd6e37d6af53fcb26855dd216f64241755d61ec3ff45e4d37b3314434",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183075695,
     "length": 64,
     "sha256": "0b76317f3e0ceba75d5d653704469d6b855b6ba510e9274a11c7732b826a6f9d",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175534264,
     "length": 79,
     "sha256": "890be017e2143010d75d3505990f5c5b73def3a2d1c430994802bd814e538109",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-file-changed",
   "title": "FileChanged",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with file_path and event (change, add, unlink).\nCLAUDE_ENV_FILE is set — write bash exports there to apply env to subsequent BashTool commands.\nThe matcher field specifies filenames to watch in the current directory (e.g. \".envrc|.env\").\nHook output can include hookSpecificOutput.watchPaths (array of absolute paths) to dynamically update the watch list.\nExit code 0 - command completes successfully\nOther exit codes - show stderr to user only",
   "when": "When a watched file changes (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#filechanged",
   "details": {
    "summary": "When a watched file changes",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "file_path",
      "event"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "file_path": {
      "type": "string"
     },
     "event": {
      "type": "\"change\" | \"add\" | \"unlink\""
     }
    },
    "hookSpecificOutput": {
     "watchPaths": {
      "type": "array of string",
      "optional": true,
      "description": "Absolute paths to watch for FileChanged hooks"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197206205,
     "length": 476,
     "sha256": "564f4da1d8b301314cd1cfcf637ac47954e27c47828733747db9d6ef0790c004",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178812,
     "length": 13,
     "sha256": "38aef90db7bfca2851f0121d6bd25b7049fe01ed8d926cc668e253ccffd79129",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183075809,
     "length": 65,
     "sha256": "ce3d6641a7e83c61f7a94a865a654f640095662bb2d57203864a78f17555ec02",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175534344,
     "length": 105,
     "sha256": "016a46793be12557586955ab9541e30060e9947843fbd0e42b585cb9cb94ceca",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-directory-added",
   "title": "DirectoryAdded",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Fires after /add-dir or the register_repo_root SDK control request registers a new working directory, after the sandbox configuration has been refreshed — so sandboxed tools and permission state already see the new directory (hook commands themselves run unsandboxed).\nInput to command is JSON with directory (absolute path) and source (\"slash_command\" or \"register_repo_root\").\nExit code 0 - command completes successfully\nOther exit codes - stderr is debug-logged on both paths; for /add-dir, a failure count is summarized to Claude and hook systemMessage output reaches Claude as bounded context; for register_repo_root, everything is debug-logged only",
   "when": "After a working directory is added mid-session (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#directoryadded",
   "details": {
    "summary": "After a working directory is added mid-session",
    "matcher": {
     "fieldToMatch": "source",
     "values": [
      "slash_command",
      "register_repo_root"
     ]
    },
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "directory",
      "source"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": true
    },
    "inputSchemaFields": {
     "directory": {
      "type": "string",
      "description": "Absolute path of the directory that was added."
     },
     "source": {
      "type": "\"slash_command\" | \"register_repo_root\"",
      "description": "How the directory was added: \"slash_command\" for /add-dir, \"register_repo_root\" for the SDK control_request."
     }
    },
    "hookSpecificOutput": null
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197206768,
     "length": 662,
     "sha256": "27780e0b71bd19dc43ba12e830094722632bfdf8f64f0777df8405fa061b5256",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178826,
     "length": 16,
     "sha256": "22b2700a207f1e20c453b8eeb31049fbc749dbfd88bef6a2668e7e40d3312b54",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183074115,
     "length": 69,
     "sha256": "52d4b3f559773efd07f11d9b1bdfb442ac6b57efbe9538faa08a4066eff6dfa4",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175534450,
     "length": 302,
     "sha256": "48cb49c718c39e81d1840a62447a093046a620d481d98e94619ca509a74e96eb",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-message-display",
   "title": "MessageDisplay",
   "group": "Hook events",
   "kind": "hook-event",
   "text": "Input to command is JSON with turn_id, message_id, index, final, and delta (the newly completed lines).\nOutput JSON with hookSpecificOutput containing displayContent to replace the delta on screen.\nDisplay-only: the stored message and what the model sees are untouched.\nExit code 0 - use hook response if provided\nOther exit codes - display the original delta",
   "when": "While assistant message text is displayed (summary from the hook event metadata table, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#messagedisplay",
   "details": {
    "summary": "While assistant message text is displayed",
    "matcher": null,
    "payloadFromBuilder": {
     "fields": [
      "session_id",
      "transcript_path",
      "cwd",
      "permission_mode",
      "agent_id",
      "effort",
      "turn_id",
      "message_id",
      "index",
      "final",
      "delta"
     ],
     "conditionalFields": [
      "scratchpad_dir",
      "prompt_id",
      "agent_type"
     ],
     "builderSites": 1,
     "matchQueryPassed": false
    },
    "inputSchemaFields": {
     "turn_id": {
      "type": "string",
      "description": "UUID of the current turn."
     },
     "message_id": {
      "type": "string",
      "description": "UUID of the assistant message being displayed. Stable across every flush of the same message. Not the API msg_… id."
     },
     "index": {
      "type": "number (integer)",
      "description": "Zero-based index of this delta within the message. Increments by one per flush."
     },
     "final": {
      "type": "boolean",
      "description": "True on the message's last flush. Exactly one flush per message has it."
     },
     "delta": {
      "type": "string",
      "description": "The newly completed lines since the prior flush. Always whole lines, except on the final flush which may end mid-line. The delta of the final flush is empty when the message ends on a newline; treat final as the end-of-message signal regardless."
     }
    },
    "hookSpecificOutput": {
     "displayContent": {
      "type": "string",
      "optional": true,
      "description": "Text displayed in place of the delta. Omit (or return the delta unchanged) to display the original."
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-4x48aypq.js",
     "binary_offset": 197207598,
     "length": 361,
     "sha256": "b0267654d0ce49b289daced302b7db87df1d5c6a77dbd3876314cba2f160aafc",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178843,
     "length": 16,
     "sha256": "ed96e57410d090029c0a3157e508b7b959a00e17c8c32bb234623f3d338eb7c3",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-x9fwahqm.js",
     "binary_offset": 183076288,
     "length": 130,
     "sha256": "2bee06e2e891866fe71e4b88efa2c0c41e87e61c63c181229159b6146ad8fcf8",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175534753,
     "length": 938,
     "sha256": "d57f8e8d3302f571b565e5496d9bb4d6893734ccc616d2d9a0add121f9539154",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-common-input-fields",
   "title": "Common input fields",
   "group": "Hook input and output",
   "kind": "other",
   "text": null,
   "when": "Fields every hook input carries: the typed base schema that each event's input schema extends (from code).",
   "documented": "https://code.claude.com/docs/en/hooks#common-input-fields",
   "details": {
    "fields": {
     "session_id": {
      "type": "string"
     },
     "transcript_path": {
      "type": "string"
     },
     "cwd": {
      "type": "string"
     },
     "prompt_id": {
      "type": "string",
      "optional": true,
      "description": "UUID correlating a user prompt with all subsequent events until the next prompt. Same value emitted on OpenTelemetry events as the `prompt.id` attribute, so hook output can be joined to OTel events at prompt grain. Absent until the first user input of the process lifetime."
     },
     "permission_mode": {
      "type": "string",
      "optional": true
     },
     "agent_id": {
      "type": "string",
      "optional": true,
      "description": "Subagent identifier. Present only when the hook fires from within a subagent (e.g., a tool called by an AgentTool worker). Absent for the main thread, even in --agent sessions. Use this field (not agent_type) to distinguish subagent calls from main-thread calls."
     },
     "agent_type": {
      "type": "string",
      "optional": true,
      "description": "Agent type name (e.g., \"general-purpose\", \"code-reviewer\"). Present when the hook fires from within a subagent (alongside agent_id), or on the main thread of a session started with --agent (without agent_id)."
     },
     "effort": {
      "type": "object {level}",
      "optional": true,
      "description": "Reasoning effort applied to the current turn. Same shape as StatusLineCommandInput.effort. Present for hooks that fire within a tool-use context (PreToolUse, PostToolUse, Stop, SubagentStop, etc.) on a model that supports the effort parameter; absent for session-lifecycle hooks and models without effort support."
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-2393h2ax.js",
     "binary_offset": 175521988,
     "length": 1525,
     "sha256": "366a5f4a9fb8aab3e45f951ee568c7ad4540e0d753ad998ac90705df428b028c",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-json-output",
   "title": "JSON output fields",
   "group": "Hook input and output",
   "kind": "other",
   "text": null,
   "when": "Top-level fields a hook may print as JSON on stdout; per-event fields go in `hookSpecificOutput` with a matching `hookEventName` (from code).",
   "documented": "https://code.claude.com/docs/en/hooks#json-output",
   "details": {
    "fields": {
     "continue": {
      "type": "boolean",
      "optional": true,
      "description": "Whether Claude should continue after hook (default: true)"
     },
     "suppressOutput": {
      "type": "boolean",
      "optional": true,
      "description": "Hide stdout from transcript (default: false)"
     },
     "stopReason": {
      "type": "string",
      "optional": true,
      "description": "Message shown when continue is false"
     },
     "decision": {
      "type": "\"approve\" | \"block\"",
      "optional": true
     },
     "reason": {
      "type": "string",
      "optional": true,
      "description": "Explanation for the decision"
     },
     "systemMessage": {
      "type": "string",
      "optional": true,
      "description": "Warning message shown to the user"
     },
     "terminalSequence": {
      "type": "string",
      "optional": true,
      "description": "A terminal escape sequence (e.g. OSC 9 / OSC 777 desktop-notification) for Claude Code to emit on your behalf. Only notification/title OSCs (0, 1, 2, 9, 99, 777) and BEL are permitted; anything else is dropped."
     }
    },
    "hookSpecificOutputEvents": [
     "PreToolUse",
     "UserPromptSubmit",
     "UserPromptExpansion",
     "SessionStart",
     "Setup",
     "PreModelSwitch",
     "PostModelSwitch",
     "SubagentStart",
     "PostToolUse",
     "PostToolUseFailure",
     "PostToolBatch",
     "Stop",
     "SubagentStop",
     "PermissionDenied",
     "Notification",
     "PermissionRequest",
     "Elicitation",
     "ElicitationResult",
     "CwdChanged",
     "FileChanged",
     "WorktreeCreate",
     "MessageDisplay"
    ]
   },
   "provenance": [
    {
     "file": "chunk-5ezz9t8y.js",
     "binary_offset": 179786462,
     "length": 5997,
     "sha256": "cd56ee4104f4f584d1c6dfe794c1f15d728d057d4cdef012b40c9ba591850b07",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-type-command",
   "title": "type: \"command\"",
   "group": "Hook handler types",
   "kind": "other",
   "text": "Shell command hook type",
   "when": "Hook handler entry in a matcher's `hooks` array, selected by `type` (settings schema, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#command-hook-fields",
   "details": {
    "fields": {
     "command": {
      "type": "string",
      "description": "Shell command to execute"
     },
     "args": {
      "type": "array of string",
      "optional": true,
      "description": "Argument list for exec form. When present, `command` is resolved as an executable and spawned directly with these arguments — no shell. Path placeholders like ${CLAUDE_PLUGIN_ROOT} are substituted per-element as plain strings, so paths with quotes, $, or backticks never reach a shell parser. When absent, `command` runs through a shell (bash on POSIX, PowerShell on Windows without Git Bash)."
     },
     "if": {
      "type": "string",
      "optional": true,
      "description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands."
     },
     "shell": {
      "type": "\"bash\" | \"powershell\"",
      "optional": true,
      "description": "Shell interpreter. 'bash' uses your $SHELL (bash/zsh/sh); 'powershell' uses pwsh. Defaults to bash (powershell on Windows without Git Bash)."
     },
     "timeout": {
      "type": "number (> 0)",
      "optional": true,
      "description": "Timeout in seconds for this specific command"
     },
     "statusMessage": {
      "type": "string",
      "optional": true,
      "description": "Custom status message to display in spinner while hook runs"
     },
     "once": {
      "type": "boolean",
      "optional": true,
      "description": "If true, hook runs once and is removed after execution"
     },
     "async": {
      "type": "boolean",
      "optional": true,
      "description": "If true, hook runs in background without blocking"
     },
     "asyncRewake": {
      "type": "boolean",
      "optional": true,
      "description": "If true, hook runs in background and wakes the model on exit code 2 (blocking error). Implies async."
     },
     "rewakeMessage": {
      "type": "string (>= 1)",
      "optional": true,
      "description": "@internal Custom prefix for the system-reminder shown to the model when an asyncRewake hook exits with code 2. The hook output is appended after this prefix."
     },
     "rewakeSummary": {
      "type": "string (>= 1)",
      "optional": true,
      "description": "@internal One-line summary shown to the user in the terminal when an asyncRewake hook exits with code 2. Defaults to \"Stop hook feedback\"."
     },
     "cloud": {
      "type": "\"device\" | \"skip\"",
      "optional": true,
      "description": "@internal Where this hook may run when a cloud session is driven from this machine. 'device': offer it to the cloud session and run it here even when its script sits where the cloud session can write on this machine or cannot be pinned — the author accepts that the session may have changed files this hook executes. 'skip': never offer it to cloud sessions. Omit for the default: a command hook whose script could be read and pinned and lies outside everything the cloud session can write here is offered; other command hooks are not. Applies to this entry only: the same hook written in another settings scope keeps its own setting. An unrecognised value reads as 'skip' (the file still loads; the hook stays on this machine)."
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174202621,
     "length": 25,
     "sha256": "0cc68a763b96ac1c679847284b1ade1126e3ff8558e9b5cbbc26fb0a02d2ccb0",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174208637,
     "length": 155,
     "sha256": "225667e8f069cf8ba1594e33f9e4867a2255c8d0f24953bee0a91a619b818412",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-type-prompt",
   "title": "type: \"prompt\"",
   "group": "Hook handler types",
   "kind": "other",
   "text": "LLM prompt hook type",
   "when": "Hook handler entry in a matcher's `hooks` array, selected by `type` (settings schema, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#prompt-and-agent-hook-fields",
   "details": {
    "fields": {
     "prompt": {
      "type": "string",
      "description": "Prompt to evaluate with LLM. Use $ARGUMENTS placeholder for hook input JSON."
     },
     "if": {
      "type": "string",
      "optional": true,
      "description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands."
     },
     "timeout": {
      "type": "number (> 0)",
      "optional": true,
      "description": "Timeout in seconds for this specific prompt evaluation"
     },
     "model": {
      "type": "string",
      "optional": true,
      "description": "Model to use for this prompt hook (e.g., \"claude-sonnet-5\"). If not specified, uses the default small fast model."
     },
     "continueOnBlock": {
      "type": "boolean",
      "optional": true,
      "description": "Sets the continue value for the decision:\"block\" produced when ok is false. Default false (turn ends). Whether continue:true lets the turn proceed depends on the event's decision:\"block\" semantics. On PostToolUse, the reason is fed back to Claude and the turn continues."
     },
     "statusMessage": {
      "type": "string",
      "optional": true,
      "description": "Custom status message to display in spinner while hook runs"
     },
     "once": {
      "type": "boolean",
      "optional": true,
      "description": "If true, hook runs once and is removed after execution"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174205047,
     "length": 22,
     "sha256": "e6bbff9ed5c568d06e7a6b3477fc6d218dd44e583a9fcf86707ee9893e08624a",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174208637,
     "length": 155,
     "sha256": "225667e8f069cf8ba1594e33f9e4867a2255c8d0f24953bee0a91a619b818412",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-type-agent",
   "title": "type: \"agent\"",
   "group": "Hook handler types",
   "kind": "other",
   "text": "Agentic verifier hook type",
   "when": "Hook handler entry in a matcher's `hooks` array, selected by `type` (settings schema, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#prompt-and-agent-hook-fields",
   "details": {
    "fields": {
     "prompt": {
      "type": "string",
      "description": "Prompt describing what to verify (e.g. \"Verify that unit tests ran and passed.\"). Use $ARGUMENTS placeholder for hook input JSON."
     },
     "if": {
      "type": "string",
      "optional": true,
      "description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands."
     },
     "timeout": {
      "type": "number (> 0)",
      "optional": true,
      "description": "Timeout in seconds for agent execution (default 60)"
     },
     "model": {
      "type": "string",
      "optional": true,
      "description": "Model to use for this agent hook (e.g., \"claude-sonnet-5\"). If not specified, uses Haiku."
     },
     "statusMessage": {
      "type": "string",
      "optional": true,
      "description": "Custom status message to display in spinner while hook runs"
     },
     "once": {
      "type": "boolean",
      "optional": true,
      "description": "If true, hook runs once and is removed after execution"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174207915,
     "length": 28,
     "sha256": "5c0c1dc8f8223f48bf57f1be24bf88244bcdd7b0785f2eb35d7b2439d028cf94",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174208637,
     "length": 155,
     "sha256": "225667e8f069cf8ba1594e33f9e4867a2255c8d0f24953bee0a91a619b818412",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-type-http",
   "title": "type: \"http\"",
   "group": "Hook handler types",
   "kind": "other",
   "text": "HTTP hook type",
   "when": "Hook handler entry in a matcher's `hooks` array, selected by `type` (settings schema, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#http-hook-fields",
   "details": {
    "fields": {
     "url": {
      "type": "string (URL)",
      "description": "URL to POST the hook input JSON to"
     },
     "if": {
      "type": "string",
      "optional": true,
      "description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands."
     },
     "timeout": {
      "type": "number (> 0)",
      "optional": true,
      "description": "Timeout in seconds for this specific request"
     },
     "headers": {
      "type": "record<string, string>",
      "optional": true,
      "description": "Additional headers to include in the request. Values may reference environment variables using $VAR_NAME or ${VAR_NAME} syntax (e.g., \"Authorization\": \"Bearer $MY_TOKEN\"). Only variables listed in allowedEnvVars will be interpolated."
     },
     "allowedEnvVars": {
      "type": "array of string",
      "optional": true,
      "description": "Explicit list of environment variable names that may be interpolated in header values. Only variables listed here will be resolved; all other $VAR references are left as empty strings. Required for env var interpolation to work."
     },
     "statusMessage": {
      "type": "string",
      "optional": true,
      "description": "Custom status message to display in spinner while hook runs"
     },
     "once": {
      "type": "boolean",
      "optional": true,
      "description": "If true, hook runs once and is removed after execution"
     },
     "cloud": {
      "type": "\"device\" | \"skip\"",
      "optional": true,
      "description": "@internal Where this hook may run when a cloud session is driven from this machine. 'skip': never offer it to cloud sessions; 'device' or omitted: offered (an HTTP hook has no script to pin). Applies to this entry only. An unrecognised value reads as 'skip' (the file still loads)."
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174206620,
     "length": 16,
     "sha256": "30ff3ee9d4177a7f275054c513b948a095b2d10bf51385d45c37fd5117f76ebe",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174208637,
     "length": 155,
     "sha256": "225667e8f069cf8ba1594e33f9e4867a2255c8d0f24953bee0a91a619b818412",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-type-mcp-tool",
   "title": "type: \"mcp_tool\"",
   "group": "Hook handler types",
   "kind": "other",
   "text": "MCP tool hook type",
   "when": "Hook handler entry in a matcher's `hooks` array, selected by `type` (settings schema, from code).",
   "documented": "https://code.claude.com/docs/en/hooks#mcp-tool-hook-fields",
   "details": {
    "fields": {
     "server": {
      "type": "string",
      "description": "Name of an already-configured MCP server to invoke"
     },
     "tool": {
      "type": "string",
      "description": "Name of the tool on that server to call"
     },
     "input": {
      "type": "record<string, any JSON value>",
      "optional": true,
      "description": "Arguments passed to the MCP tool. String values support ${path} interpolation from the hook input JSON (e.g. \"${tool_input.file_path}\")."
     },
     "if": {
      "type": "string",
      "optional": true,
      "description": "Permission rule syntax to filter when this hook runs (e.g., \"Bash(git *)\"). Only runs if the tool call matches the pattern. Avoids spawning hooks for non-matching commands."
     },
     "timeout": {
      "type": "number (> 0)",
      "optional": true,
      "description": "Timeout in seconds for this specific tool call"
     },
     "statusMessage": {
      "type": "string",
      "optional": true,
      "description": "Custom status message to display in spinner while hook runs"
     },
     "once": {
      "type": "boolean",
      "optional": true,
      "description": "If true, hook runs once and is removed after execution"
     }
    }
   },
   "provenance": [
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174205964,
     "length": 20,
     "sha256": "980e5a44ec717ab42c1a0726df3df60175dcda79a9b52b0afc2f54a34b10cf5d",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174208637,
     "length": 155,
     "sha256": "225667e8f069cf8ba1594e33f9e4867a2255c8d0f24953bee0a91a619b818412",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  },
  {
   "id": "hook-matcher-config",
   "title": "Matcher entry",
   "group": "Hook handler types",
   "kind": "other",
   "text": null,
   "when": "Each event in the `hooks` setting maps to an array of matcher entries (from code).",
   "documented": "https://code.claude.com/docs/en/hooks#matcher-patterns",
   "details": {
    "fields": {
     "matcher": {
      "type": "string",
      "optional": true,
      "description": "String pattern to match (e.g. tool names like \"Write\")"
     },
     "hooks": {
      "type": "array of object | object | object | object | object",
      "description": "List of hooks to execute when the matcher matches"
     }
    },
    "hooksSettingKeys": [
     "PreToolUse",
     "PostToolUse",
     "PostToolUseFailure",
     "PostToolBatch",
     "Notification",
     "UserPromptSubmit",
     "UserPromptExpansion",
     "SessionStart",
     "SessionEnd",
     "Stop",
     "StopFailure",
     "SubagentStart",
     "SubagentStop",
     "PreCompact",
     "PostCompact",
     "PreModelSwitch",
     "PostModelSwitch",
     "PermissionRequest",
     "PermissionDenied",
     "Setup",
     "TeammateIdle",
     "TaskCreated",
     "TaskCompleted",
     "Elicitation",
     "ElicitationResult",
     "ConfigChange",
     "WorktreeCreate",
     "WorktreeRemove",
     "InstructionsLoaded",
     "CwdChanged",
     "FileChanged",
     "DirectoryAdded",
     "MessageDisplay"
    ]
   },
   "provenance": [
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174208793,
     "length": 181,
     "sha256": "c00b9f9929070018c0bf7982a56da4d30a4a4f3f0f9fec220d10094a75ad781f",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    },
    {
     "file": "chunk-wqf6nvvb.js",
     "binary_offset": 174178337,
     "length": 523,
     "sha256": "946546642ec3276fab89f32f1fe907a0fdf2b7c0aa4925f47d52ff22cfeae25e",
     "version": "2.1.282",
     "platform": "darwin-arm64"
    }
   ]
  }
 ]
}
