-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Open
Labels
area:configurationRelates to configuration optionsRelates to configuration optionskind:enhancementIndicates a new feature request, imrovement, or extensionIndicates a new feature request, imrovement, or extension
Description
Overview
PR #11029 (merged 2026-03-04) added a significant new feature: a Claude Code-compatible hooks system for the Continue CLI. This feature allows external handlers (shell commands, HTTP endpoints) to intercept and respond to 17 CLI event types.
Feature Summary
The hooks system includes:
- 17 hook event types: PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, UserPromptSubmit, SessionStart, SessionEnd, Stop, Notification, SubagentStart, SubagentStop, PreCompact, ConfigChange, TeammateIdle, TaskCompleted, WorktreeCreate, WorktreeRemove
- Multiple hook handler types: command (shell), http (POST request), prompt, agent
- Config merging from multiple sources:
~/.continue/settings.json,.continue/settings.json,.continue/settings.local.json(and corresponding.claude/directories) - Regex-based event matching for targeted hook execution
- Exit code semantics: 0 = proceed, 2 = block (stderr becomes feedback)
- JSON output support with
hookSpecificOutputfor fine-grained control
Documentation Needed
A new documentation page (docs/cli/hooks.mdx) should be created covering:
- Introduction - What hooks are and why you'd use them
- Configuration - How to configure hooks in settings files, including config precedence
- Event Types - Reference for all 17 event types with input/output schemas
- Handler Types - How to write command, HTTP, prompt, and agent hooks
- Matcher Syntax - How regex matching works per event type
- Examples - Common use cases (logging, custom permissions, notifications)
Reference Materials
- Implementation:
extensions/cli/src/hooks/ - Types:
extensions/cli/src/hooks/types.ts - Internal docs:
extensions/cli/AGENTS.md(Hooks System section) - Original PR: feat: add hooks system for CLI event interception #11029
Additional Context
This is a tier 1, XXL feature that enables significant extensibility for CLI users. The hooks system is designed to be compatible with Claude Code, so users familiar with that tool can migrate their hooks directly.
Generated with Continue
Co-Authored-By: Continue noreply@continue.dev
Co-authored-by: bekahhw rhawrot@gmail.com
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:configurationRelates to configuration optionsRelates to configuration optionskind:enhancementIndicates a new feature request, imrovement, or extensionIndicates a new feature request, imrovement, or extension
Type
Projects
Status
Todo