{"name":"PostModelSwitch","slug":"postmodelswitch","family":"hook","title":"Hook events","noun":"hook event","description":"After the session's model changes, including changes Claude Code makes on its own, such as restoring the model when you resume a session","description_source":"docs","described_by":{"doc":"claude-code\/hooks","title":"Hooks reference"},"presence":{"first_seen":null,"removed_in":null,"in_current_build":false,"newest_mined":"2.1.322","builds":0,"mined_builds":161,"first_cited":{"version":"2.1.251","released_at":"2026-08-28 15:34:26","spans":1}},"aliases":[],"entries":[{"version":"2.1.318","anchor":"clear-now-captures-tools-used-postmodelswitch-hooks-can-be","heading":"\/clear keeps a record of tools used, and model-switch hooks can wait to start","line":"\/clear now saves a record of the tools used and undoes it if the clear fails, and PostModelSwitch hooks can be held back","released_at":"2026-11-03 21:55:17","reason":"found in this entry's text"},{"version":"2.1.260","anchor":"premodelswitchpostmodelswitch-hook-load-failures-now-give-m","heading":"PreModelSwitch\/PostModelSwitch hook-load failures now give more actionable errors","line":"Failed model-switch hook loads now give a specific, actionable error message.","released_at":"2026-09-03 22:32:02","reason":"found in this entry's text, named in this entry"},{"version":"2.1.251","anchor":"new-premodelswitch-and-postmodelswitch-hooks","heading":"New PreModelSwitch and PostModelSwitch hooks","line":"New PreModelSwitch and PostModelSwitch hooks let you gate or annotate every model change.","released_at":"2026-08-28 15:34:26","reason":"named in this entry, found in this entry's text"}],"entries_total":3,"docs":[{"source":"claude-code","path":"hooks","title":"Hooks reference","documented":true},{"source":"claude-code","path":"agent-sdk\/hooks","title":"Intercept and control agent behavior with hooks","documented":true},{"source":"claude-code","path":"agent-sdk\/typescript","title":"Agent SDK reference - TypeScript","documented":false},{"source":"claude-code","path":"hooks-guide","title":"Automate actions with hooks","documented":false}],"docs_total":4,"gates":[],"related":[],"url":"https:\/\/changelogs.core-directive.com\/reference\/hook\/postmodelswitch","family_url":"https:\/\/changelogs.core-directive.com\/reference\/hook.json"}