If your working directory is deleted, you get a plain explanation and hooks fall back elsewhere.
What's wrong with this entry?
Claude Code now notices when the directory it is running from has been deleted or renamed instead of failing with an opaque error. At startup it stops and tells you plainly what happened, and once running, hooks that would have executed in the missing directory fall back to a directory that still exists and carry on.
- Starting Claude Code from a directory that no longer exists produces the message "The current directory no longer exists (it was deleted or moved). Start Claude Code from an existing directory."
- The startup check reads the current working directory and distinguishes a missing directory from other read failures, giving a different message for each.
- The startup check runs unconditionally, with no flag or setting to turn it on or off.
- Before each hook runs, Claude Code verifies the hook's working directory still exists.
- If it is gone, the hook falls back to the directory Claude Code was started in, then the project root, then your home directory, and runs there rather than failing.
- The fallback warns once per missing directory, using the message fragment " no longer exists; running hooks from ".
The current directory no longer exists (it was deleted or moved). Start Claude Code from an existing directory., no longer exists; running hooks from
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.234
Startup prefetch failures no longer surface
Both mention startup
-
v2.1.242
A socket path taken by another running Claude Code no longer breaks startup
Both mention startup
-
v2.1.246
Startup banner summarising what changed since you last read the release notes
Both mention startup