{"version":"2.1.277","anchor":"tool-dispatch-gains-a-detached-result-path-and-hook-outpu","canonical_anchor":"tool-dispatch-gains-a-detached-result-path-and-hook-outpu","heading":"Tool dispatch gains a 'detached' result path, and hook-output-mismatch errors now carry reason codes","tier":"internal","area":"Tool Validation","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277\/e\/tool-dispatch-gains-a-detached-result-path-and-hook-outpu","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.277","markdown":"### Tool dispatch gains a 'detached' result path, and hook-output-mismatch errors now carry reason codes\n\nTool results get a new 'detached' stop path, and hook output errors now carry machine-readable reason codes\n\n**What**\n\nTool 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 \u2014 `schema_invalid issues=...`, `mapper_undefined`, or `mapper_throw` \u2014 alongside the existing human-readable message.\n\n**Why**\n\nThe 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.\n\n- Area: Tool Validation\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}