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.
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.
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.
A SubagentStop Hook That Grades Subagent Output and Sends It Back to Be Redone
When a Claude Code subagent occasionally returns rule-breaking work, a SubagentStop hook can grade it automatically and ask for a redo. Here is a working setup with code and field notes.
Running Claude Code Hooks as a Quality Gate Without Breaking Your Pipeline
An implementation note on running Claude Code Hooks as a safety valve for automation: when to block with exit code 2 versus JSON output, how to keep formatters from looping or over-blocking, and how to log every hook firing so misfires are traceable.
Stopping Claude Code Before It Runs a Destructive Command — a PreToolUse Screening Hook
How I wired a PreToolUse hook that screens every Bash command Claude Code is about to run: the settings.json setup, the Python screening script, what exit code 2 really does, and the false positives I tuned out over several weeks.
Six Weeks Running a Claude Code Hooks + SwiftLint Quality Gate on My Indie iOS Apps
A six-week field report on wiring SwiftLint into Claude Code's PostToolUse hook to keep my indie iOS codebases consistent. Motivation, implementation, three adjustments that mattered, and the rough edges I hit along the way.
Claude Code Hook `command timed out`: Timeout Settings and Split-Execution Patterns That Actually Work
Fix Claude Code's `command timed out` hook failure without just bumping the timeout. Includes practical split-execution, detached background jobs, and a settings.json layout that keeps your session fast.
Building a Zero-Touch Code Review Environment with Claude Code Hooks
Learn how to use Claude Code's hook system to automatically review code on every tool execution. Covers PostToolUse, Stop hooks, and the pitfalls to avoid when implementing PreToolUse blockers.
From Handy Tool to Development Backbone: Five Operational Pillars for Claude Code
Claude Code is not just a coding assistant — it can become the backbone of your entire development process. Here are the five operational pillars that turn it from a helpful sidekick into the engine of your workflow.
Claude Code Hooks: A Complete Field Guide to All 8 Hook Types and How to Pick the Right One
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.
Secret Management and Trust Boundaries for Claude Code — A Production Guide for the Agent Era
A field-tested approach to secrets in a Claude Code workflow: trust-boundary modeling, three injection patterns, leak-prevention hooks, and rotation runbooks — with working code for .env, MCP, and OS Keychain integrations.