Claude Code 2.1.251 Adds Model-Switch Hooks
Claude Code 2.1.251 adds PreModelSwitch and PostModelSwitch hooks, letting developers block, confirm, annotate, or react to model changes. The update also improves prompt-cache visibility and resume-cost estimates.
This is a small feature with outsized governance value: model selection becomes an observable, enforceable lifecycle event rather than a hidden UI action.
- –PreModelSwitch can enforce approved-model policies or require confirmation before costly or incompatible switches.
- –PostModelSwitch enables audit logs, telemetry, and workflow reconfiguration after a transition.
- –The hooks help teams protect prompt-cache behavior and investigate unexpected recaching or cost changes.
- –They close an observability gap because inherited model environment variables do not update during in-session switches.
- –Developers running autonomous agents now have a cleaner control plane for managing quality, cost, and safety tradeoffs.
DISCOVERED
59m ago
2026-08-28
PUBLISHED
2h ago
2026-08-28
RELEVANCE
AUTHOR
dani_avila7