Follow Discord
Sweep 10 Nov 2026 · 02:18Z Build v2.1.322 539 read Stable v2.1.311 Latest v2.1.322 Next v2.1.322 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · claude-code

Hooks reference changedhooks

Nearest release: v2.1.322, published an hour before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Upstream edited this page at 10 Nov 2026 03:14 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 10 Nov 2026 03:37 UTC.

Upstream edited
Recorded here
Lines+8added
Lines−0removed
From line 2,206 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits136to this page, all time

The whole hunk

from line 2206, old and new numbered
/
lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 2206
22062206| `addDirectories` | `directories`, `destination` | Adds working directories. `directories` is an array of path strings |
22072207| `removeDirectories` | `directories`, `destination` | Removes working directories |
22082208 
2209In `rules`, for a [permission rule](https://code.claude.com/docs/en/permissions.md#permission-rule-syntax) written `Tool(specifier)`, `toolName` is the tool's name and `ruleContent` is the specifier:
2210 
2211* `Bash(npm test)`: `{ "toolName": "Bash", "ruleContent": "npm test" }`
2212* `Bash` or `Bash(*)`: `{ "toolName": "Bash" }`, because both match the whole tool
2213* `mcp__github__get_issue`: `{ "toolName": "mcp__github__get_issue" }`
2214 
2215Leave `ruleContent` out of an allow rule for an [MCP tool](https://code.claude.com/docs/en/permissions.md#mcp). If you add it, the rule doesn't match any call.
2216 
22092217> [!NOTE]
22102218>
22112219> `setMode` with `bypassPermissions` only takes effect if you launched the session with bypass mode already available: `--dangerously-skip-permissions`, `--permission-mode bypassPermissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in [user, `--settings`, or managed settings](https://code.claude.com/docs/en/settings-reference#permissions-defaultmode). Otherwise the update is a no-op. The update is also a no-op when [`permissions.disableBypassPermissionsMode`](https://code.claude.com/docs/en/permissions#managed-settings) disables the mode, or when the session starts in [restricted mode](https://code.claude.com/docs/en/cli-reference.md#cli-flags).
from line 3716
37083716| :- | :- | :- |
37093717| Answer for the user | `"action": "accept"`, with the form field values in `content` | `accept` with your `content` |
37103718| Decline the request | `"action": "decline"` | `decline` |
3711| Cancel the request | `"action": "cancel"` | `cancel` |
3712| Leave the request to the user | No output, with exit code 0 | The user's answer from the [dialog](https://code.claude.com/docs/en/mcp.md#respond-to-mcp-elicitation-requests) |
3713 
3714This output answers the form-mode request shown under [Elicitation input](#elicitation-input). The keys in `content` are the property names from that request's `requested_schema`:
3715 
3716```json theme={null}
3717{
3718 "hookSpecificOutput": {
3719 "hookEventName": "Elicitation",
3720 "action": "accept",
3721 "content": {
3722 "username": "alice"
3723 }
3724 }
3725}
3726```
3727 
3728This output declines a re
3719| Cancel the request |
Feedback