[BUG] ENOENT error when opening repo — GitHub remote owner parsed as filesystem path

Resolved 💬 2 comments Opened Mar 18, 2026 by Thomase19 Closed Apr 15, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When opening a repo that has a GitHub remote, Claude Code fails with:
A system error occurred (ENOENT: no such file or directory, lstat '/Thomase19')
It appears Claude Code is extracting the owner/username from the git remote URL (git@github.com:Thomase19/complira.git) and treating it as a root-level filesystem path (/Thomase19), which obviously doesn't exist.
Claude Code works fine when no repo is open. The error only appears when this repo is opened in VS Code. The .git/config is completely standard with no unusual settings.

What Should Happen?

Claude Code should parse the GitHub remote URL to extract repo metadata (owner, repo name) without attempting to access the owner string as a filesystem path. Opening a repo with a standard git remote should work without errors.

Error Messages/Logs

A system error occurred (ENOENT: no such file or directory, lstat '/Thomase19')

[remote "origin"]
        url = git@github.com:Thomase19/complira.git
        fetch = +refs/heads/*:refs/remotes/origin/*

Steps to Reproduce

  1. Create or clone a repo with a GitHub remote containing a username in the URL:

git clone git@github.com:Thomase19/complira.git AuditAI

  1. Open the repo folder in VS Code
  2. Open Claude Code in VS Code
  3. Error appears immediately: A system error occurred (ENOENT: no such file or directory, lstat '/Thomase19')
  4. Close the repo (or open a folder outside any git repo) — Claude Code works fine again

The .git/config is a standard config with no custom settings. No .claude.json or CLAUDE.md present in the repo. The ~/.claude/settings.json has no project-specific overrides.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.77

Claude Code Version

2.1.78

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

macOS (MacBook Air)
Local folder name (AuditAI) differs from the remote repo name (complira) — unclear if relevant
Claude project cache was located at ~/.claude/projects/-Users-thomaseriksen-Desktop-AuditAI
~/.claude/settings.json contains only extraKnownMarketplaces and effortLevel: "high" — nothing project-specific
.claude/settings.local.json in the repo contains only standard bash permission rules — no unusual paths except valid absolute paths to the working directory
The error path /Thomase19 matches the owner portion of the git remote URL exactly (including capitalization)

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗