PermissionDenied API

July 14, 2026 ยท View on GitHub

Available when inheriting from ClaudeHooks::PermissionDenied:

Runs when a permission request is denied. Can request that Claude Code retries the request.

Input Helpers

๐Ÿ“š Shared input helpers

MethodDescription
tool_nameThe name of the tool whose permission was denied
tool_inputThe input data for the tool
tool_use_idThe unique identifier for this tool use
reasonThe reason the permission was denied

Hook State Helpers

๐Ÿ“š Shared hook state methods

MethodDescription
retry!Request that Claude Code retry the permission request
no_retry!Explicitly decline to retry (default)

Output Helpers

๐Ÿ“š Shared output helpers

MethodDescription
output.retry?Check if a retry was requested

Hook Exit Codes

Exit code is ignored. Output is via hookSpecificOutput.retry (JSON API, exit 0 / stdout).