Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

5 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 …treeCreate` hook is being removed | Clean up workspace resources | | `CwdChanged` | No | Yes | The working directory changes during a session | Reload environment variables per directory | | `FileChan… 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, PreModelSwitch as a standalone sequential event that runs… 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… Week 13 · March 23–27, 2026 Claude Code CLI · in the page whats-new/2026-w13 …y`managed-settings.d/` drop-in directory for layered policy fragments`CwdChanged` and `FileChanged` hook events for direnv-style setupsAgents can declare `initialPrompt` in frontmatter to auto-submit…
Feedback