29 pages for posttooluse.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
migration
Claude Developer Platform · in the page
managed-agents/migration
…| | `PreToolUse` / `PostToolUse` hooks | Your client already sees every `agent.custom_tool_use` event before responding; put the logic there. For bu…
How the agent loop works
Claude Code CLI · in the page
agent-sdk/agent-loop
…fore a tool executes | Validate inputs, block dangerous commands | | `PostToolUse` | After a tool returns | Audit outputs, trigger side effects | | `UserPromptSubmit` | When a prompt is sent | Inject…
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…tool is about to be called (`PreToolUse`), a tool returned a result (`PostToolUse`), a subagent started or stopped, the agent is idle, or execution finished. See the [full list of events](#available-h…
Modifying system prompts
Claude Code CLI · in the page
agent-sdk/modifying-system-prompts
…(/docs/en/hooks#add-context-for-claude) from a `UserPromptSubmit` or `PostToolUse` [hook callback](/docs/en/agent-sdk/hooks.md#outputs), written as a factual statement such as "The workspace is now re…
Agent SDK reference - Python
Claude Code CLI · in the page
agent-sdk/python
…ent = Literal[ "PreToolUse", # Called before tool execution "PostToolUse", # Called after tool execution "PostToolUseFailure", # Called when a tool execution fails "UserPromptSubmit…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…as this message, with each line prefixed by the hook's name, such as `PostToolUse:Bash says:`. Each [event's section](/docs/en/hooks.md#hook-events) on the hooks page says how output surfaces. Render…
Claude Code changelog
Claude Code CLI · in the page
changelog
…oks that block one, refusing the call but not ending the turn * Fixed PostToolUse hooks in managed settings not applying `updatedMCPToolOutput` in some sessions * Fixed headless sessions starting a fo…
Claude apps gateway configuration
Claude Code CLI · in the page
claude-apps-gateway-config
…must exist on every client OS in the policy. hooks: PostToolUse: - matcher: "Edit|Write" hooks: - { type: command, command: /usr/local/bin/a…
Explore the .claude directory
Claude Code CLI · in the page
claude-directory
…], "deny": [ "Bash(rm -rf *)" ] }, "hooks": { "PostToolUse": [{ "matcher": "Edit|Write", "hooks": [{ "type": "command", "command": "jq -r '.tool_inpu…
Explore the context window
Claude Code CLI · in the page
context-window
…tokens: 120, color: '#B8860B', vis: 'hidden', desc: 'A PostToolUse hook in `settings.json` runs prettier after every file edit and reports back via `hookSpecificOutput.additionalContext…
Extend Claude Code
Claude Code CLI · in the page
features-overview
…red by** | [Lifecycle events](/docs/en/hooks.md#hook-events) such as `PostToolUse` or `SessionStart` | You typing `/<name>`, or Claude matching the description to your task | | **Determinism** | Fires…
Hooks reference
Claude Code CLI · in the page
hooks
…lure` * on every tool call inside the agentic loop: `PreToolUse` and `PostToolUse`, except [`EndConversation`](/docs/en/tools-reference#endconversation-tool-behavior) calls, which skip both  or [the end of a turn](/docs/en/hooks.md#stop-decision-control) | `hook_event` | | `"other"` | A ref…
Choose a permission mode
Claude Code CLI · in the page
permission-modes
…the classifier directly. > > You can annotate a call's result with a [PostToolUse hook's `classifierContext` field](/docs/en/hooks#annotate-a-result-for-the-auto-mode-classifier), which the classifier…
Add components to a plugin
Claude Code CLI · in the page
plugins/components
…ude writes or edits a file: ```json theme={null} { "hooks": { "PostToolUse": [ { "matcher": "Write|Edit", "hooks": [ { "type": "command",…
Create a Claude Code plugin
Claude Code CLI · in the page
plugins/create
…vent it matches. For example, ask Claude to edit a file to trigger a `PostToolUse` hook. Then read the [debug log](/docs/en/hooks.md#debug-hooks), which shows which hooks matched, their exit codes, an…
Plugin manifest reference
Claude Code CLI · in the page
plugins/manifest-reference
…file exists. This array loads one hooks file and declares one inline `PostToolUse` hook: ```json theme={null} { "hooks": [ "./config/extra-hooks.json", { "PostToolUse": [ {…
Measure plugin cost and usage
Claude Code CLI · in the page
plugins/measure
…-all, format-code, lint-fix Agents (1) style-reviewer Hooks (1) PostToolUse (harness-only — no model context cost) MCP servers (1) formatter-tools (tool schemas resolved at runtime; not cou…
React to events with a mod
Claude Code CLI · in the page
plugins/mods/events
…nt](/docs/en/hooks.md#hook-events), such as `Stop`, `SessionEnd`, or `PostToolUse`, is also an event named `classic.` followed by the settings hook event's name, such as `classic.Stop`. `e` is the JSO…
Mods reference
Claude Code CLI · in the page
plugins/mods/reference
…an event named `classic.<Event>`, such as `classic.Stop` or `classic.PostToolUse`. `e` is the hook's stdin JSON. ### Mods API calls Every [mods API method](#mods-api-methods) is also an event, name…
Troubleshoot plugins
Claude Code CLI · in the page
plugins/troubleshooting
…es are case-sensitive, so confirm yours matches exactly, for example `PostToolUse`. **2. Check the matcher** Confirm the hook's `matcher` matches the tool name. **3. Trigger the event on purpose**…
Catch security issues as Claude writes code
Claude Code CLI · in the page
security-guidance
…working-tree baseline that the end-of-turn review diffs against | | `PostToolUse` on `Edit`, `Write`, and `NotebookEdit` | Per-edit pattern match | | `Stop` | End-of-turn diff review, run in the back…
Customize sessions in self-hosted environments
Claude Code CLI · in the page
self-hosted-environments-configuration
…on, snapshot periodically from inside the session with a Claude Code `PostToolUse` hook instead. The runner sets: | Variable | Description | | :- | :- | | `CLAUDE_RUNNER_SESSION_ID` | Session ID in t…
Configure server-managed settings
Claude Code CLI · in the page
server-managed-settings
…it across the organization: ```json theme={null} { "hooks": { "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [ { "type": "command", "command": "/usr/local/…
All settings
Claude Code CLI · in the page
settings-reference
…them, you see their diff in the terminal after the command, and your [PostToolUse Bash hooks](/docs/en/hooks.md#bash) receive the changed-file list. A listed file isn't always one the command changed…
Create custom subagents
Claude Code CLI · in the page
sub-agents
…hat also fire inside subagents. Tool events such as `PreToolUse` and `PostToolUse` fire for the subagent's tool calls the same way they do in the main conversation, and `SubagentStart` and `SubagentSt…
Week 18 · April 27 – May 1, 2026
Claude Code CLI · in the page
whats-new/2026-w18
…r search box so you can find a skill in a long list without scrolling`PostToolUse` hooks can replace tool output for any tool via `hookSpecificOutput.updatedToolOutput`, not only MCP toolsNew [`claude…
Week 20 · May 11–15, 2026
Claude Code CLI · in the page
whats-new/2026-w20
…aceholders never need quotingNew `continueOnBlock` config option for `PostToolUse` hooks feeds the hook's rejection reason back to Claude and continues the turn instead of ending itNew `terminalSequen…