Dev Containers over SSH: “Failed to install Cursor server: The 'path' argument must be of type string

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Hi. This bug was probably reported already. What is the ETA for a fix? Thanks.

Where does the bug appear?

Cursor IDE (latest version as of 5/26/26)

AnySphere Remote SSH

AnySphere Remote Containers / Dev Containers

Describe the Bug
I have a long‑running Docker container on a remote Linux host (HPC login node) that I’ve been using for months. Running Cursor IDE locally in Windows 11.
Attaching to this container with Microsoft Dev Containers used to work reliably.
After Cursor forced a switch to AnySphere Remote Containers and I removed the Microsoft Dev extensions, attaching to the same container fails with:

Failed to install Cursor server: The “path” argument must be of type string. Received undefined

dev‑container logs show:

text
2026-05-26 01:05:11.144 [info] Found attached container configuration: {}
2026-05-26 01:05:11.144 [info] Installing remote server in container…
2026-05-26 01:05:11.144 [error] Failed to read .gitconfig: TypeError [ERR_INVALID_ARG_TYPE]: The “path” argument must be of type string. Received undefined
2026-05-26 01:05:11.144 [error] Error resolving dev container authority The “path” argument must be of type string. Received undefined
2026-05-26 01:05:12.132 [info] Devcontainer CLI written to /tmp/devcontainer-cli-…

Steps to Reproduce

From Windows, open Cursor and connect via AnySphere Remote SSH to remote server.

From the host SSH window (not inside any container), run:
Dev Containers: Attach to Running Container

Select the running container

Wait for Cursor to try to “Installing remote server in container…”.

Expected Behavior

Failed to install Cursor server: The “path” argument must be of type string. Received undefined

Operating System

Windows 10/11

Version Information

Version: 3.5.33 (user setup)
VSCode Version: 1.105.1
Commit: aac81804b986d739acab348ed96b8bea6e83cc50
Date: 2026-05-22T06:47:48.039Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Does this stop you from using Cursor

Yes - Cursor is unusable

Hi Yuri!
This is a known bug with the Dev Containers extension when connecting through SSH. The same issue has been reported and tracked in this thread: Failed to install Cursor server: The “path” argument must be of type string. Received undefined

A couple of workarounds that have helped other users:

  1. Disable the Git config copy step – open Cursor Settings, search for dev.containers.copyGitConfig, and uncheck it. This bypasses the .gitconfig read that’s causing the error.

  2. Start the container manually with the devcontainers CLI, then attach from Cursor:

npx --yes @devcontainers/cli up --workspace-folder /path/to/your/workspace --remove-existing-container

Then use Dev Containers: Attach to Running Container in Cursor. This path is more stable than Reopen in Container.

Hi Mohit,

Thank you for the reply.
Fix 1 does not work because I cannot find dev.containers.copyGitConfig in Cursor settings. I believe it is MS extension setting. Anysphere extension does not have such option from what I got (and if it had it would have been a super easy fix)
Fix 2 will probably not work. I encounter error during “installing remote server in container” even on attach (see log). The devcontainers CLI doesn’t change that step; it only changes how the container is started.

Yuri

You’re right on both counts. The dev.containers.copyGitConfig setting is from the Microsoft Dev Containers extension and isn’t available in the AnySphere version. And the devcontainers CLI changes how the container starts, not the server installation step that’s failing. Apologies for the misdirection.

Unfortunately, there’s no reliable workaround for this bug right now. A few things other users have tried with mixed results:

  • Delete the Cursor server cache on the remote host and retry:
rm -rf ~/.cursor-server
  • Repeatedly click Reinstall Server or run Developer: Reload Window - this sometimes gets past the error after a few attempts, though it’s inconsistent.

None of these are reliable fixes. The root issue is in the extension’s home directory resolution during the SSH + Container handoff, and the engineering team is aware. I’ll follow up here when there’s progress.

Can you please give an update when you will be able to fix this issue?!

This one is still being tracked by our team - it’s a confirmed bug in how the Dev Containers extension resolves the home directory path during the SSH-to-container handoff, which is what triggers the path argument must be of type string error.

I don’t have an ETA to share yet, and to set expectations honestly: the workarounds posted earlier in this thread haven’t held up reliably for the SSH + attach case. I’ll post here as soon as there’s progress.