AIToday
AI Coding AssistantsAI Safety & AlignmentZenn AI/MLPublished: Oct 9, 2026, 10:00 JST

Claude Code 2.1.295 adds onFailure: "block" stop rule for hooks

Claude Code 2.1.295 adds onFailure: "block" stop rule for hooks

3 Key Points

  1. What happened

    Claude Code 2.1.295 gives command and HTTP hooks an onFailure: "block" option that halts execution on launch failure, timeout, or unexpected exit codes, and also fixes long-run issues like remote MCP reconnects and pagination.

  2. Why it matters

    Where hooks handle auditing, approvals, or secret checks, the default behavior on failure becomes the safety boundary itself, so teams need to classify each hook as a boundary or mere observation.

  3. What to watch

    Anthropic's 2026 Usage Policy update takes effect on November 12.

WHO IT HITSEngineering and platform teams that wire command or HTTP hooks into approval, audit, and secret-scanning pipelines now have to decide per hook whether a failed check should stop the run or just be logged, since the new option makes stopping an explicit choice. Compliance and security staff at companies using Claude for health, financial, or employment decisions may also need to build in human sign-off and AI-use disclosure.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The Claude Code change lands alongside a broader question the article raises: when a hook that guards audits, approvals, or secret checks fails, continuing is itself a silent form of permission. The release adds state notifications showing whether Claude Code is working, waiting for input, or finished, plus a warning when a plugin tries to modify a config file it cannot read — visible signals that pair with the new stop rule.

Anthropic's policy update draws the same line in prose. It consolidates rules on deceptive activity into one section, covering fake-account amplification and the building of tools and infrastructure for influence operations. In the election area it narrows its scope to deception and vote suppression, dropping a blanket ban on personalized voting and campaign activity — a change that reduces as well as expands the boundary. For agents that assemble their own procedures, the article argues that authority settings, sandboxes, and audit logs pick up the freedom that specifications drop.

On the research side, the article notes that pairings of models with people dominate: Anthropic Cyber Mission's OSS Scanner scans with strong models and sends vulnerability explanations, reproduction examples, and possible fixes to maintainers, with an expected true-positive rate above 90% but no human review before delivery, so severity misjudgments are possible.

FAQ
What does onFailure: "block" actually do in Claude Code 2.1.295?
It stops execution when a command or HTTP hook fails to start, times out, or returns an unexpected exit code, instead of continuing the previous behavior. The same release fixes remote MCP server reconnection, pagination that returns the same cursor, and sub-agent work-tree display.
What does Anthropic's 2026 Usage Policy update require for sensitive decisions?
For decisions affecting health, law, finance, employment, and essential services, it requires confirmation by a person with authority to change the outcome and disclosure of AI use. For autonomous physical devices that could injure people, it requires a qualified operator who can monitor and stop the machine and keep it safe if the Claude connection drops.
How much is Anthropic putting into the Genesis Mission?
Anthropic is committing $150 million over three years to provide Claude, Claude Code, and API credits to researchers at more than 15 US government agencies. It also bundles onboarding and technical support across hundreds of research projects including nuclear fusion and quantum computing.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleHex cuts wrong edits 7x with evals on Quick Edits