Skip to content

Add documentation for CLI hooks system #11115

@continue

Description

@continue

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 hookSpecificOutput for fine-grained control

Documentation Needed

A new documentation page (docs/cli/hooks.mdx) should be created covering:

  1. Introduction - What hooks are and why you'd use them
  2. Configuration - How to configure hooks in settings files, including config precedence
  3. Event Types - Reference for all 17 event types with input/output schemas
  4. Handler Types - How to write command, HTTP, prompt, and agent hooks
  5. Matcher Syntax - How regex matching works per event type
  6. Examples - Common use cases (logging, custom permissions, notifications)

Reference Materials

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

Metadata

Metadata

Assignees

Labels

area:configurationRelates to configuration optionskind:enhancementIndicates a new feature request, imrovement, or extension

Type

No type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions