Skip to content

docs(cli): add hooks guide for event interception#11168

Open
siewcapital wants to merge 6 commits intocontinuedev:mainfrom
Siew-s-Capital:docs/cli-hooks-system-11152
Open

docs(cli): add hooks guide for event interception#11168
siewcapital wants to merge 6 commits intocontinuedev:mainfrom
Siew-s-Capital:docs/cli-hooks-system-11152

Conversation

@siewcapital
Copy link
Contributor

@siewcapital siewcapital commented Mar 7, 2026

Summary

  • add a dedicated docs/cli/hooks.mdx guide for the CLI hooks system
  • document config file locations for both .continue and .claude settings
  • cover supported event types, matcher behavior, command/http handlers, and blocking semantics
  • include sync vs async execution notes and command-hook environment variables
  • add a "More CLI docs" section in quickstart linking to hooks/configuration/permissions pages

Why

The hooks feature introduced in #11029 is tier-1 functionality, but there was no end-to-end user documentation for setup and behavior.

Validation

  • Verified docs links and markdown structure locally
  • npm --prefix docs run build currently fails in this environment because mintlify is not installed (sh: mintlify: command not found)

Closes #11152


Summary by cubic

Adds a dedicated CLI Hooks guide and updates TUI and permissions docs to cover hook behavior and the AskQuestion tool. This completes end-to-end hooks documentation and meets #11152.

  • New Features
    • Added docs/cli/hooks.mdx: config precedence across .claude/.continue, supported events, regex matchers, command/HTTP handlers, exit/blocking semantics, sync vs async, env vars, disable-all, examples.
    • Updated docs/cli/tool-permissions.mdx: expanded read-only defaults (AskQuestion, Checklist, Status, CheckBackgroundJob, ReportFailure, UploadArtifact) and clarified AskQuestion as a read-only clarification tool.
    • Expanded docs/cli/tui-mode.mdx: more slash commands, how interactive AskQuestion prompts work, and read-only tools list now includes Diff and AskQuestion.

Written for commit 982a928. Summary will update on new commits.

@siewcapital siewcapital requested a review from a team as a code owner March 7, 2026 19:03
@siewcapital siewcapital requested review from sestinj and removed request for a team March 7, 2026 19:03
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 7, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 4 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/cli/hooks.mdx">

<violation number="1" location="docs/cli/hooks.mdx:152">
P2: Docs overstate sync hook awaiting semantics; `SessionStart` is mode-dependent (non-blocking in interactive startup, awaited in headless mode).</violation>
</file>

<file name="docs/cli/tool-permissions.mdx">

<violation number="1" location="docs/cli/tool-permissions.mdx:31">
P2: Docs introduce ambiguous headless behavior for `AskQuestion`: it is documented as default `allow` and user-interactive, but headless docs only exclude `ask` tools and do not define what happens for this prompting tool.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Collaborator

@RomneyDa RomneyDa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siewcapital thanks for the contribution. Looks like the AskQuestion docs from another PR leaked into this one, could you remove?

See comments.


Continue currently supports the following event names:

- `PreToolUse`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would include brief description with each hook

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the PR to keep it focused on hooks docs. I removed the unrelated AskQuestion docs changes from the branch and added brief descriptions for each hook event in docs/cli/hooks.mdx, along with a clarification on SessionStart sync behavior.

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

Docs: Add documentation for CLI hooks system

2 participants