Narratives AI & Agents

Claude Code v2.1.295 Makes Hook Failures Block Agent Actions

Built from 2 signals across 2 sources · 109 items reviewed

Claude Code v2.1.295 and the proposed OSC 7501 protocol both push terminal-based automation toward explicit control states instead of silent uncertainty. Claude Code now lets command and HTTP hooks block an action when they fail, time out, or return an unexpected code. OSC 7501 would let programs report whether they are working, waiting for permission, finished, or failed so terminals and other tools can present that state consistently.

  • Claude Code v2.1.295, released October 8, 2026, adds onFailure: "block" for command and HTTP hooks.
  • With the new hook policy, a hook that cannot start, times out, or exits with an unexpected code blocks the action instead of allowing it through.
  • The OSC 7501 proposal defines terminal-native states including idle, working, waiting on the user, finished, and failed, with a reason attached.
  • The proposal illustrates Terraform reporting a blocked approval prompt for an apply that would add 3, change 1, and destroy 0 resources.

Bottom line If you run Claude Code with command or HTTP hooks, review whether failed hooks should block actions before upgrading; if you build terminal automation, track OSC 7501 as a possible status-integration point.

Signals2