◉CLAUDE LABJP
●2.1.296 — Sonnet 5.5 cache reads drop to $0.10/Mtok (was $0.20), and the MCP description limit rises to 4,096 characters●2.1.295 — Hooks gain onFailure: "block", so a failed or timed-out hook no longer lets the action through●SONNET 4.5 — Retires on the Claude API on 11/30, 51 days left. Migrate to Sonnet 5.5●Q&A — A long-running report: the console jumps back to the top of history whenever output is appended●HAIKU 5.5 — Code written for Haiku 4.5 hits a 400 error on budget_tokens●NEW — When first requests keep missing, hand over a one-page description of your work first●2.1.296 — Sonnet 5.5 cache reads drop to $0.10/Mtok (was $0.20), and the MCP description limit rises to 4,096 characters●2.1.295 — Hooks gain onFailure: "block", so a failed or timed-out hook no longer lets the action through●SONNET 4.5 — Retires on the Claude API on 11/30, 51 days left. Migrate to Sonnet 5.5●Q&A — A long-running report: the console jumps back to the top of history whenever output is appended●HAIKU 5.5 — Code written for Haiku 4.5 hits a 400 error on budget_tokens●NEW — When first requests keep missing, hand over a one-page description of your work first
TAG

hooks

26 articles
← Back to all tags
Related:
Claude Code15claude-code11automation8troubleshooting5Automation4Subagents3PreToolUse2settings2workflow2subagents2Workflow2production2
⟐ Claude Code/2026-10-05Intermediate

I Wrote "I'll Do the Commits" in CLAUDE.md. The Next Morning git log Had One More Line.

When Claude Code commits despite being told not to: undo with git reset --soft, then stop it physically with permissions.deny plus a PreToolUse hook. Covers the git -c form that deny rules let through, and how to test the hook without starting Claude Code.

◉ Claude AI/2026-09-15Intermediate

Where to Put an Instruction That Keeps Coming Back: Chat, Style, Settings File, or Hook

No comments, please. Do not translate the product name. When an instruction drifts back a few turns later, the fix is usually the location, not the wording. I compared the same sentence across four layers and settled on a rule for which instruction belongs where.

⟐ Claude Code/2026-09-02Intermediate

Two hooks that record every model switch and stop the ones you never agreed to

Build a PostModelSwitch hook that logs every model change and a PreModelSwitch hook that blocks unapproved switches during unattended runs. Complete scripts, measured timings, and the reason the two jobs must stay separate.

⟐ Claude Code/2026-08-28Intermediate

Don't let your verification script's full output flow back through a hook

The check was working the whole time. The conversation was what ran out of room. Measured side by side: 58 bytes from one scan of 833 files, 42KB from another. Which paths actually reach the model, and how to enforce a budget on them.

⟐ Claude Code/2026-08-16Intermediate

Tracking Multi-Step Work in Claude Code Now That the Todo Tools Are Off by Default

Since Claude Code v2.1.233, TodoWrite and the Task tools are left out on the newer models. Here are the three branches to check before you set the opt-in variable, the PostToolUse ledger I put in their place, and the measured point where that ledger quietly corrupts under parallel agents.

⟐ Claude Code/2026-07-30Advanced

You Added a Second Working Root — Now Ask How Far Your Ignore Rules and Deny Patterns Actually Reach

Adding a working root mid-session does not carry your ignore rules or deny patterns with it. Measured evidence from git check-ignore and a three-way matcher comparison, plus the scope-delta audit script I now run from the DirectoryAdded hook.

⟐ Claude Code/2026-04-27Advanced

Claude Code Hooks: A Field Guide to the 8 Core Hooks — and the 33-Event Catalog They Now Live In

Claude Code hooks are powerful, but most people give up before figuring out which event does what. Here's the field guide I wish I had when I started — six months of running hooks in production, distilled.

⟐ Claude Code/2026-04-24Advanced

Running Claude Code Without Breakage — A Failure-First Production Workflow with Plan Mode, Hooks, Rewind, and Subagents

If Claude Code has ever landed a broken commit on your main branch, this guide shows how to combine Plan Mode, Hooks, Rewind, and Subagents into a single failure-first workflow that keeps your repository safe without slowing you down.

⟐ Claude Code/2026-04-24Advanced

Debugging Claude Code Hooks in Production — Where to Start When Logs Are Missing

Your Claude Code hooks work locally but go silent in production. Here is the three-layer observability pattern I use on real projects, plus a 60-second minimal reproduction recipe for isolating failures.

⟐ Claude Code/2026-07-10Advanced

Carrying Decisions Across Compaction with PreCompact and SessionEnd Hooks

Auto-compaction does not delete your conversation. It deletes the reasons behind it. Here is a working PreCompact / SessionEnd / SessionStart hook pipeline that rescues decisions to disk and hands them to the next session, with real code and measurements.

⟐ Claude Code/2026-07-01Intermediate

My Claude Code Hooks Stopped Firing After an Update — the Hyphenated Matcher Exact-Match Change in v2.1.195

In Claude Code v2.1.195, hook matchers containing a hyphen switched from partial match to exact match, silently disabling an existing PreToolUse hook. Here is how I isolated the cause and how to write matchers that won't break.

⟐ Claude Code/2026-06-18Advanced

Moving Cleanup and Logging into a SessionEnd Hook

How to use Claude Code's new post-session hook to automate temp-file cleanup and log writing after a session ends, with real examples from a pipeline that processes several repositories in sequence.