4 pages for postmodelswitch.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…re it happens (can block) | Block switching to a specific model | | [`PostModelSwitch`](https://code.claude.com/docs/en/hooks#postmodelswitch) | No | Yes | The session's model changes, including an au…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…entStop" | "PreCompact" | "PostCompact" | "PreModelSwitch" | "PostModelSwitch" | "PermissionRequest" | "PermissionDenied" | "Setup" | "TeammateIdle" | "TaskCreated" | "TaskComplete…
Hooks reference
Claude Code CLI · in the page
hooks
…tandalone sequential event that runs before a requested model switch, PostModelSwitch as a standalone async event that runs after the session's model changes, and MessageDisplay as a display-only even…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…odel switch that you or a client requested. Can block the switch | | `PostModelSwitch` | After the session's model changes, including changes Claude Code makes on its own, such as restoring the model…