Why
PostToolUse block/reason is discarded after native and MCP tools complete, hiding failed validation from the model.
Scope
Propagate post-tool block reasons, contexts and stop feedback for native, MCP and manually wrapped tool paths without claiming the already-completed tool was undone.
Approach
Turn the audit reproduction into a repository regression, fix the runtime boundary, and verify callers and adjacent hooks tests using Bun 1.3.14. Keep the user's existing working-tree edits outside this delivery.
Acceptance
Actual tool execution remains observable and each post-hook reason reaches the model-facing result; failure-hook feedback is preserved.
Runtime validation
A full-session read of a missing file reproduced a second failure boundary: Tool.wrap converts failures into Effect defects, and rejected MCP promises also become defects. The previous typed-error catch never fired PostToolUseFailure in either path. The repair handles both failure channels, propagates session interruption without invoking failure hooks, and preserves the original cause when hooks add no feedback. Native read and rejected MCP integration regressions now verify that both the original error and hook feedback reach the model; cancellation and Bash output finalization remain covered.
Why
PostToolUse block/reason is discarded after native and MCP tools complete, hiding failed validation from the model.
Scope
Propagate post-tool block reasons, contexts and stop feedback for native, MCP and manually wrapped tool paths without claiming the already-completed tool was undone.
Approach
Turn the audit reproduction into a repository regression, fix the runtime boundary, and verify callers and adjacent hooks tests using Bun 1.3.14. Keep the user's existing working-tree edits outside this delivery.
Acceptance
Actual tool execution remains observable and each post-hook reason reaches the model-facing result; failure-hook feedback is preserved.
Runtime validation
A full-session read of a missing file reproduced a second failure boundary: Tool.wrap converts failures into Effect defects, and rejected MCP promises also become defects. The previous typed-error catch never fired PostToolUseFailure in either path. The repair handles both failure channels, propagates session interruption without invoking failure hooks, and preserves the original cause when hooks add no feedback. Native read and rejected MCP integration regressions now verify that both the original error and hook feedback reach the model; cancellation and Bash output finalization remain covered.