Remote dev for container fail to open

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Failed to read .gitconfig: TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined
2026-03-08 12:26:16.255 [error] Error resolving dev container authority The “path” argument must be of type string. Received undefined

Steps to Reproduce

attach to running container

Operating System

Linux

Version Information

latest one

Does this stop you from using Cursor

Yes - Cursor is unusable

1 Like

Hey, this is a known issue. We’ve seen it reported before in this thread with the exact same error. The extension team looked into it, but they can’t reproduce it consistently.

A couple of questions to help narrow this down:

  1. Can you share the exact Cursor version? (Help > About Cursor > Copy)
  2. Are you attaching to a local Docker container directly, or are you going through Remote SSH first?

One workaround that sometimes helps is to make sure ~/.gitconfig exists on the host machine where Docker is running:

git config --global user.name "Your Name"
git config --global user.email "[email protected]"

If that’s already set up, try checking that the HOME environment variable is set correctly:

echo $HOME

If it returns empty or something unexpected, that would explain why the path resolves to undefined.

Let me know the version details and I’ll follow up.

I think I’ve found how to replicate it:

  1. Attach to docker host
  2. Call Attach to running container and jump in one
    1. from within that container call again Attach to running container and jump into another one
    2. Now I get Failed to read .gitconfig

The solution is to not execute the command from containers (guests) but only from a host.

Via the normal command mode you can’t attach to a container from other containers, but if you have a keyboard shortcut set to remote-containers.attachToRunningContainerFromViewlet it will try to.

Hi Rie, I have experienced this issue in the latest cursor release

Version: 2.6.18 (user setup)
VSCode Version: 1.105.1
Commit: 68fbec5aed9da587d1c6a64172792f505bafa250
Date: 2026-03-10T02:01:17.430Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26100

The issue comes from a nested dev container (Windows host → ssh to remote dev machine → Tries to build dev container based on a Docker image.

Under which scenario there is no way to identify whether $HOME exists as the terminal/connection is already broken at the time it stops. Even if I ssh to the remote host and run echo $HOME this is not very useful because your ssh connection might be different.

I just reopen the last container dev env and don’t do anything else, but still meet this problem.

I manually set gitconfig in host and mount it in container.
BTW, vscode not have this issue, seems the problem is between cursor extension and vscode extension.

Hey, thanks for the update and for sharing the .gitconfig mount workaround. It’s helpful for other users in this thread.

Your note about the difference vs VS Code is an important signal. The issue is in our fork of the Dev Containers extension, where path resolution for $HOME breaks in certain scenarios. The team is aware of the bug, but there’s no ETA yet.

For now, mounting .gitconfig is the best workaround. We’ll update this thread if there’s a fix.

1 Like

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.