Setup Hook vs SessionStart Hook
People think a Setup hook runs each time Claude Code starts. It does not. It runs only when you ask for it with --init-only, --init or --maintenance. SessionStart is the one that runs on every start, resume and clear. Put one-time installs in Setup, and quick context in SessionStart.
Setup Hook
An event that fires only on a set-up run.
Setup is the hook event that fires only on a set-up run. That is a start with --init-only, or a -p run with --init or --maintenance. It never fires on a normal start. The matcher is init or maintenance. Use it for one-time jobs, such as installing packages in CI. Keep those apart from the hooks that run each session.
SessionStart Hook
The event when a session starts. It can load notes for Claude.
SessionStart is the hook event that fires when Claude Code starts a new session or resumes one. The matcher says how it began: startup, resume, clear, compact or fork. Text the hook prints is added to Claude's context, so it is the place to load today's issues or recent changes. Only command and MCP tool hooks run here.
In one line
- Setup Hook
- An event that fires only on a set-up run.
- SessionStart Hook
- The event when a session starts. It can load notes for Claude.