Model and effort changes from the picker now run hooks first and can be cancelled.
What's wrong with this entry?
Changing model or effort level from the /model menu now runs hooks first, showing a "Running PreModelSwitch hooks…" spinner. A block decision cancels the switch and shows the hook's reason; ask sends you to the confirmation dialog with that reason as the prompt. Any system messages the hook returns are appended to the resulting notice.
- The same pass runs when an SDK client changes model or agent through
apply_flag_settings; anything other thanproceedblocks the switch and reports back over the control channel. - If the session's model changes while the hooks are still running, the request is rejected with "agent switch not applied: the session's model changed while PreModelSwitch hooks ran; send the request again".
- Only has an effect if a PreModelSwitch hook is configured.
Running PreModelSwitch hooks…, agent switch not applied: the session's model changed while PreModelSwitch hooks ran; send the request again
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.234
SessionEnd hooks lose the
bypass_permissions_disabledreasonBoth mention hook
-
v2.1.236
Hooks and Ctrl-C go quiet once shutdown has started
Both mention hook
-
v2.1.236
Shutdown seals transcript writes and gives SessionEnd hooks more time
Both mention hook