SpyBara
Go Premium

Documentation 2026-08-11 22:03 UTC to 2026-08-12 19:59 UTC

3 files changed +6 −6. View all changes and history on the product overview
2026
Wed 12 19:59 Tue 11 22:03 Mon 10 22:57 Sun 9 04:02 Sat 8 04:59 Fri 7 23:57 Thu 6 15:02 Wed 5 22:02 Tue 4 22:59 Mon 3 20:02 Sun 2 19:00

hooks.md +2 −2

Details

33La tabella seguente riassume quando si attiva ogni evento. La sezione [Hook events](#hook-events) documenta lo schema di input completo e le opzioni di controllo della decisione per ognuno.33La tabella seguente riassume quando si attiva ogni evento. La sezione [Hook events](#hook-events) documenta lo schema di input completo e le opzioni di controllo della decisione per ognuno.

34 34 

35| Event | When it fires |35| Event | When it fires |

36| :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |36| :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

37| `SessionStart` | When a session begins or resumes |37| `SessionStart` | When a session begins or resumes |

38| `Setup` | When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts |38| `Setup` | When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts |

39| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |39| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |

40| `UserPromptExpansion` | When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion |40| `UserPromptExpansion` | When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion |

41| `PreToolUse` | Before a tool call executes. Can block it |41| `PreToolUse` | Before a tool call executes. Can block it |

42| `PermissionRequest` | When a tool call needs a permission decision |42| `PermissionRequest` | When a tool call needs a permission decision |

43| `PermissionDenied` | When a tool call is denied by the auto mode classifier. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call |43| `PermissionDenied` | When auto mode denies a tool call, including denials without a classifier verdict. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call. Claude Code ignores `retry` when the classifier produced no verdict |

44| `PostToolUse` | After a tool call succeeds |44| `PostToolUse` | After a tool call succeeds |

45| `PostToolUseFailure` | After a tool call fails |45| `PostToolUseFailure` | After a tool call fails |

46| `PostToolBatch` | After a full batch of parallel tool calls resolves, before the next model call |46| `PostToolBatch` | After a full batch of parallel tool calls resolves, before the next model call |

hooks-guide.md +2 −2

Details

459Gli eventi hook si attivano in punti specifici del ciclo di vita di Claude Code. Quando un evento si attiva, tutti gli hooks corrispondenti si eseguono in parallelo, e i comandi hook identici vengono automaticamente deduplicati. La tabella sottostante mostra ogni evento e quando si attiva:459Gli eventi hook si attivano in punti specifici del ciclo di vita di Claude Code. Quando un evento si attiva, tutti gli hooks corrispondenti si eseguono in parallelo, e i comandi hook identici vengono automaticamente deduplicati. La tabella sottostante mostra ogni evento e quando si attiva:

460 460 

461| Event | When it fires |461| Event | When it fires |

462| :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |462| :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

463| `SessionStart` | When a session begins or resumes |463| `SessionStart` | When a session begins or resumes |

464| `Setup` | When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts |464| `Setup` | When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts |

465| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |465| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |

466| `UserPromptExpansion` | When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion |466| `UserPromptExpansion` | When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion |

467| `PreToolUse` | Before a tool call executes. Can block it |467| `PreToolUse` | Before a tool call executes. Can block it |

468| `PermissionRequest` | When a tool call needs a permission decision |468| `PermissionRequest` | When a tool call needs a permission decision |

469| `PermissionDenied` | When a tool call is denied by the auto mode classifier. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call |469| `PermissionDenied` | When auto mode denies a tool call, including denials without a classifier verdict. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call. Claude Code ignores `retry` when the classifier produced no verdict |

470| `PostToolUse` | After a tool call succeeds |470| `PostToolUse` | After a tool call succeeds |

471| `PostToolUseFailure` | After a tool call fails |471| `PostToolUseFailure` | After a tool call fails |

472| `PostToolBatch` | After a full batch of parallel tool calls resolves, before the next model call |472| `PostToolBatch` | After a full batch of parallel tool calls resolves, before the next model call |

Details

119I plugin hooks rispondono agli stessi eventi del ciclo di vita degli [hooks definiti dall'utente](/docs/it/hooks):119I plugin hooks rispondono agli stessi eventi del ciclo di vita degli [hooks definiti dall'utente](/docs/it/hooks):

120 120 

121| Event | When it fires |121| Event | When it fires |

122| :-------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------- |122| :-------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

123| `SessionStart` | When a session begins or resumes |123| `SessionStart` | When a session begins or resumes |

124| `Setup` | When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts |124| `Setup` | When you start Claude Code with `--init-only`, or with `--init` or `--maintenance` in `-p` mode. For one-time preparation in CI or scripts |

125| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |125| `UserPromptSubmit` | When you submit a prompt, before Claude processes it |

126| `UserPromptExpansion` | When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion |126| `UserPromptExpansion` | When a user-typed command expands into a prompt, before it reaches Claude. Can block the expansion |

127| `PreToolUse` | Before a tool call executes. Can block it |127| `PreToolUse` | Before a tool call executes. Can block it |

128| `PermissionRequest` | When a tool call needs a permission decision |128| `PermissionRequest` | When a tool call needs a permission decision |

129| `PermissionDenied` | When a tool call is denied by the auto mode classifier. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call |129| `PermissionDenied` | When auto mode denies a tool call, including denials without a classifier verdict. Use JSON `hookSpecificOutput.retry: true` to tell the model it may retry the denied tool call. Claude Code ignores `retry` when the classifier produced no verdict |

130| `PostToolUse` | After a tool call succeeds |130| `PostToolUse` | After a tool call succeeds |

131| `PostToolUseFailure` | After a tool call fails |131| `PostToolUseFailure` | After a tool call fails |

132| `PostToolBatch` | After a full batch of parallel tool calls resolves, before the next model call |132| `PostToolBatch` | After a full batch of parallel tool calls resolves, before the next model call |