Hooks reference changedhooks
Nearest release: v2.1.258, published 2 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+3added
Lines−1removed
From line
1,896
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits129to this page, all time
The whole hunk
from line 1896, old and new numbered
/
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 1896
18961896| `removeDirectories` | `directories`, `destination` | Removes working directories |
18971897
18981898<Note>
1899 `setMode` with `bypassPermissions` only takes effect if the session was launched with bypass mode already available: `--dangerously-skip-permissions`, `--permission-mode bypassPermissions`, `--allow-dangerously-skip-permissions`, or `permissions.defaultMode: "bypassPermissions"` in settings, and the mode is not disabled by [`permissions.disableBypassPermissionsMode`](/docs/en/permissions#managed-settings) or by starting the session in [restricted mode](/docs/en/cli-reference#cli-flags). Otherwise the update is a no-op. `bypassPermissions` is never persisted as `defaultMode` regardless of `destination`.
1899 `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](/docs/en/settings-reference#permissions-defaultmode). Otherwise the update is a no-op. The update is also a no-op when [`permissions.disableBypassPermissionsMode`](/docs/en/permissions#managed-settings) disables the mode, or when the session starts in [restricted mode](/docs/en/cli-reference#cli-flags).
1900
1901 `bypassPermissions` is never persisted as `defaultMode` regardless of `destination`.
19001902</Note>
19011903
19021904The `destination` field on every entry determines whether the change stays in memory or persists to a settings file.
from line 2821
28192821fi
28202822```
28212823
2822To confirm the hook works, ask Claude to append a CRLF line to `data.csv` with a `Bash` command. Claude Code runs the hook and the file ends up with LF endings.
2823
2824To watch files you can't name up front, return [`watchPa
2824To confirm the hook works, ask Claude to append a CRLF line to `data.csv` with a `Bash` command. Claude Code r
No line in this hunk matches that.