Omniscio

OmniscioGuidesThe current directory no longer exists

Claude Code: the current directory no longer exists

Last checked against Anthropic's documentation on November 21, 2026. By the Omniscio team. Updated .

What is the exact message?

The current directory no longer exists (it was deleted or moved). Start Claude Code from an existing directory.

Anthropic gives a second form of the same failure, and says the cause and the fix are the same for both:

error: The current working directory was deleted, so that command didn't work. Please cd into a different directory and try again.

A different reason for the same inability to read the working directory names its own error code:

Can't read the current directory (EACCES). Start Claude Code from a different directory.

What does it mean?

You started claude from a directory that was deleted or moved after your shell entered it. Anthropic's example is a worktree or temp directory another shell removed.

Claude Code cannot read its working directory, so it exits with code 1 before starting the session. That applies in interactive and non-interactive mode alike.

The third form is the same check failing for a different reason, such as a permissions change. On macOS, Anthropic says EPERM for a directory in ~/Desktop, ~/Documents, ~/Downloads or iCloud Drive usually means macOS is blocking your terminal app from that folder. Other commands that read the folder fail the same way: ls there reports Operation not permitted, even with sudo.

Before v2.1.239, Claude Code did not print this message. It crashed with an unreadable error instead: minified internal code and a raw ENOENT ... uv_cwd stack on the error output, which is the lookup of the working directory failing. Seeing the message means you are on a version that names the cause.

How do I fix it?

  1. Change to a directory that exists. Run cd ~, which goes to your home directory on macOS, Linux and PowerShell alike, then run claude again. The EACCES wording has the same fix: start from a directory that exists.
  2. If the directory was recreated at the same path, your shell still holds the deleted one. Run cd "$PWD", which makes the shell re-enter the path it holds so it picks up the recreated directory, or leave the directory and re-enter it, then run claude again.
  3. On macOS, for EPERM in a protected folder: quit your terminal app with Cmd+Q, open it again, return to that folder and run claude. If ls in the folder still fails, open System Settings > Privacy & Security > Files and Folders, turn that folder on for your terminal app, then reopen the terminal.

How do I know it is fixed?

  • Claude Code opens its interface, or answers the -p prompt, instead of exiting with code 1.
  • pwd in that shell prints the directory you expect, and the path exists in your file manager.
  • On macOS after the permission change, ls in the folder lists files rather than reporting Operation not permitted.

Where these answers come from

Common questions

Why does Claude Code say the current directory no longer exists?

You started claude from a directory that was deleted or moved after your shell entered it, such as a worktree or temp directory another shell removed. Claude Code cannot read its working directory, so it exits with code 1 before starting the session.

How do I fix the current directory error?

Change to a directory that exists and run claude again. If the directory was recreated at the same path, run cd "$PWD" or leave and re-enter it first, because your shell still holds the deleted one.

What does Can't read the current directory (EACCES) mean?

Anthropic lists it as the same failure for a different reason, such as a permissions change, with the same instruction: start Claude Code from a different directory.

Why does the folder fail on macOS with Operation not permitted?

For Desktop, Documents, Downloads or iCloud Drive, Anthropic says EPERM usually means macOS is blocking your terminal app from that folder. Other commands fail the same way, so ls there reports Operation not permitted even with sudo. Quit the terminal with Cmd+Q, reopen it, and grant the folder under System Settings, Privacy and Security, Files and Folders if needed.