Search the documentation
6 pages for cwdchanged.
Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.
Intercept and control agent behavior with hooks
Claude Code CLI · in the page
agent-sdk/hooks
…| | `CwdChanged` | No | Yes | The working directory changes during a sessi…
Agent SDK reference - TypeScript
Claude Code CLI · in the page
agent-sdk/typescript
…| "WorktreeCreate" | "WorktreeRemove" | "InstructionsLoaded" | "CwdChanged" | "FileChanged" | "MessageDisplay"; ``` ### `HookCallback` Hook callback function type. ```typescript theme={nu…
Hooks reference
Claude Code CLI · in the page
hooks
…eate, WorktreeRemove, Notification, ConfigChange, InstructionsLoaded, CwdChanged, FileChanged, and DirectoryAdded as standalone async events, and MessageDisplay as a display-only event that runs while…
Automate actions with hooks
Claude Code CLI · in the page
hooks-guide
…k up those changes on its own. Pairing a `SessionStart` hook with a `CwdChanged` hook fixes this. `SessionStart` loads the variables for the directory you launch in, and `CwdChanged` reloads them eac…
Plugins reference
Claude Code CLI · in the page
plugins-reference
…| | `CwdChanged` | When the working directory changes, for example when Claude executes a `cd` command. Useful for reactive en…
Week 13 · March 23–27, 2026
Claude Code CLI · in the page
whats-new/2026-w13
…> drop-in directory for layered policy fragments</div> <div><code>CwdChanged</code> and <code>FileChanged</code> hook events for direnv-style setups</div> <div>Agents can declare <code>initial…