What are Claude Code hooks useful for in a team?
By Soumen Sarkar · October 2026
Short answer: In a team, Claude Code hooks are most useful for moving context without anyone having to remember: loading the team's state when a session starts, briefing it on each part of the code it touches, attaching reasons to commits, and writing a handoff when the session stops. Hooks are shell commands that Claude Code runs at fixed points in a session.
What are Claude Code hooks?
Hooks are commands Claude Code runs on its own at set moments in a session. The moments include when a session starts, when a prompt is submitted, before and after a tool is used, before the conversation is compacted, when Claude finishes responding, and when the session ends.
They are configured in .claude/settings.json. When that file is checked into the repository, every person on the team runs the same hooks, and every session behaves the same way without anyone setting it up.
Which jobs suit hooks in a team?
The best jobs are the ones a person or an agent would forget on a busy day:
- Session start: load what changed in the team since this person's last session.
- Each prompt: pass along news for this session, such as a correction to one of its assumptions.
- Around tool use: the first time a session reads or edits a folder, add what the team knows about that part of the code.
- On commit: write the change's reasons for the reviewer: what it is for, the calls made, what was assumed.
- Stop, compaction and session end: write a handoff while the session still has everything in view.
Each of these moves context to where it is needed at the moment it is needed. None of them asks anyone to do anything.
What should hooks not do?
Hooks can also block actions. Use that sparingly. A hook that stops work to wait for a person adds the very wait a team at agent pace is trying to remove. Keep hooks fast, so sessions don't feel them. Strip secrets from anything a hook sends elsewhere.
What does this look like when a session stops?
A developer's session is moving the transactional emails in Email · lib/email to a new template system. Halfway through, the conversation fills up and Claude Code compacts it. Without a hook, what the session knew about its progress is squeezed into a summary written for the model, not for a teammate.
With a hook on compaction and session end, a handoff is written first:
Done: welcome, password reset and receipt emails moved to the new templates.
Left: invoice and trial-ending emails.
Next step: invoice email; its totals helper expects cents.
Watch out: the old layout still injects the footer twice on receipts in
dark mode; the new templates don't, so don't copy the old footer.
Assumed: plain-text versions are generated, not hand-written.
The next morning a teammate picks it up from that note, not from the developer.
What do Campfyrr's hooks do?
Campfyrr's one-line setup installs hooks that do these jobs: a brief at session start, with your own unfinished work and handoffs at the top; an area brief the first time a session touches a part of the code; the session's first request as its one-line goal of work in progress; news each turn; reasons on commit or pull request; and a handoff when it stops, compacts or ends. The transcript itself isn't kept. Hooks are a Claude Code feature, so other agents follow the server's instructions instead.
Words used here
- Handoff: A handoff is what unfinished work carries for whoever continues it: what's done, what's left, the next step, and what to watch out for.
- Reasons: Reasons are what a change is for, the calls made in it, and what was assumed, attached to the change for whoever reviews it.
- Area brief: An area brief is what a person or agent is told the first time they touch a part of the code: what's changing there now, what was decided, and what was tried.
The principle behind this: Keep moving: The work never waits, and neither do we.
Move as one at agent speed. Nobody waits. Add Campfyrr to Claude: it briefs every agent before it touches the code, keeps assumptions and handoffs where the team can see them, and never takes your code (what it keeps).