Hooks
Harnesshow the work gets done

The Hook System

Code that runs on its own at fixed points in every session, so what must happen every time does.

Pulse · The Hook System
Pulse's Hooks page shows 38 hooks across 12 Claude Code events, what they run on, which tools the 16 tool hooks intercept, and the health check beside them. The screen is the real Pulse; the data is invented.Pulse's Hooks page shows 38 hooks across 12 Claude Code events, what they run on, which tools the 16 tool hooks intercept, and the health check beside them. The screen is the real Pulse; the data is invented.Pulse's Hooks page shows 38 hooks across 12 Claude Code events, what they run on, which tools the 16 tool hooks intercept, and the health check beside them. The screen is the real Pulse; the data is invented. Pulse's Hooks page shows 38 hooks across 12 Claude Code events, what they run on, which tools the 16 tool hooks intercept, and the health check beside them. The screen is the real Pulse; the data is invented.Pulse's Hooks page shows 38 hooks across 12 Claude Code events, what they run on, which tools the 16 tool hooks intercept, and the health check beside them. The screen is the real Pulse; the data is invented.Pulse's Hooks page shows 38 hooks across 12 Claude Code events, what they run on, which tools the 16 tool hooks intercept, and the health check beside them. The screen is the real Pulse; the data is invented.

Pulse's Hooks page shows 38 hooks across 12 Claude Code events, what they run on, which tools the 16 tool hooks intercept, and the health check beside them. The screen is the real Pulse; the data is invented.

A hook is a small program that runs on its own when something happens in a session, such as a prompt being sent or a reply finishing. Claude Code, Codex and the text bridge all run them. LifeOS uses hooks for the work that has to happen every time, like adding live context, naming the session, recording outputs and checking each answer once written.

Why it exists

A model can skip an instruction it usually follows. If a checkpoint commit should land every time a criterion passes, a skipped one is a gap you find later. A hook moves that behavior out of the model’s judgment and into code the harness runs regardless. It also keeps the loop moving between your prompts, which is what the hook lifecycle was built for.

Something earns a hook when code can decide it with no judgment call and missing it once costs something. “Write better commit messages” fails that test, so it lives in guidance instead.

How it works

There are two halves. One is a set of command hooks, small scripts the harness starts on the events they are registered for. The other is the LifeOSHooks plugin, which, when turned on, loads once per interactive Claude Code session: it draws the ISA chip and hook notices in the band above the prompt and hands every subagent the security rules. Command hooks it covers stand down and stay as the fallback.

The session lifecyclefixed points where hooks fire on their own
  • Session startAdd live context (active work, recent lessons, advisories) to what the startup prompt carries.
  • Prompt submitName the session, add the current time, and give text sessions their hot memory; terminal sessions read it on demand.
  • After a toolSync the ISA's progress, commit a checkpoint when a criterion is ticked, and, on maintainer installs, record files handed to you.
  • Reply finishedFlag format drift, speak the closing line aloud in live sessions when the voice policy says it matters, and rebuild a stale memory index.
  • Session endPull the lessons out of finished work and clear the session's state.

Most hooks fail quietly; background ones never hold up the turn, and one the harness waits on delays it only until its timeout. A few end-of-turn gates can keep the turn open for a correction when the reply, already on screen, breaks a checkable rule, such as a system doc changed while the pages restating it went unchecked.

Since late October 2026, native security decides whether most tool calls may run: Claude Code’s permission rules, git’s pre-commit and pre-push checks, and an opt-in macOS sandbox for subagents. Two hooks can still stop a call: the Tex texting guard, and a check that keeps a subagent dispatch’s effort in range.

Where you see it

The screen at the top is Pulse’s Hooks page. The dial counts 38 hooks across 12 events, with PreToolUse the busiest at 9; one hook is marked not registered, and 30 of them run as TypeScript. On the right, the bars show what the 16 hooks on tool events intercept, led by Bash at 5. The lower panel is the health check beside the hooks: the doctor’s 16 checks, with the laptop backup flagged broken. Further down, the page checks hook files against what is registered and lists every hook by event.

An unregistered file never runs, so check that count first when a hook seems to do nothing. If the ISA chip or a hook notice is missing, the LifeOSHooks skill says whether the plugin is loaded and why it didn’t draw. The 3 hooks on SessionEnd are learning from every run at work.

Where it fits

Hooks are where code first gets applied to the session itself. They load and save memory, keep each ISA in step with the work, and trigger Voice at turn end when the voice policy calls for it.

Full documentation Hook System →