You'll noticeTier: how much it should matter to you
3Useful: my rating, 1 to 5
3Signal: worth watching, 1 to 5
HooksArea: what it touches
ImprovementsKind: in v2.1.287,
ImprovementsSection of the release
What
Hooks are your own commands that Claude Code runs automatically at certain moments, such as before or after a tool runs. Hook commands always used to start in the project folder. They can now be given a different starting folder, and the hook is then marked as starting outside the project.
When this happens, Claude Code sets GIT_CEILING_DIRECTORIES to that folder. This environment variable tells git where to stop looking upward. Git commands in the hook therefore do not find and use a repository in a parent folder.
Why
It is a safety measure. A hook running outside your project will not act on an unrelated git repository that happens to sit above it.
How sure we are
Something disagreesSomething we can check disagrees with this entry, or the writer said they could not settle it.
The writer flagged doubtIt is not clear what sets the different starting folder for a hook.