Tool results get a new 'detached' stop path, and hook output errors now carry machine-readable reason codes
Tool result handling now checks for a detached flag; when set, it shows a distinct message and stops early, sometimes reporting 'Execution stopped by hook' if a hook triggered it. Separately, when a PostToolUse hook's updatedToolOutput (a hook's replacement for a tool's result) fails validation or mapping, the error message now includes a machine-readable reason code — schema_invalid issues=..., mapper_undefined, or mapper_throw — alongside the existing human-readable message.
The reason codes make it easier to diagnose exactly why a hook's tool-output rewrite was rejected, rather than only seeing a generic failure message. The detached path gives tool execution a distinct, clearly-labeled way to stop when a hook halts it.