Hooks
What octo runs automatically, and when. A hook is a command Claude Code fires at a fixed moment, without you asking for it.
$ npx -y skills add nyldn/claude-octopus --agent claude-codeShips with octo. Installing the plugin gets these hooks.
What fires, and when
PreToolUse
- Runs provider-routing-validator.sh.
PostToolUse
- Runs post-tool-dispatch.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.
- Runs export.
TeammateIdle
- Runs teammate-idle-dispatch.sh.
TaskCompleted
- Runs task-completed-transition.sh.
ConfigChange
- Runs config-change-handler.sh.
WorktreeCreate
- Runs worktree-setup.sh.
WorktreeRemove
- Runs worktree-teardown.sh.
SubagentStop
- Runs subagent-result-capture.sh.
InstructionsLoaded
- Runs instructions-loaded.sh.
PreCompact
- Runs pre-compact.sh.
SessionEnd
- Runs session-end.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.
- Runs user-prompt-submit.sh.
StopFailure
- Runs stop-failure-log.sh.
CwdChanged
- Runs cwd-changed.sh.
TaskCreated
- Runs discipline-task-gate.sh.
PostCompact
- Runs post-compact.sh.
Elicitation
- Runs elicitation-handler.sh.
ElicitationResult
- Runs result.
PermissionDenied
- Runs permission-denied-log.sh.
Where it lives
- hooks/agent-teams-phase-gate.shGitHub
- hooks/architecture-gate.shGitHub
- hooks/auto-router-inject.shGitHub
- hooks/budget-gate.shGitHub
- hooks/careful-check.shGitHub
- hooks/code-quality-gate.shGitHub
- hooks/codex-exec-guard.shGitHub
- hooks/config-change-handler.shGitHub
- hooks/context-awareness.shGitHub
- hooks/context-reinforcement.shGitHub
- hooks/cwd-changed.shGitHub
- hooks/discipline-inject.shGitHub
- hooks/discipline-task-gate.shGitHub
- hooks/done-criteria.shGitHub
- hooks/elicitation-handler.shGitHub
- hooks/fable5-inject.shGitHub
- hooks/freeze-check.shGitHub
- hooks/frontend-gate.shGitHub
- hooks/github-work-queue-watch.shGitHub
- hooks/instructions-loaded.shGitHub
- hooks/octopus-hud.mjsGitHub
- hooks/octopus-statusline.shGitHub
- hooks/output-compressor.shGitHub
- hooks/perf-gate.shGitHub
- hooks/permission-denied-log.shGitHub
- hooks/plan-mode-interceptor.shGitHub
- hooks/post-compact.shGitHub
- hooks/post-tool-dispatch.shGitHub
- hooks/pre-compact.shGitHub
- hooks/provider-routing-validator.shGitHub
- hooks/quality-gate.shGitHub
- hooks/scheduler-security-gate.shGitHub
- hooks/security-gate.shGitHub
- hooks/session-end.shGitHub
- hooks/session-start-memory.shGitHub
- hooks/statusline-auto-repair.shGitHub
- hooks/statusline-resolver.shGitHub
- hooks/stop-failure-log.shGitHub
- hooks/strategy-rotation.shGitHub
- hooks/subagent-result-capture.shGitHub
- hooks/subagent-stop-gate.shGitHub
- hooks/sysadmin-safety-gate.shGitHub
- hooks/task-completed-transition.shGitHub
- hooks/task-completion-checkpoint.shGitHub
- hooks/task-dependency-validator.shGitHub
- hooks/teammate-idle-dispatch.shGitHub
- hooks/telemetry-webhook.shGitHub
- hooks/user-prompt-submit.shGitHub
- hooks/version-advisory.shGitHub
- hooks/workflow-verification.shGitHub
- hooks/worktree-setup.shGitHub
- hooks/worktree-teardown.shGitHub
Showing the source of 6 of 52 scripts. Every one is linked above.
Read the script before you install anything that runs on your machine. This is the one part of a plugin that acts without being asked.
Every AI model has blind spots. Claude Octopus supports ten external provider integrations — Codex, Gemini, Antigravity CLI, Copilot, Qwen, Ollama, Perplexity, OpenRouter, OpenCode, and Grok — alongside the built-in Claude Code host, with consensus gates that
Repo: nyldn/claude-octopus

