microsoft / microsoft/vscode-remote-release
Remote-SSH: AI/Chat features attempt file operations on local Windows path instead of remote Mac, causing EPERM error
Nobody has claimed this yet.
- Dominant language
- Dockerfile
- Stars
- 4.2k
- Forks
- 469
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Is there an existing issue for this bug?
- I have searched the existing open issues and found none that apply.
- If I find any issue of interest that is related or closed, I will included a link to it in this issue.
Required Troubleshooting Steps
- I have read and performed the troubleshooting steps
- I have tried both values of the
remote.SSH.useLocalServersetting - My issue was not covered in the Tips and Tricks linked from the Troubleshooting Wiki.
- I will include a complete copy of my Remote - SSH logs by running Remote-SSH: Show Log in the command palette or from View > Output in the menu bar
[Optional] Diagnose with Copilot
I asked @remote-ssh but it did not help
In step 2 of the troubleshooting wiki, what was the result of running the generated SSH command verbatim outside of VS Code?
I did not try step 2 of the troubleshooting steps
Remote-SSH Log
Remote-SSH Log
[09:39:32.856] ConfigFileWatcher: closing vscode-remote://ssh-remote%2B7b22686f73744e616d65223a226769786f222c2275736572223a226b65696d697961636869227d/Users/<User>/<WS>/<PROJECT>/path/samplefile.py
[09:42:13.321] ConfigFileWatcher: closing ccsettings://root/schema.json
Expected Behavior
When connected via Remote-SSH, I expect AI/Chat features and API-based file operations in VSCode to create and edit files directly on the remote Mac file system, not on the local Windows file system.
Actual Behavior
AI/Chat features and API-based file operations in VSCode attempt to create files on the local Windows file system instead of the remote Mac. This results in EPERM errors and the files are not created on the remote machine.
Steps To Reproduce
- Open VSCode on Windows and connect to a Mac using Remote-SSH.
- Open the remote directory /Users// as the workspace.
- Use Copilot or AI chat features to attempt to create a file (e.g., hello.txt).
- Observe that the file creation fails with an EPERM error on the local Windows path, and the file is not created on the remote Mac.
devtools log:
log.ts:460 ERR ファイル '\Users\<USERNAME>/<WORKSPACE>\hello.txt' を書き込むことができません (NoPermissions (FileSystemError): Error: EPERM: operation not permitted, mkdir 'C:\Users\<USERNAME>'): Error: ファイル '\Users\<USERNAME>\<WORKSPACE>\hello.txt' を書き込むことができません (NoPermissions (FileSystemError): Error: EPERM: operation not permitted, mkdir 'C:\Users\<USERNAME>')
at Kkt.writeFile (
Anything else?
Overview
I'm using VSCode on Windows and connecting to a Mac via Remote-SSH.
The remote directory (/Users//) is opened as the workspace, and trusted folder settings are correctly configured.
However, when I use Copilot or AI chat features to create files (e.g., hello.txt), the operation is attempted on the local Windows path (e.g., C:\Users<USERNAME>) instead of the remote Mac, resulting in a permission error:
Error log (personal info masked)
Steps to Reproduce
Use VSCode on Windows and connect to a Mac via Remote-SSH
Open /Users// on the Mac as the workspace
Attempt to create a file (e.g., hello.txt) using Copilot or AI chat features
File creation fails with EPERM error on the local Windows path
Expected Behavior
When connected via Remote-SSH, AI/Chat features and API-based file operations should target the remote Mac file system, not the local Windows file system.
Actual Behavior
AI/Chat features attempt file operations on the local Windows path, resulting in EPERM errors.
Additional Info
Remote-SSH connection is working correctly (settings.json is saved and monitored on the remote Mac)
Trusted folder settings are properly configured
Both VSCode and Remote-SSH extension are up to date
Developer Tools console and Remote-SSH logs available upon request
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with VS Code on Windows connected to a Mac through Remote-SSH, opening the remote /Users// directory and using Copilot or AI chat to create hello.txt. Review the Remote-SSH log and Developer Tools console; done means file operations target the remote Mac rather than a local Windows path and no local EPERM error occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100