Skip to content
Monitoring
Hook

Hooks

What agents-observe runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.

From plugin
agents-observe
7381 skill28 hooks1 MCP

Claude Code

> /plugin marketplace add simple10/agents-observe
> /plugin install agents-observe@agents-observe

What fires, and when

Setup

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

SessionStart

Fires once when a session begins, and again after a context compaction. It is where a plugin sets up its environment, or restores state the compaction dropped.

  • node ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/observe_cli.mjs hook-autostart

SessionEnd

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

UserPromptSubmit

Fires before Claude sees each prompt you send. A plugin can use it to inject context, so the same instruction reaches the model every turn instead of only at session start.

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

UserPromptExpansion

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

PreToolUse

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

PostToolUse

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

PostToolUseFailure

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

PostToolBatch

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

PermissionRequest

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

PermissionDenied

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

Stop

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

StopFailure

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

SubagentStart

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

SubagentStop

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

TeammateIdle

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

TaskCreated

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

TaskCompleted

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

Notification

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

InstructionsLoaded

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

ConfigChange

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

CwdChanged

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

FileChanged

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

PreCompact

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

PostCompact

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

Elicitation

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

ElicitationResult

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh

WorktreeRemove

  • bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/hook.sh
Read hooks/hooks.json
@simple10
Ships withagents-observe

Real-time observability dashboard for Claude Code and Codex agents. Includes powerful filtering, searching, and visualization of multi-agent sessions with full replay and token usage stats. Demo video

7381 skill1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
738
Star history of simple10/agents-observe on GitHub, a chart by star-history.com

More plugins that ship hooks.

callme

callme

Lets Claude Code call your phone when a task finishes, gets stuck, or needs a decision, so you can start a task and step away. Works with a phone or watch.

1 skill1 hook2.7k
@zeframlou@zeframlou
Install Plugin
claude-notifications-go

claude-notifications-g…

Sends desktop alerts with sounds and webhooks when Claude Code needs your attention or reaches a milestone during long-running work. Clicking a notification brings the matching window back into focus, on macOS, Linux, and Windows.

1 skill+2835
@777genius@777genius
Install Plugin
agent-office

agent-office

A pixel art virtual office that visualizes your AI agents working in real-time. Watch Claude Code agents spawn, sit at desks, take coffee breaks, and chat in a Slack-inspired office chat panel, all rendered in an isometric pixel art office.

23 hooks+1386
@w17ant@w17ant
Install Plugin
claude-carbon

claude-carbon

claude-carbon: track the carbon footprint of your Claude Code sessions.

6 skills5 hooks254
@gwittebolle@gwittebolle
Install Plugin

Questions about the hooks in agents-observe.

Which coding agents can use the hooks in agents-observe?
The hooks in agents-observe install in Claude Code and Cursor: each runs Claude Code hooks from .claude/settings.json, so copy the hooks there.