[DOCS] Missing documentation for `CwdChanged` and `FileChanged` hook events added in v2.1.83

Resolved 💬 2 comments Opened Mar 25, 2026 by coygeek Closed Mar 28, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/hooks
https://code.claude.com/docs/en/hooks-guide

Section/Topic

The hook events reference table (listing all available hook events and when they fire) and the "Hook events" section with per-event input schemas and decision control options.

Current Documentation

The hooks reference page lists the following events in its summary table:

SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, PostToolUseFailure, Notification, SubagentStart, SubagentStop, Stop, StopFailure, TeammateIdle, TaskCompleted, InstructionsLoaded, ConfigChange, WorktreeCreate, WorktreeRemove, PreCompact, PostCompact, Elicitation, ElicitationResult, SessionEnd.

No documentation currently exists for CwdChanged or FileChanged hook events.

What's Wrong or Missing?

Claude Code v2.1.83 added two new hook events — CwdChanged and FileChanged — for reactive environment management (e.g., integrating with direnv). Neither event appears anywhere in the hooks reference or hooks guide:

  • CwdChanged and FileChanged are absent from the event summary table in the hooks reference.
  • There are no per-event sections documenting their input schemas, when they fire, matcher support, or decision control behavior.
  • The hooks guide makes no mention of these events or the direnv / reactive environment management use case they enable.
  • Users have no way to discover these events or understand how to configure hooks for them.

Suggested Improvement

  1. Add CwdChanged and FileChanged to the event summary table in the hooks reference (https://code.claude.com/docs/en/hooks), with a clear description of when each fires. For example:

| Event | When it fires |
|---|---|
| CwdChanged | When the working directory changes during a session |
| FileChanged | When a file in the project changes outside of Claude's own edits |

  1. Add a dedicated subsection for each event in the "Hook events" section of the reference, documenting:
  • When the event fires
  • The full input schema (fields beyond common input fields)
  • Matcher support and example matcher values
  • Decision control options (whether it can block, and how)
  1. Add a practical example in the hooks guide (https://code.claude.com/docs/en/hooks-guide) showing a direnv integration using CwdChanged — this is the motivating use case called out in the changelog and helps users understand the reactive environment management pattern.

Impact

High - These are newly added hook events with no documentation at all. Users cannot discover, configure, or use CwdChanged or FileChanged hooks without documentation. The direnv/reactive environment use case is a common developer workflow that many users will want to automate.

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/hooks | Hook events summary table and per-event reference sections missing both new events |
| https://code.claude.com/docs/en/hooks-guide | No example or mention of the direnv / reactive environment management use case |

Total scope: 2 pages

Source: Changelog v2.1.83

Added CwdChanged and FileChanged hook events for reactive environment management (e.g., direnv)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗