What
The SDK (the toolkit that lets other programs control Claude Code) can send a set_permission_mode request to change the permission mode, which decides how much Claude may do without asking you. This request has changed:
- The auto-mode gate, the check on whether auto mode may be used, is now re-checked when the change is applied. Before, it was checked once, straight away, before the mode was set.
- A request can be overtaken by a later one.
- A request is queued, held to run in order, when a new check says it needs to be.
- An unexpected failure returns the error "set_permission_mode failed".
- A request with an invalid mode now gets an error that includes
code: "invalid_mode". Before, there was no code field.
Why
Programs that change the permission mode several times in quick succession get the changes applied in a predictable order. A program can also check the invalid_mode code to tell a bad mode name apart from other failures.