{
  "id": 14881906,
  "title": "Claude Code 2.1.299 to 2.1.301 Changed How Your Hooks Behave: 7 Things to Recheck",
  "url": "https://urgent.news/2026/10/16/claude-code-2-1-299-to-2-1-301-changed-how-your-hooks-behave-7-things",
  "topic": "ai",
  "section": "AI",
  "published": "2026-10-16T06:02:02.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/gabrielanhaia/claude-code-21299-to-21301-changed-how-your-hooks-behave-7-things-to-recheck-373d"
  },
  "original_language": "en",
  "account": "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:\n\n1. 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.\n\n2. 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.\n\n3. 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.\n\n4. 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.\n\n5. 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.",
  "summary": "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…",
  "key_points": [
    "UserPromptSubmit hooks now run before skill expansion",
    "Skills have their own UserPromptSubmit hook post-initial prompt",
    "UpdatedInput field validation for PreToolUse and PermissionRequest hooks"
  ],
  "editors_take": "These updates shift the execution order and validation requirements for hooks, forcing developers to restructure prompt handling and input formatting to prevent broken workflows or ignored settings.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}