Urgent.News

What's breaking now, across hundreds of outlets.

AI

Claude Code 2.1.299 to 2.1.301 Changed How Your Hooks Behave: 7 Things to Recheck

Book: Prompt Engineering Pocket Guide Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools Me: xgabriel.com | GitHub Since Claude Code 2.1.299, a UserPromptSubmit hook runs before your skill expands, so a hook that blocks the prompt…

Claude Code version 2.1.299 through 2.1.301 introduced several changes to how hooks behave. These updates can affect existing hooks and require rechecking certain aspects of your setup. Here are seven key points to consider:

1. UserPromptSubmit hooks now run before skill expansion. Previously, a blocking hook would stop the prompt but not the skill's shell commands. This change means hooks may now see the prompt before any embedded shell commands are executed. To check for affected hooks, look for patterns in UserPromptSubmit hooks that only match skill expanded text and adjust accordingly.

2. Skills now have their own UserPromptSubmit hook that runs after the initial prompt. If your skill's UserPromptSubmit hook relied on the initial prompt, it will now start with the next prompt. Skills with UserPromptSubmit hooks that check the invoking prompt should be moved to UserPromptExpansion in settings.

3. The updatedInput field in hooks is now validated, and unknown keys are dropped. This change applies to PreToolUse and PermissionRequest hooks. Hooks that return only changed fields or incorrectly spelled fields may cause input rejections. To test this, use a script to generate an input object and verify the updatedInput output.

4. In Cowork cloud sessions, setMode updates in PermissionRequest hooks are now ignored. The rest of the approval still applies, but the mode setting will not be changed. This change does not affect local installations but is important for users working with Cowork.

5. No other changes were mentioned in the source material, so these seven points cover the major updates to hooks in Claude Code versions 2.1.299 to 2.1.301. Users should review their hooks and make necessary adjustments to ensure compatibility with the new version.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in AI

What I Learned Building Multiple MCP Servers for Local LLMs (Qwen3-8B): Tool Granularity, Latency Traps, and Dogfooding

Recently, I have been building a local data analysis stack pairing LM Studio ( Qwen3-8B ) with custom Model Context Protocol (MCP) servers to query and cross-analyze over 180 normalized Japanese…

  • Keeping active tools under 5-10 for 8B local models avoids performance degradation.
  • Sequential Thinking MCPs backfire on Qwen3-8B, doubling latency and token usage.

More from Friday, 16 October 2026 →