Ryan Taylor
a1afa12273
Let required hooks block continuation on failure ( #62831 )
...
## Why
A required hook check can fail to run or return a usable result. Continuing
after that failure can let an action proceed without a completed check.
## What changed
Add per-handler `onFailure` for command and MCP tool hooks. The default
`continue` preserves existing behavior. On supported synchronous hooks,
`block` applies the event's blocking behavior and reports the reason while
preserving failure diagnostics. For example, a failed `PreToolUse` check
prevents the tool from running, while a failed `PostToolUse` check withholds
the result of a tool that already ran.
Expose the policy in the app-server's `configRequirements/read` response.
## Testing
Add tests for command and MCP failures under both policies, and scenario
coverage for blocked tool execution, withheld results, and completion after
a `Stop` hook recovers.
GitOrigin-RevId: 20d6ebda0094382fe052bbf34338edb994cc7bd3
2026-11-20 20:24:34 +00:00
..
2026-09-26 23:17:41 +00:00
2026-11-20 02:02:55 +00:00
2026-11-20 20:24:34 +00:00
2026-11-18 00:46:17 +00:00
2026-09-14 22:31:32 +00:00
2026-11-05 05:09:32 +00:00
2026-07-23 01:00:35 +00:00
2026-07-22 14:16:51 +00:00
2026-09-23 00:49:19 +00:00
2026-10-26 18:05:05 +00:00
2026-08-21 19:04:32 +00:00
2026-08-24 21:39:48 +00:00
2026-11-18 22:13:26 +00:00
2026-08-25 20:37:15 +00:00
2026-08-25 20:37:15 +00:00
2026-09-08 10:18:59 +00:00
2026-11-18 06:22:36 +00:00
2026-08-10 11:22:55 +00:00
2026-11-04 22:20:18 +00:00
2026-09-09 17:45:17 +00:00
2026-11-13 23:04:26 +00:00
2026-10-27 08:06:10 +00:00
2026-11-07 23:51:58 +00:00
2026-11-13 23:04:26 +00:00
2026-11-20 17:46:32 +00:00
2026-11-19 20:26:00 +00:00
2026-06-08 10:20:54 -07:00
2026-09-09 23:59:14 +00:00
2026-09-16 00:54:58 +00:00
2026-07-18 23:22:13 +00:00
2026-08-28 19:12:34 +00:00
2026-11-10 02:45:30 +00:00
2026-10-09 23:16:46 +00:00
2026-11-18 21:56:16 +00:00
2026-08-21 19:04:32 +00:00
2026-05-28 23:09:55 -07:00
2026-11-10 01:28:45 +00:00
2026-06-23 00:43:56 +00:00
2026-10-26 18:20:30 +00:00
2026-11-19 05:12:34 +00:00
2026-11-19 15:45:17 +00:00
2026-10-22 19:36:47 +00:00
2026-11-19 05:12:34 +00:00
2026-09-24 17:04:50 +00:00
2026-11-17 23:46:48 +00:00
2026-08-25 20:37:15 +00:00
2026-11-14 01:54:53 +00:00
2026-10-06 19:51:15 +00:00
2026-11-04 02:00:01 +00:00
2026-11-10 01:28:45 +00:00
2026-10-29 11:23:51 +00:00
2026-11-05 05:09:32 +00:00
2026-11-06 22:27:47 +00:00
2026-11-20 01:49:15 +00:00
2026-11-13 23:04:26 +00:00
2026-11-03 15:02:57 +00:00
2026-09-21 01:19:40 +00:00
2026-10-06 01:46:33 +00:00
2026-11-17 23:46:48 +00:00
2026-11-17 21:10:09 +00:00
2026-10-28 06:22:58 +00:00
2026-11-19 22:15:23 +00:00
2026-10-07 23:19:26 +00:00
2026-11-14 01:54:53 +00:00
2026-11-17 23:46:48 +00:00
2026-10-23 18:39:28 +00:00
2026-08-11 10:43:11 +00:00
2026-11-19 05:12:34 +00:00
2026-10-26 17:56:43 +00:00
2026-10-22 19:36:47 +00:00
2026-10-20 03:09:44 +00:00
2026-11-19 21:44:38 +00:00
2026-11-20 01:49:15 +00:00
2026-10-28 16:55:57 +00:00
2026-11-17 23:46:48 +00:00
2026-11-17 23:46:48 +00:00
2026-11-19 15:45:17 +00:00
2026-11-19 15:45:17 +00:00
2026-09-01 00:30:55 +00:00
2026-11-20 17:59:03 +00:00
2026-11-05 05:09:32 +00:00
2026-11-05 05:09:32 +00:00
2026-11-05 05:09:32 +00:00
2026-11-13 04:51:06 +00:00
2026-09-07 18:43:20 +00:00
2026-09-07 18:43:20 +00:00
2026-09-08 05:57:24 +00:00
2026-11-12 00:44:27 +00:00
2026-09-08 21:48:53 +00:00
2026-11-13 04:51:06 +00:00
2026-11-19 22:15:23 +00:00
2026-10-07 19:28:14 +00:00
2026-10-07 19:28:14 +00:00
2026-11-12 00:44:27 +00:00
2026-11-12 00:44:27 +00:00
2026-11-12 00:44:27 +00:00
2026-11-12 00:44:27 +00:00