Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.239 Home All releases olderv2.1.238 v2.1.240newer
Claude Code v2.1.239

Deleted working directories are detected at startup and handled during hooks

You'll notice
Useful4 Signal2
Startup

If your working directory is deleted, you get a plain explanation and hooks fall back elsewhere.

What

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.

Details
  • 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 ".
Evidence

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.

See this entry in the whole of v2.1.239 →