claude code hooks
Record metadata
cite: Anthropic, "Hooks reference", Claude Code documentation, https://code.claude.com/docs/en/hooks (read 28 November 2026). url: https://code.claude.com/docs/en/hooks status: read anchors: on-checkpoints#1
Not cited by the article. Recorded because responsive without interruption relies on it for what a PostToolUse command hook receives and how its output can reach the model.
Read (28 November 2026, claude-code): the page was fetched (HTTP 200) and read in chunks through a fetching agent, which quoted it. Read verbatim, as reported: the list of events; that on exit 0 plain stdout reaches Claude only on UserPromptSubmit, UserPromptExpansion, SessionStart, PostModelSwitch and PreCompact, and that "Claude never sees stderr from a hook that exits 0"; that on PostToolUse exit 2 "shows stderr to Claude; the tool already ran"; that hookSpecificOutput.additionalContext is delivered as a system reminder read "on the next model request"; the 600 s default timeout of a command hook; the 10,000-character cap; that matching hooks run in parallel; the async and asyncRewake fields; the settings locations and matcher syntax. Reported as summarised rather than read word for word: the PostToolUse input example (tool_response, duration_ms) and its decision fields. Not read: the section on running hooks in the background. The documentation describes the current product, which changes; the version installed in this container was 2.1.332.