PulseAugur
EN
LIVE 13:46:13

Claude Code hooks: Crashes invisible to model by default, but blockable

An experiment with Claude Code's PreToolUse hooks revealed that a crashing hook, by default, leaves no trace in the model's context, even though the error is logged system-side. This means the model is unaware of the failure and proceeds as if the tool call was successful. However, when the `onFailure: "block"` setting is applied to a hook, the model is correctly informed of the hook's failure and the tool call is prevented. AI

IMPACT This clarifies the error handling and context visibility for developers using Claude Code's tool-use features, impacting how they design and debug their applications.

RANK_REASON The article details a specific feature and behavior of a product, Claude Code, rather than a novel release or significant industry event.

Read on dev.to — Claude Code tag →

AI-generated summary · Google Gemini · from 1 sources. How we write summaries →

Claude Code hooks: Crashes invisible to model by default, but blockable

How we ranked this

Signal score
50 / 100
Composite score across the factors below. Higher = stronger signal that this story matters right now.
Newsworthiness bucket
Tool
The article details a specific feature and behavior of a product, Claude Code, rather than a novel release or significant industry event.
Source corroboration
Single-source cluster
Only one publisher covered this so far. Single-source stories can still rank when the publisher is high-authority, but they lack cross-source corroboration.
Topics
product, other
Editorial topic classification. Feeds into how the story surfaces on /topic/<slug> hub pages and into the per-entity coverage mix.
AI-industry relevance
High
Clearly on-topic for AI-industry coverage.
Story freshness
Breaking (< 6h)
Fresh story with cross-source coverage still developing. Ranking may shift as more sources report.

Full methodology in our editorial standards.

COVERAGE [1]

  1. dev.to — Claude Code tag TIER_1 English(EN) · Enjoy Kumawat ·

    "A Crashed PreToolUse Hook Leaves No Trace in the Model's Context; Telling It to Block Leaves Too Much"

    <p>Two readers left comments on yesterday's piece about Claude Code's <code>PreToolUse</code> hook exit codes that I couldn't answer honestly at the time. One asked what happens to stderr output from a crashing hook — does it leak into the model's context, or just disappear. The …