docs(cli): add hooks guide for event interception#11168
docs(cli): add hooks guide for event interception#11168siewcapital wants to merge 2 commits intocontinuedev:mainfrom
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
There was a problem hiding this comment.
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.
|
|
||
| ## Sync vs async | ||
|
|
||
| - Sync hooks are awaited and run in parallel with other sync hooks. |
There was a problem hiding this comment.
P2: Docs overstate sync hook awaiting semantics; SessionStart is mode-dependent (non-blocking in interactive startup, awaited in headless mode).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/cli/hooks.mdx, line 152:
<comment>Docs overstate sync hook awaiting semantics; `SessionStart` is mode-dependent (non-blocking in interactive startup, awaited in headless mode).</comment>
<file context>
@@ -0,0 +1,183 @@
+
+## Sync vs async
+
+- Sync hooks are awaited and run in parallel with other sync hooks.
+- Command hooks with `"async": true` are started and not awaited.
+- Async hooks are useful for telemetry or background notifications where you do not want to delay the main action.
</file context>
|
|
||
| ### Permission behavior | ||
|
|
||
| `AskQuestion` is `allow` by default in normal, plan, and auto modes. It does not modify files or run commands. |
There was a problem hiding this comment.
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.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/cli/tool-permissions.mdx, line 31:
<comment>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.</comment>
<file context>
@@ -12,7 +12,23 @@ Every tool has one of three permission levels:
+
+### Permission behavior
+
+`AskQuestion` is `allow` by default in normal, plan, and auto modes. It does not modify files or run commands.
## Overriding with flags
</file context>
Summary
docs/cli/hooks.mdxguide for the CLI hooks system.continueand.claudesettingsWhy
The hooks feature introduced in #11029 is tier-1 functionality, but there was no end-to-end user documentation for setup and behavior.
Validation
npm --prefix docs run buildcurrently fails in this environment becausemintlifyis not installed (sh: mintlify: command not found)Closes #11152
Summary by cubic
Adds a dedicated CLI Hooks guide and updates quickstart, tool permissions, and TUI docs (including the AskQuestion tool). This delivers end-to-end docs for the hooks system and meets the requirements of #11152.
Written for commit f3967ac. Summary will update on new commits.