The whole hunk
from line 2746, 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 2746
27462746
27472747* You pass a directory with the `--add-dir` startup flag; [SessionStart](#sessionstart) covers those directories
27482748* You add a directory on the `/permissions` Workspace tab
2749* You add a directory that is already a working directory; the add fails with an error
2749* You add a directory that is already a working directory or inside one
27502750
27512751Claude Code fires DirectoryAdded after refreshing sandbox and permission state, so sandboxed tools already see the new directory when your hook runs. Hook commands themselves run unsandboxed.
27522752
from line 2813
28132813}
28142814```
28152815
2816The hook reads the changed file's absolute path from the `file_path` field of the [JSON input](#filechanged-input) on stdin. Its `grep` guard tests for the same thing `perl` remo
2816The hook reads the changed file's absolute path from the `file_path` field of the [JSON input](#filechanged-input) on stdin. Its `grep` guard tests for the same thing `perl` removes, a CR at th