Skip to content

ENOENT: no such file or directory, scandir Claude Code

Quick fix

In VSCode Remote SSH, configure Claude Code authentication on the remote Linux server and create missing directories; local settings do not sync.

Error output
Error: Error: ENOENT: no such file or directory, scandir '/home/jack22/.claude/skills'

When using VSCode Remote SSH to connect to a Linux server, the Claude Code extension and its backend processes run in the remote Linux environment, not on local Windows. Therefore, login-free configuration changed by cc-switch on local Windows, such as `~/.claude.json` or environment variables, has no effect on the remote server. Claude Code on the remote server cannot find authentication information, throws `Could not resolve authentication method`, and asks for login. Also, because the remote server may be a fresh environment, default directories such as `~/.claude/skills` may be missing, causing an `ENOENT` error at startup.

  1. Open a terminal on the remote Linux server and create the missing skills directory to clear the `ENOENT` error: ```bash mkdir -p ~/.claude/skills ```

  2. Sync authentication configuration on the remote server. Copy the contents of the already configured local Windows `~/.claude.json` file to `~/.claude.json` on the remote server, or install and run cc-switch in the remote Linux environment to configure login-free access again.

ToolClaude Code
Version2.1.22
PlatformsWindowsLinux
Why does Remote SSH still require login when local Windows is already login-free?
VSCode Remote SSH runs the extension backend on the remote server. The remote server reads configuration from the Linux environment and cannot directly read local Windows configuration.
Does the ENOENT error make Claude Code unusable?
`ENOENT` only indicates that the skills directory is missing and does not crash the program. The actual blocking error is the later `Could not resolve authentication method` authentication failure.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.