# What can a Claude Agent SDK hook check?

Far more than a tool call: session start and end, a prompt before the model sees it, compaction, subagent completion, a model switch, and a permission decision. Beyond `PreToolUse` and `PostToolUse` around a tool's own arguments and result, the SDK exposes hooks for each of these, firing at its own named point in the agent's loop instead of one generic callback.

Most of these are TypeScript-only today; the Python SDK currently ships `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `UserPromptSubmit`, `Stop`, `SubagentStart`, `SubagentStop`, `PreCompact`, `PermissionRequest`, and `Notification`. A callback can block, rewrite, or just observe: a `PreCompact` hook can archive the full transcript before it gets summarized away, and a `PermissionRequest` hook can hand back its own allow, deny, or ask decision instead of the built-in prompt, the same decision point [an OpenAI Agents SDK guardrail trips on](/answers/openai-agents-sdk-evals/what-happens-when-an-openai-agents-sdk-guardrail-trips), just gated by your own code instead of a separate check.

---

Sources:
- Claude Docs: Hooks in the Agent SDK: https://code.claude.com/docs/en/agent-sdk/hooks (fetched 2026-09-18)

Source: https://tessary.ai/answers/claude-agent-sdk-evals/what-can-a-claude-agent-sdk-hook-check
More on Claude agent sdk evals: https://tessary.ai/answers/claude-agent-sdk-evals
From Tessary, agent reliability for AI agents in production: https://tessary.ai
