Skip to content

docs: add a CLI hooks guide#11353

Open
fahe1em1 wants to merge 3 commits intocontinuedev:mainfrom
fahe1em1:codex/docs-cli-hooks-guide
Open

docs: add a CLI hooks guide#11353
fahe1em1 wants to merge 3 commits intocontinuedev:mainfrom
fahe1em1:codex/docs-cli-hooks-guide

Conversation

@fahe1em1
Copy link

@fahe1em1 fahe1em1 commented Mar 12, 2026

Description

Closes #11221.

This adds a new CLI hooks guide that documents configuration locations, supported hook and event types, blocking behavior, and a couple of end-to-end examples. It also links the page from the CLI docs navigation so the guide shows up in the published sidebar. The change is intentionally small and safe because it only adds documentation plus a single docs navigation entry, with no runtime or config behavior changes.

Checklist

  • The relevant docs, if any, have been updated or created
  • The relevant tests, if any, have been updated or created

Tests

  • npx --yes prettier --check --no-config --tab-width 2 --use-tabs false --trailing-comma all --semi true --single-quote false --bracket-spacing true docs/cli/hooks.mdx docs/docs.json
  • npx mintlify broken-links

Why this is small and safe

  • This PR only adds docs content and a sidebar entry for an existing CLI capability.
  • No shipped code paths or user settings behavior are modified.

Summary by cubic

Adds a CLI Hooks guide covering config precedence, hook and event types, blocking behavior, and two examples. Clarifies which events the CLI emits today vs. reserved Claude-compatible events, and links the page in the CLI docs navigation; fulfills Linear #11221.

Written for commit 702698a. Summary will update on new commits.

Add the new CLI hooks guide under docs/cli so it can be linked from the navigation update in the next commit.
Add the new CLI hooks page to the CLI section in docs/docs.json so it appears in the published documentation navigation.
@fahe1em1 fahe1em1 requested a review from a team as a code owner March 12, 2026 19:18
@fahe1em1 fahe1em1 requested review from RomneyDa and removed request for a team March 12, 2026 19:18
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 12, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2026

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 69ab972a31

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


## Event types

These are the event names currently supported by the CLI hooks system:

Choose a reason for hiding this comment

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

P2 Badge List only hook events that are actually emitted

This section says the listed events are “currently supported,” but several listed events are not emitted by the CLI runtime (for example PermissionRequest, SubagentStart, ConfigChange, and TaskCompleted): in extensions/cli/src/hooks/fireHook.ts there are no emitters for those events, and repo-wide usage shows no other services.hooks.fireEvent(...) call sites outside that helper file. As written, users can configure these events and never see hooks run, so the guide should mark them as planned/schema-only or remove them from the supported table.

Useful? React with 👍 / 👎.

Copy link
Author

Choose a reason for hiding this comment

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

Addressed in 702698a. I updated the guide to list only the events the CLI actually emits today and explicitly marked the extra Claude-compatible event names as reserved/not emitted yet.

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.

No issues found across 2 files

@fahe1em1
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@fahe1em1
Copy link
Author

recheck

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: Todo

Development

Successfully merging this pull request may close these issues.

Docs needed: CLI Hooks System for Event Interception

1 participant