1
00:00:00,280 --> 00:00:04,681
Your security hook just went down at 2
a.m., and the agent ran the destructive

2
00:00:04,701 --> 00:00:05,541
command anyway.

3
00:00:07,341 --> 00:00:13,602
That's the default for MCP tool hooks, and
version 2.1.328 gives you a way to change

4
00:00:13,622 --> 00:00:13,722
it.

5
00:00:14,642 --> 00:00:18,663
This is The Claude Code Changelog, brought
to you by Jellypod AI.

6
00:00:18,923 --> 00:00:20,183
I'm Lachlan.

7
00:00:21,200 --> 00:00:21,820
And I'm James.

8
00:00:21,840 --> 00:00:28,701
So, 2.1.328 landed November 18 and 19,
2026, with 144 changes.

9
00:00:29,642 --> 00:00:30,322
We're picking one.

10
00:00:30,682 --> 00:00:34,862
You can now set "onFailure": "block" on
mcp_tool hooks.

11
00:00:35,562 --> 00:00:38,963
Before, that option existed for shell
command hooks and HTTP hooks,

12
00:00:39,443 --> 00:00:43,344
and in 2.1.317 for programmatic Agent SDK
hooks.

13
00:00:43,924 --> 00:00:47,264
We covered that one in the episode on
failing closed with Agent SDK hooks.

14
00:00:48,115 --> 00:00:51,756
Right, so this extends that same
protection natively to MCP.

15
00:00:52,836 --> 00:00:54,016
Here's the default behavior.

16
00:00:54,657 --> 00:01:00,338
If your MCP hook hits a network error,
times out, crashes, or returns something

17
00:01:00,398 --> 00:01:04,140
unparseable, Claude Code treats it as a
non blocking error.

18
00:01:04,820 --> 00:01:06,100
The tool call goes ahead.

19
00:01:06,760 --> 00:01:08,141
That's failing open.

20
00:01:09,098 --> 00:01:12,119
And that matters because plenty of teams
push compliance checks,

21
00:01:12,319 --> 00:01:17,321
data loss prevention, or audit logic into
a central MCP server instead of local bash

22
00:01:17,321 --> 00:01:17,621
scripts.

23
00:01:18,361 --> 00:01:22,322
If that server restarts or throws an
unhandled exception, your gate quietly

24
00:01:22,382 --> 00:01:22,922
disappears.

25
00:01:23,703 --> 00:01:26,603
A destructive bash command or an
unauthorized write just runs,

26
00:01:26,864 --> 00:01:27,984
with no validation at all.

27
00:01:30,025 --> 00:01:30,205
Yeah.

28
00:01:30,748 --> 00:01:31,788
Setting it up is simple.

29
00:01:32,408 --> 00:01:38,550
In .claude/settings.json, or managed
settings, or a plugin's

30
00:01:38,830 --> 00:01:42,231
hooks.json, you define a PreToolUse hook.

31
00:01:43,052 --> 00:01:44,112
Matcher is Bash.

32
00:01:44,932 --> 00:01:50,333
Inside, type is mcp_tool, server is, say,

33
00:01:50,713 --> 00:01:56,895
security-guard-server, tool is
validate_command, timeout is 5,

34
00:01:56,895 --> 00:01:58,795
and onFailure is block.

35
00:01:59,915 --> 00:02:04,076
I'm reading JSON out loud, which is a bit
like describing a pie chart over the

36
00:02:04,136 --> 00:02:05,937
phone, but that's the whole shape.

37
00:02:06,507 --> 00:02:07,787
Keep that timeout in mind.

38
00:02:08,307 --> 00:02:12,168
Failure includes connection timeouts, an
unreachable server process,

39
00:02:12,368 --> 00:02:15,989
transport errors, and malformed JSON
coming back from the tool handler.

40
00:02:16,689 --> 00:02:20,930
So a five second timeout means a slow
server blocks the action after five seconds.

41
00:02:22,070 --> 00:02:24,811
Pick a number that's reasonable for your
validator, not a guess.

42
00:02:25,541 --> 00:02:26,701
Now the caveats.

43
00:02:27,281 --> 00:02:28,862
First, blast radius.

44
00:02:29,462 --> 00:02:34,023
If you pair this with a broad matcher,
like star, or even just Bash,

45
00:02:34,523 --> 00:02:38,184
then an MCP outage hard blocks every
matched action.

46
00:02:39,424 --> 00:02:41,525
Your agent workflow stops completely.

47
00:02:42,966 --> 00:02:47,207
So scope the matcher tightly, and have a
plan for who gets paged.

48
00:02:47,943 --> 00:02:50,904
Second, it only applies to events that can
actually veto something.

49
00:02:51,324 --> 00:02:54,825
PreToolUse, UserPromptExpansion,
PreModelSwitch.

50
00:02:55,406 --> 00:02:59,447
It won't block on events that can't veto,
like Stop, SubagentStop,

51
00:02:59,747 --> 00:03:01,568
TaskCompleted, or async hooks.

52
00:03:02,428 --> 00:03:04,669
So don't expect it to be a universal kill
switch.

53
00:03:05,256 --> 00:03:07,537
A few smaller things in the same release.

54
00:03:08,217 --> 00:03:14,180
Auto mode is now available for Opus 4.6
and Sonnet 4.6 on Amazon Bedrock,

55
00:03:14,580 --> 00:03:19,482
Google Cloud's Agent Platform, Microsoft
Foundry, and the Claude apps gateway.

56
00:03:20,342 --> 00:03:25,023
Interactive sessions on those with no
explicit permission mode now start in auto

57
00:03:25,123 --> 00:03:25,384
mode.

58
00:03:25,884 --> 00:03:28,444
You can turn that off with
disableAutoMode.

59
00:03:29,025 --> 00:03:33,726
There's also a new env var,
CLAUDE_CODE_DISABLE_DEFERRED_TOOL_RESUME.

60
00:03:34,246 --> 00:03:39,227
It lets host runners stop claude dash p
with resume or continue from running a tool

61
00:03:39,287 --> 00:03:40,848
call a hook previously deferred.

62
00:03:41,748 --> 00:03:45,609
Zsh users get a fix too: commands starting
with an equals sign,

63
00:03:45,769 --> 00:03:51,451
like echo and a row of equals signs, no
longer throw not found from zsh's equals

64
00:03:51,491 --> 00:03:52,011
expansion.

65
00:03:52,626 --> 00:03:53,706
Two more worth knowing.

66
00:03:54,286 --> 00:03:58,548
A bug where a scheduled tasks file that
failed to load, even from a typo,

67
00:03:58,968 --> 00:04:02,789
would wipe all saved project tasks on the
next save is fixed.

68
00:04:03,249 --> 00:04:06,570
That hit third party providers or
telemetry disabled setups.

69
00:04:07,490 --> 00:04:13,252
And /status and claude doctor now warn
when an OpenTelemetry exporter has no

70
00:04:13,472 --> 00:04:17,393
endpoint, because traces and metrics would
otherwise be silently dropped.

71
00:04:18,291 --> 00:04:22,435
So the takeaway: audit your mcp_tool hooks
today.

72
00:04:23,055 --> 00:04:27,699
If one is a real security gate, add
onFailure block, set a sane timeout,

73
00:04:27,900 --> 00:04:28,820
and narrow the matcher.

74
00:04:29,641 --> 00:04:31,463
Then go test it by turning the server off.

