Classic Permission, Compact, and Tool Batch Types
Types with Fields
Each type below has its own table of fields.
NotificationHookInput
Combines NotificationHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Notification. | Type: 'Notification'. |
message | Documented: An official docs page names this item. | The notification text. | Type: string. |
title | Documented: An official docs page names this item. | The notification title. | Type: string. Optional. |
notification_ | Documented: An official docs page names this item. | The kind of notification, such as idle_. | Type: string. |
PermissionDeniedHookInput
Combines PermissionDeniedHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Permission. | Type: 'Permission. |
tool_ | Documented: An official docs page names this item. | The name of the tool. | Type: string. |
tool_ | Documented: An official docs page names this item. | The arguments the tool was called with. | Type: unknown. |
tool_ | Documented: An official docs page names this item. | The ID of the tool call. | Type: string. |
reason | Documented: An official docs page names this item. | Why the call was denied. | Type: string. |
mcp_ | Documented: An official docs page names this item. | The MCP server the tool comes from, for an mcp__ tool. | Type: Mcp. Optional. |
PermissionRequestDecision
The decision of a classic.PermissionRequest answer, as the hookSpecificOutput.decision of the classic hook: allow (with a rewrite or rules) or deny.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
behavior | Documented: An official docs page names this item. | Allows the request: allow. | Type: 'allow'. |
updated | Documented: An official docs page names this item. | Replaces the tool input before the tool runs. | Type: Record<string, unknown>. Optional. |
updated | Documented: An official docs page names this item. | Permission updates to apply with the decision. | Type: Permission. Optional. |
behavior | Documented: An official docs page names this item. | Denies the request: deny. | Type: 'deny'. |
message | Documented: An official docs page names this item. | Tells Claude why the request was denied. | Type: string. Optional. |
interrupt | Documented: An official docs page names this item. | true stops Claude after the denial. | Type: true. Optional. |
PermissionRequestHookInput
Combines PermissionRequestHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Permission. | Type: 'Permission. |
tool_ | Documented: An official docs page names this item. | The name of the tool. | Type: string. |
tool_ | Documented: An official docs page names this item. | The arguments the tool was called with. | Type: unknown. |
permission_ | Documented: An official docs page names this item. | The permission updates Claude Code suggests for this request, such as adding an allow rule or changing the permission mode. | Type: Permission. Optional. Not an exact list of the dialog choices (PermissionRequest input). |
mcp_ | Documented: An official docs page names this item. | The MCP server the tool comes from, for an mcp__ tool. | Type: Mcp. Optional. |
PermissionRuleValue
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
tool | Documented: An official docs page names this item. | The tool the rule is for. | Type: string. |
rule | Documented: An official docs page names this item. | The part of the rule inside the parentheses. If absent, the rule covers the whole tool. | Type: string. Optional. |
PermissionUpdate
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
type | Documented: An official docs page names this item. | The kind of update: add. | Type: 'add. |
rules | Documented: An official docs page names this item. | The rules to add. | Type: Permission. |
behavior | Documented: An official docs page names this item. | What the rules do: allow, deny, or ask. | Type: Permission. |
destination | Documented: An official docs page names this item. | Where the update is saved. | Type: Permission. |
type | Documented: An official docs page names this item. | The kind of update: replace. | Type: 'replace. |
rules | Documented: An official docs page names this item. | The rules that replace the existing ones. | Type: Permission. |
behavior | Documented: An official docs page names this item. | What the rules do: allow, deny, or ask. | Type: Permission. |
destination | Documented: An official docs page names this item. | Where the update is saved. | Type: Permission. |
type | Documented: An official docs page names this item. | The kind of update: remove. | Type: 'remove. |
rules | Documented: An official docs page names this item. | The rules to remove. | Type: Permission. |
behavior | Documented: An official docs page names this item. | What the rules do: allow, deny, or ask. | Type: Permission. |
destination | Documented: An official docs page names this item. | Where the update is saved. | Type: Permission. |
type | Documented: An official docs page names this item. | The kind of update: set. | Type: 'set. |
mode | Documented: An official docs page names this item. | The permission mode to set. | Type: Permission. |
destination | Documented: An official docs page names this item. | Where the update is saved. | Type: Permission. |
type | Documented: An official docs page names this item. | The kind of update: add. | Type: 'add. |
directories | Documented: An official docs page names this item. | The directories to add. | Type: string[]. |
destination | Documented: An official docs page names this item. | Where the update is saved. | Type: Permission. |
type | Documented: An official docs page names this item. | The kind of update: remove. | Type: 'remove. |
directories | Documented: An official docs page names this item. | The directories to remove. | Type: string[]. |
destination | Documented: An official docs page names this item. | Where the update is saved. | Type: Permission. |
PostCompactHookInput
Combines PostCompactHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Post. | Type: 'Post. |
trigger | Documented: An official docs page names this item. | What started the compaction: manual or auto. | Type: 'manual' | 'auto'. |
compact_ | Documented: An official docs page names this item. | The conversation summary produced by compaction | Type: string. |
PostModelSwitchHookInput
Combines PostModelSwitchHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Post. | Type: 'Post. |
from_ | Documented: An official docs page names this item. | Resolved model id the session was running before the switch | Type: string. |
to_ | Documented: An official docs page names this item. | Resolved model id the session runs after the switch | Type: string. |
requested_ | Documented: An official docs page names this item. | What was asked for (alias such as "opus", a full id, or null for "default") | Type: string | null. |
source | Documented: An official docs page names this item. | Why the model changed: command (/model or the /config Model row), picker, sdk (headless set_), auto (fallback or other change), or resume. | Type: 'command' | 'picker' | 'sdk' | 'auto' | 'resume'. |
context_ | Documented: An official docs page names this item. | Prompt tokens that the next request re-sends: the input, cache read, cache creation, and output tokens of the last main-thread response. 0 before the first response. | Type: number. |
prompt_ | Documented: An official docs page names this item. | Whether the prompt cache of the current model is likely still warm (a switch then forfeits it) | Type: boolean. |
cache_ | Documented: An official docs page names this item. | How long the prompt cache lasts: 5m or 1h. | Type: '5m' | '1h'. |
estimated_ | Documented: An official docs page names this item. | Estimated cost of re-caching context_tokens on to_model at its cache-write rate. It uses the managed modelPricing when set, otherwise list price. It excludes the response | Type: number. |
pricing | Documented: An official docs page names this item. | configured: priced at the managed modelPricing setting. catalog: list price. default: to_model unknown, so the default tier was assumed | Type: 'configured' | 'catalog' | 'default'. |
PostToolBatchHookInput
Hook input for PostToolBatch. Fires once after every tool call in a batch resolved, before the next model request. PostToolUse fires for each tool. Combines PostToolBatchHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Post. | Type: 'Post. |
tool_ | Documented: An official docs page names this item. | The tool calls of the batch. | Type: Post. |
PostToolBatchToolCall
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
tool_ | Documented: An official docs page names this item. | The name of the tool. | Type: string. |
tool_ | Documented: An official docs page names this item. | The arguments the tool was called with. | Type: unknown. |
tool_ | Documented: An official docs page names this item. | The ID of the tool call. | Type: string. |
tool_ | Documented: An official docs page names this item. | What the tool returned. | Type: unknown. Optional. |
PostToolUseFailureHookInput
Combines PostToolUseFailureHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Post. | Type: 'Post. |
tool_ | Documented: An official docs page names this item. | The name of the tool. | Type: string. |
tool_ | Documented: An official docs page names this item. | The arguments the tool was called with. | Type: unknown. |
tool_ | Documented: An official docs page names this item. | The ID of the tool call. | Type: string. |
error | Documented: An official docs page names this item. | The error text of the failed call. | Type: string. |
is_ | Documented: An official docs page names this item. | true when the failure was an abort, not an error the tool reported. | Type: boolean. Optional. |
duration_ | Documented: An official docs page names this item. | Tool execution time in milliseconds. Excludes permission-prompt and hook time. | Type: number. Optional. |
mcp_ | Documented: An official docs page names this item. | The MCP server the tool comes from, for an mcp__ tool. | Type: Mcp. Optional. |
PostToolUseHookInput
Combines PostToolUseHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Post. | Type: 'Post. |
tool_ | Documented: An official docs page names this item. | The name of the tool. | Type: string. |
tool_ | Documented: An official docs page names this item. | The arguments the tool was called with. | Type: unknown. |
tool_ | Documented: An official docs page names this item. | What the tool returned. | Type: unknown. |
tool_ | Documented: An official docs page names this item. | The ID of the tool call. | Type: string. |
duration_ | Documented: An official docs page names this item. | Tool execution time in milliseconds. Excludes permission-prompt and hook time. | Type: number. Optional. |
mcp_ | Documented: An official docs page names this item. | The MCP server the tool comes from, for an mcp__ tool. | Type: Mcp. Optional. |
PreCompactHookInput
Combines PreCompactHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Pre. | Type: 'Pre. |
trigger | Documented: An official docs page names this item. | What started the compaction: manual or auto. | Type: 'manual' | 'auto'. |
custom_ | Documented: An official docs page names this item. | The instructions given to /, or null when there are none. | Type: string | null. |
PreModelSwitchHookInput
Combines PreModelSwitchHookInput, BaseHookInput.
| Field | Status | What it is for | Type and limits |
|---|---|---|---|
hook_ | Documented: An official docs page names this item. | The event name: always Pre. | Type: 'Pre. |
from_ | Documented: An official docs page names this item. | Resolved model id the session was running before the switch | Type: string. |
to_ | Documented: An official docs page names this item. | Resolved model id the session runs after the switch | Type: string. |
requested_ | Documented: An official docs page names this item. | What was asked for (alias such as "opus", a full id, or null for "default") | Type: string | null. |
source | Documented: An official docs page names this item. | command: /model <name>, the /config Model row, or enabling fast mode when that promotes the model. picker: an interactive model picker. sdk: headless set_model (SDK, Remote Control, IDE) | Type: 'command' | 'picker' | 'sdk'. |
context_ | Documented: An official docs page names this item. | Prompt tokens that the next request re-sends: the input, cache read, cache creation, and output tokens of the last main-thread response. 0 before the first response. | Type: number. |
prompt_ | Documented: An official docs page names this item. | Whether the prompt cache of the current model is likely still warm (a switch then forfeits it) | Type: boolean. |
cache_ | Documented: An official docs page names this item. | How long the prompt cache lasts: 5m or 1h. | Type: '5m' | '1h'. |
estimated_ | Documented: An official docs page names this item. | Estimated cost of re-caching context_tokens on to_model at its cache-write rate. It uses the managed modelPricing when set, otherwise list price. It excludes the response | Type: number. |
pricing | Documented: An official docs page names this item. | configured: priced at the managed modelPricing setting. catalog: list price. default: to_model unknown, so the default tier was assumed | Type: 'configured' | 'catalog' | 'default'. |