vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

Agent mode cannot edit files with remote-ssh extension

Open SalmaanP opened this issue 7 months ago • 7 comments

Type: Bug

I am using vscode with agent mode and remote-ssh plugin since my codebase is on a remote server. Remote-ssh version is latest 0.120.0

Here is what the ssh-config looks like

Host jumpbox
HostName y.y.y.y
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
User ec2-user

Host xxx
Hostname y.y.y.y
IdentityFile ~/.ssh/id_rsa
ProxyJump jumpbox
User xxxx

Whenever the agent wants to edit some file, it fails. I've included the output with the failure below. I've verified the file exists and it fails with any repository/file everytime. I've been able to reproduce this with a public hello world repository as well https://github.com/octocat/Hello-World

2025-06-03 11:46:53.346 [info] Using the Electron fetcher.
2025-06-03 11:46:53.346 [info] Initializing Git extension service.
2025-06-03 11:46:53.346 [info] vscode.git extension is not yet activated.
2025-06-03 11:46:53.423 [info] Logged in as xxxx
2025-06-03 11:46:54.602 [info] Got Copilot token for xxxx
2025-06-03 11:46:54.638 [info] copilot token chat_enabled: true, sku: copilot_for_business_seat
2025-06-03 11:46:54.638 [info] GitHub.vscode-pull-request-github extension is not yet activated.
2025-06-03 11:46:54.647 [info] Registering default platform agent...
2025-06-03 11:46:54.739 [info] Fetched model metadata in 126ms 868bb0e5-2c39-43ce-a7e5-b96b819fb915
2025-06-03 11:46:54.779 [info] activationBlocker from 'languageModelAccess' took for 1137ms
2025-06-03 11:46:54.968 [info] Fetched content exclusion rules in 319ms
2025-06-03 11:47:24.160 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:47:24.160 [info] request done: requestId: [c52a4bcf-b207-455a-8857-49630c8f0f68] model deployment ID: []
2025-06-03 11:47:24.319 [error] Error from tool read_file with args {"filePath": "/home/xxxx/Hello-World/README.go", "startLineNumberBaseZero": 0, "endLineNumberBaseZero": 10}: cannot open file:///home/xxxx/Hello-World/README.go. Detail: Unable to read file '/home/xxxx/Hello-World/README.go' (Error: Unable to resolve nonexistent file '/home/xxxx/Hello-World/README.go'): CodeExpectedError: cannot open file:///home/xxxx/Hello-World/README.go. Detail: Unable to read file '/home/xxxx/Hello-World/README.go' (Error: Unable to resolve nonexistent file '/home/xxxx/Hello-World/README.go')
    at n_e.$tryOpenDocument (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1276:8652)
2025-06-03 11:47:30.823 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:47:30.824 [info] request done: requestId: [c52a4bcf-b207-455a-8857-49630c8f0f68] model deployment ID: []
2025-06-03 11:47:31.035 [error] Error from tool create_file with args {"filePath": "/home/xxxx/Hello-World/README.go", "content": "package main\n\nimport \"fmt\"\n\n// Main function that prints \"Hello World!\" to the console\nfunc main() {\n\tfmt.Println(\"Hello World!\")\n}"}: Error: ENOTSUP: operation not supported on socket, mkdir '/home/xxxx': Unknown (FileSystemError) (FileSystemError): Error: ENOTSUP: operation not supported on socket, mkdir '/home/xxxx'
    at Function.e (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:18336)
    at Object.writeFile (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:16897)
    at Oj.invoke (/Users/xxxx/.vscode/extensions/github.copilot-chat-0.27.2/dist/extension.js:1167:2238)
    at YV.$invokeTool (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:2698)
2025-06-03 11:47:35.652 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:47:35.652 [info] request done: requestId: [c52a4bcf-b207-455a-8857-49630c8f0f68] model deployment ID: []
2025-06-03 11:47:42.677 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:47:42.678 [info] request done: requestId: [c52a4bcf-b207-455a-8857-49630c8f0f68] model deployment ID: []
2025-06-03 11:47:52.956 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:47:52.956 [info] request done: requestId: [c52a4bcf-b207-455a-8857-49630c8f0f68] model deployment ID: []
2025-06-03 11:49:06.051 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:49:06.052 [info] request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
2025-06-03 11:49:06.272 [error] Error from tool read_file with args {"filePath": "/home/xxxx/Hello-World/README.go", "startLineNumberBaseZero": 0, "endLineNumberBaseZero": 100}: cannot open file:///home/xxxx/Hello-World/README.go. Detail: Unable to read file '/home/xxxx/Hello-World/README.go' (Error: Unable to resolve nonexistent file '/home/xxxx/Hello-World/README.go'): CodeExpectedError: cannot open file:///home/xxxx/Hello-World/README.go. Detail: Unable to read file '/home/xxxx/Hello-World/README.go' (Error: Unable to resolve nonexistent file '/home/xxxx/Hello-World/README.go')
    at n_e.$tryOpenDocument (vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:1276:8652)
2025-06-03 11:49:12.271 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:49:12.271 [info] request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
2025-06-03 11:49:12.552 [error] Error from tool create_file with args {"filePath": "/home/xxxx/Hello-World/README.go", "content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello, World!\")\n}"}: Error: ENOTSUP: operation not supported on socket, mkdir '/home/xxxx': Unknown (FileSystemError) (FileSystemError): Error: ENOTSUP: operation not supported on socket, mkdir '/home/xxxx'
    at Function.e (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:18336)
    at Object.writeFile (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:16897)
    at Oj.invoke (/Users/xxxx/.vscode/extensions/github.copilot-chat-0.27.2/dist/extension.js:1167:2238)
    at YV.$invokeTool (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:2698)
2025-06-03 11:49:18.265 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:49:18.265 [info] request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
2025-06-03 11:49:18.410 [error] Error from tool create_file with args {"content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello, World!\")\n}", "filePath": "README.go"}: Invalid input path: README.go. Be sure to use an absolute path.: Error: Invalid input path: README.go. Be sure to use an absolute path.
    at as (/Users/xxxx/.vscode/extensions/github.copilot-chat-0.27.2/dist/extension.js:1143:1407)
    at Oj.prepareInvocation (/Users/xxxx/.vscode/extensions/github.copilot-chat-0.27.2/dist/extension.js:1167:3393)
    at YV.$prepareToolInvocation (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:3576)
    at f5.S (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:116111)
    at f5.Q (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:115891)
    at f5.M (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:114942)
    at f5.L (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:114085)
    at ed.value (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:112882)
    at P.B (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2373)
    at P.fire (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2591)
    at lo.fire (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:9458)
    at ed.value (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:225:3917)
    at P.B (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2373)
    at P.fire (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2591)
    at lo.fire (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:9458)
    at MessagePortMain.<anonymous> (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:225:2209)
    at MessagePortMain.emit (node:events:524:28)
    at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949)
    at Object.callbackTrampoline (node:internal/async_hooks:130:17)
2025-06-03 11:49:27.186 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:49:27.186 [info] request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
2025-06-03 11:49:27.347 [error] Error from tool list_dir with args {"path": "."}: Invalid input path: .. Be sure to use an absolute path.: Error: Invalid input path: .. Be sure to use an absolute path.
    at as (/Users/xxxx/.vscode/extensions/github.copilot-chat-0.27.2/dist/extension.js:1143:1407)
    at rY.prepareInvocation (/Users/xxxx/.vscode/extensions/github.copilot-chat-0.27.2/dist/extension.js:1172:6239)
    at YV.$prepareToolInvocation (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:3576)
    at f5.S (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:116111)
    at f5.Q (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:115891)
    at f5.M (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:114942)
    at f5.L (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:114085)
    at ed.value (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:112882)
    at P.B (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2373)
    at P.fire (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2591)
    at lo.fire (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:9458)
    at ed.value (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:225:3917)
    at P.B (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2373)
    at P.fire (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:27:2591)
    at lo.fire (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:29:9458)
    at MessagePortMain.<anonymous> (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:225:2209)
    at MessagePortMain.emit (node:events:524:28)
    at Object.MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2949)
    at Object.callbackTrampoline (node:internal/async_hooks:130:17)
2025-06-03 11:49:36.475 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:49:36.476 [info] request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
2025-06-03 11:49:43.417 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:49:43.417 [info] request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
2025-06-03 11:49:43.620 [error] Error from tool create_file with args {"content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello, World!\")\n}", "filePath": "/home/xxxx/Hello-World/README.go"}: Error: ENOTSUP: operation not supported on socket, mkdir '/home/xxxx': Unknown (FileSystemError) (FileSystemError): Error: ENOTSUP: operation not supported on socket, mkdir '/home/xxxx'
    at Function.e (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:18336)
    at Object.writeFile (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:16897)
    at Oj.invoke (/Users/xxxx/.vscode/extensions/github.copilot-chat-0.27.2/dist/extension.js:1167:2238)
    at YV.$invokeTool (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:2698)
2025-06-03 11:49:51.955 [info] message 0 returned. finish reason: [tool_calls]
2025-06-03 11:49:51.955 [info] request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []

Here's the prompt I used and the response

edit the readme.go file and put an example go hello world implementation there
I'll help you edit the README.go file with a sample Go "Hello World" implementation. First, let me check the current content of the file. I see that the README.go file might not exist yet or might be empty. I'll create it with a standard Go "Hello World" implementation. I apologize for the error. It seems there might be an issue with the file path. Let me try using a relative path instead. I apologize for the confusion. It appears we need to determine the correct file paths in your workspace. Let me list the current directory structure: Let me try using file search to locate the correct paths: Great! Now I know the exact location of the files. Let me edit the README.go file: I apologize for the continued issues. Let me try to determine the actual working directory and use a different approach: 

The same thing works fine if I'm using this on my local device without using remote-ssh plugin.

Extension version: 0.27.2 VS Code version: Code 1.100.3 (Universal) (258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3, 2025-06-02T13:30:54.273Z) OS version: Darwin arm64 24.5.0 Modes: Remote OS version: Linux x64 5.15.0-1058-aws

Logs
Trace: Resolving chat model
Trace: Resolved chat model
Trace: Built prompt
Trace: Sending prompt to model
Info: message 0 returned. finish reason: [tool_calls]
Info: request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
Trace: Resolving chat model
Trace: Resolved chat model
Trace: Resolving chat model
Trace: Resolved chat model
Debug: RunInTerminalTool: Invoking with options {"command":"pwd","explanation":"Finding the current working directory","isBackground":false}
Debug: RunInTerminalTool: Creating terminal with session ID `da3c7cf7-569c-4282-a4c2-285ceb081823`
Debug: RunInTerminalTool: Using `rich` execute strategy for command `pwd`
Debug: RunInTerminalTool#Rich: Executing command line `pwd`
Debug: RunInTerminalTool#Rich: Reading data stream
Debug: RunInTerminalTool#Rich: Waiting for done event
Debug: RunInTerminalTool#Rich: Data stream flushed
Debug: RunInTerminalTool#Rich: onDone via end event
Debug: RunInTerminalTool: Finished `rich` execute strategy with exitCode `0`, result.length `36`, error `undefined`
Trace: Resolving chat model
Trace: Resolved chat model
Trace: Resolving chat model
Trace: Resolved chat model
Trace: Built prompt
Trace: Sending prompt to model
Info: message 0 returned. finish reason: [tool_calls]
Info: request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
Trace: Resolving chat model
Trace: Resolved chat model
Trace: Resolving chat model
Trace: Resolved chat model
Error: Error from tool create_file with args {"content": "package main\n\nimport \"fmt\"\n\nfunc main() {\n\tfmt.Println(\"Hello, World!\")\n}", "filePath": "/home/spehlari/sig-tahoe/Hello-World/README.go"}: Error: ENOTSUP: operation not supported on socket, mkdir '/home/spehlari': Unknown (FileSystemError) (FileSystemError): Error: ENOTSUP: operation not supported on socket, mkdir '/home/spehlari'
    at Function.e (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:18336)
    at Object.writeFile (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:16897)
    at Oj.invoke (/Users/spehlari/.vscode/extensions/github.copilot-chat-0.27.2/dist/extension.js:1167:2238)
    at YV.$invokeTool (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:2698)
Trace: Resolving chat model
Trace: Resolved chat model
Trace: Built prompt
Trace: Sending prompt to model
Info: message 0 returned. finish reason: [tool_calls]
Info: request done: requestId: [993a98b4-eaa9-493c-a3b1-65928eba27d5] model deployment ID: []
Trace: Resolving chat model
Trace: Resolved chat model
Trace: Resolving chat model
Trace: Resolved chat model
Debug: RunInTerminalTool: Invoking with options {"explanation":"Creating README.go file with Go Hello World implementation","command":"cat > README.go  README.go import "fmt"

func main() { fmt.Println("Hello, World!") } EOFDebug: RunInTerminalTool#Rich: Executing command linecat > README.go << 'EOF' package main

import "fmt"

func main() { fmt.Println("Hello, World!") } EOF` Debug: RunInTerminalTool#Rich: Reading data stream Debug: RunInTerminalTool#Rich: Waiting for done event Debug: [context keys] Window state change. Needs offline check: false, active: true, focused: false. Debug: [context keys] Window state change. Needs offline check: false, active: true, focused: true.

System Info
Item Value
CPUs Apple M3 Pro (12 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 5, 5, 6
Memory (System) 18.00GB (0.22GB free)
Process Argv --crash-reporter-id 04789d2c-dcfd-4fa6-88f3-fe5d664aa31f
Screen Reader no
VM 0%
Item Value
Remote SSH: new-envoy
OS Linux x64 5.15.0-1058-aws
CPUs Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz (16 x 0)
Memory (System) 62.01GB (59.47GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dwnewjupyter:31046869
pythonrstrctxt:31112756
nativeloc1:31192215
5fd0e150:31155592
dwcopilot:31170013
6074i472:31201624
dwoutputs:31242946
customenabled:31248079
hdaa2157:31222309
copilot_t_ci:31222730
e5gg6876:31282496
pythoneinst12:31285622
bgtreat:31268568
4gafe986:31271826
c7cif404:31314491
pythonpulldiag:31316723
996jf627:31283433
pythonrdcb7:31303018
usemplatestapi:31297334
0aa6g176:31307128
7bj51361:31289155
747dc170:31275177
9hi5e907:31319474
pylancecolor:31314202
aj953862:31281341
generatesymbolt:31295002
convertfstringf:31295003
gendocf:31295004

SalmaanP avatar Jun 03 '25 18:06 SalmaanP

Mind sharing your Remote SSH logs, (from the Output Pane) after connecting? Anything unique about the remote machine (shared machine with funky filesystem perhaps?)

joshspicer avatar Jun 09 '25 18:06 joshspicer

The remote machine is indeed a shared machine with a few users, accessible through a jumpbox. Nothing funky about it though, its just Ubuntu 20.04.3 LTS

Remote SSH logs below

[11:57:12.645] Log Level: 2
[11:57:12.657] SSH Resolver called for "ssh-remote+new-envoy", attempt 1
[11:57:12.658] remote.SSH.useLocalServer = true
[11:57:12.658] remote.SSH.useExecServer = true
[11:57:12.658] remote.SSH.bindHost = {}
[11:57:12.658] remote.SSH.path = undefined
[11:57:12.659] remote.SSH.configFile = /Users/spehlari/Desktop/opendns_repo/sig-vagrant-stretch/sig-vagrant/sshconfig
[11:57:12.659] remote.SSH.useFlock = true
[11:57:12.659] remote.SSH.lockfilesInTmp = false
[11:57:12.659] remote.SSH.localServerDownload = auto
[11:57:12.659] remote.SSH.remoteServerListenOnSocket = false
[11:57:12.659] remote.SSH.defaultExtensions = []
[11:57:12.659] remote.SSH.defaultExtensionsIfInstalledLocally = []
[11:57:12.659] remote.SSH.loglevel = 2
[11:57:12.659] remote.SSH.enableDynamicForwarding = true
[11:57:12.659] remote.SSH.enableRemoteCommand = false
[11:57:12.659] remote.SSH.serverPickPortsFromRange = {}
[11:57:12.659] remote.SSH.serverInstallPath = {}
[11:57:12.659] remote.SSH.permitPtyAllocation = false
[11:57:12.659] remote.SSH.preferredLocalPortRange = undefined
[11:57:12.659] remote.SSH.useCurlAndWgetConfigurationFiles = false
[11:57:12.659] remote.SSH.experimental.chat = false
[11:57:12.659] remote.SSH.experimental.enhancedSessionLogs = false
[11:57:12.659] remote.SSH.httpProxy = {}
[11:57:12.659] remote.SSH.httpsProxy = {}
[11:57:12.664] VS Code version: 1.100.3
[11:57:12.664] Remote-SSH version: [email protected]
[11:57:12.664] darwin arm64
[11:57:12.715] SSH Resolver called for host: new-envoy
[11:57:12.715] Setting up SSH remote "new-envoy"
[11:57:12.720] Acquiring local install lock: /var/folders/vj/g51m9r097g57kyf5yxjrwtkm0000gn/T/vscode-remote-ssh-9243f917-install.lock
[11:57:12.721] Looking for existing server data file at /Users/spehlari/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9243f917-258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3-0.120.0-es/data.json
[11:57:12.721] No existing data file
[11:57:12.722] Using commit id "258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3" and quality "stable" for server
[11:57:12.722] Extensions to install: 
[11:57:12.724] Install and start server if needed
[11:57:12.726] PATH: /opt/homebrew/opt/openjdk@11/bin:/Applications/CMake.app/Contents/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.13/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/usr/local/go/bin:/Users/spehlari/.orbstack/bin:/Users/spehlari/bin:/Users/spehlari/go/bin:/Applications/Docker.app/Contents/Resources/bin/
[11:57:12.726] Checking ssh with "ssh -V"
[11:57:12.759] > OpenSSH_9.9p2, LibreSSL 3.3.6

[11:57:12.760] Using SSH config file "/Users/spehlari/Desktop/opendns_repo/sig-vagrant-stretch/sig-vagrant/sshconfig"
[11:57:12.760] askpass server listening on /var/folders/vj/g51m9r097g57kyf5yxjrwtkm0000gn/T/vscode-ssh-askpass-a6ad50ebee2b73b1fcb8a13208c9b4aea693c456.sock
[11:57:12.761] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/vj/g51m9r097g57kyf5yxjrwtkm0000gn/T/vscode-ssh-askpass-eeb9d44630903153b28018d6a74bb189b3505cfa.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","55591","-o","ConnectTimeout=15","-F","/Users/spehlari/Desktop/opendns_repo/sig-vagrant-stretch/sig-vagrant/sshconfig","new-envoy"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/spehlari/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9243f917-258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3-0.120.0-es/data.json"}
[11:57:12.761] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.9e4DEXdq5T/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/spehlari/.vscode/extensions/ms-vscode-remote.remote-ssh-0.120.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"","VSCODE_SSH_ASKPASS_MAIN":"/Users/spehlari/.vscode/extensions/ms-vscode-remote.remote-ssh-0.120.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/vj/g51m9r097g57kyf5yxjrwtkm0000gn/T/vscode-ssh-askpass-a6ad50ebee2b73b1fcb8a13208c9b4aea693c456.sock"}
[11:57:12.761] Spawned 57530
[11:57:12.764] Using connect timeout of 17 seconds
[11:57:12.831] > local-server-1> Running ssh connection command: ssh -v -T -D 55591 -o ConnectTimeout=15 -F /Users/spehlari/Desktop/opendns_repo/sig-vagrant-stretch/sig-vagrant/sshconfig new-envoy
[11:57:12.832] > local-server-1> Spawned ssh, pid=57541
[11:57:12.835] stderr> OpenSSH_9.9p2, LibreSSL 3.3.6
[11:57:12.843] stderr> OpenSSH_9.9p2, LibreSSL 3.3.6
[11:57:13.081] stderr> debug1: Server host key: ssh-ed25519 SHA256:kMVfctU58VOq7IfJpklNf3Htlt3dTi2cZ0wtjlnYd/U
[11:57:13.462] stderr> Authenticated to 184.169.206.254 ([184.169.206.254]:22) using "publickey".
[11:57:14.118] stderr> debug1: Server host key: ssh-ed25519 SHA256:GRGQqBeFwzonSsehSEvDhV6dQE+c9c1OK9XFhYPqKW4
[11:57:14.351] stderr> Authenticated to 10.30.23.21 (via proxy) using "publickey".
[11:57:15.173] > Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.15.0-1058-aws x86_64)
> 
>  * Documentation:  https://help.ubuntu.com
>  * Management:     https://landscape.canonical.com
>  * Support:        https://ubuntu.com/advantage
> 
>   System information as of Mon Jun  9 18:57:14 UTC 2025
> 
>   System load:  0.3                 Processes:                261
>   Usage of /:   96.7% of 484.63GB   Users logged in:          1
>   Memory usage: 5%                  IPv4 address for docker0: 172.17.0.1
>   Swap usage:   0%                  IPv4 address for ens5:    10.30.23.21
> 
>   => / is using 96.7% of 484.63GB
> 
>  * Ubuntu Pro delivers the most comprehensive open source security and
>    compliance features.
> 
>    https://ubuntu.com/aws/pro
> 
> 113 updates can be applied immediately.
> To see these additional updates run: apt list --upgradable
> 
> Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
> applicable law.
> 
> New release '22.04.5 LTS' available.
> Run 'do-release-upgrade' to upgrade to it.
> 
> 
> *** System restart required ***
[11:57:15.228] > ready: f961a5c070f2
[11:57:15.287] > Linux 5.15.0-1058-aws #64~20.04.1-Ubuntu SMP Tue Apr 9 11:12:27 UTC 2024
[11:57:15.287] Platform: linux
[11:57:15.340] > /bin/bash
[11:57:15.341] Parent Shell: bash
[11:57:15.341] Parent Shell pid: 57530
[11:57:15.341] Waiting for subshell to start
[11:57:15.394] Waiting for subshell to start
[11:57:15.395] > 1041040
[11:57:15.396] stdout -> '1041040'
[11:57:15.396] sub-process detected
[11:57:15.453] > 1041040
[11:57:15.556] > f961a5c070f2: running
> Script executing under PID: 1041040
[11:57:15.611] > Found existing installation at /home/spehlari/.vscode-server...
> Starting VS Code CLI...
> Removing old logfile at /home/spehlari/.vscode-server/.cli.258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3.log
> Spawned remote CLI: 1041064
> Waiting for server log...
> Waiting for server log...
[11:57:15.662] > f961a5c070f2: start
> listeningOn==127.0.0.1:45583==
> osReleaseId==ubuntu==
> arch==x86_64==
> vscodeArch==x64==
> bitness==64==
> tmpDir==/run/user/1003==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> serverStartTime==70==
> execServerToken==a1a1a111-1aa1-111a-111a-a11a1111aaaa==
> platformDownloadPath==cli-alpine-x64==
> SSH_AUTH_SOCK====
> DISPLAY====
> f961a5c070f2: end
[11:57:15.663] Received install output: 
listeningOn==127.0.0.1:45583==
osReleaseId==ubuntu==
arch==x86_64==
vscodeArch==x64==
bitness==64==
tmpDir==/run/user/1003==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
serverStartTime==70==
execServerToken==a1a1a111-1aa1-111a-111a-a11a1111aaaa==
platformDownloadPath==cli-alpine-x64==
SSH_AUTH_SOCK====
DISPLAY====

[11:57:15.663] Remote server is listening on port 45583
[11:57:15.663] Parsed server configuration: {"serverConfiguration":{"remoteListeningOn":{"port":45583},"osReleaseId":"ubuntu","arch":"x86_64","sshAuthSock":"","display":"","tmpDir":"/run/user/1003","platform":"linux","execServerToken":"a1a1a111-1aa1-111a-111a-a11a1111aaaa"},"serverStartTime":70,"installUnpackCode":""}
[11:57:15.665] Persisting server connection details to /Users/spehlari/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-9243f917-258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3-0.120.0-es/data.json
[11:57:15.670] Starting forwarding server. local port 55616 -> socksPort 55591 -> remotePort 45583
[11:57:15.670] Forwarding server listening on port 55616
[11:57:15.670] Waiting for ssh tunnel to be ready
[11:57:15.671] Tunneled port 45583 to local port 55616
[11:57:15.671] Resolved "ssh-remote+new-envoy" to "port 55616"
[11:57:15.675] Initizing new exec server for ssh-remote+new-envoy
[11:57:15.675] Resolving exec server at port 55616
[11:57:15.676] [Forwarding server port 55616] Got connection 0
[11:57:15.677] [Forwarding server port 55616] Got connection 1
[11:57:15.896] Exec server for ssh-remote+new-envoy created and cached
[11:57:15.896] Extensions to install: 
[11:57:15.902] ------




[11:57:15.902] No hints found in the recent session.
[11:57:15.970] [server] Checking /home/spehlari/.vscode-server/cli/servers/Stable-258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3/log.txt and /home/spehlari/.vscode-server/cli/servers/Stable-258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3/pid.txt for a running server...
[11:57:16.027] [server] Installing and setting up Visual Studio Code Server...
[11:57:16.027] [server] Server setup complete
[11:57:16.027] [server] Starting server...
[11:57:16.027] [server] Starting server with command... Command { std: "/home/spehlari/.vscode-server/cli/servers/Stable-258e40fedc6cb8edf399a463ce3a9d32e7e1f6f3/server/bin/code-server" "--connection-token=remotessh" "--accept-server-license-terms" "--start-server" "--enable-remote-auto-shutdown" "--socket-path=/tmp/code-766e8879-0d8b-4285-92c6-80cbc4667e86", kill_on_drop: false }
[11:57:16.317] [server] *
[11:57:16.321] [server] * Visual Studio Code Server
[11:57:16.321] [server] *
[11:57:16.321] [server] * By using the software, you agree to
[11:57:16.321] [server] * the Visual Studio Code Server License Terms (https://aka.ms/vscode-server-license) and
[11:57:16.321] [server] * the Microsoft Privacy Statement (https://privacy.microsoft.com/en-US/privacystatement).
[11:57:16.321] [server] *
[11:57:16.368] [server] Server bound to /tmp/code-766e8879-0d8b-4285-92c6-80cbc4667e86
[11:57:16.368] [server] Extension host agent listening on /tmp/code-766e8879-0d8b-4285-92c6-80cbc4667e86
[11:57:16.368] [server] parsed location: "/tmp/code-766e8879-0d8b-4285-92c6-80cbc4667e86"
[11:57:16.368] [server] 
[11:57:16.368] [server] Server started
[11:57:16.417] [server] [18:57:16] 
[11:57:16.417] [server] 
[11:57:16.417] [server] 
[11:57:16.417] [server] 
[11:57:16.500] [server] [18:57:16] Extension host agent started.
[11:57:16.736] [server] [18:57:16] [<unknown>][49b83811][ExtensionHostConnection] New connection established.
[11:57:16.796] [server] [18:57:16] [<unknown>][a10a0ccb][ManagementConnection] New connection established.
[11:57:16.796] [server] [18:57:16] [<unknown>][49b83811][ExtensionHostConnection] <1041137> Launched Extension Host Process.
[11:57:17.018] [server] [18:57:17] ComputeTargetPlatform: linux-x64
[11:57:19.406] [server] [18:57:19] ComputeTargetPlatform: linux-x64
[11:57:19.602] Opening exec server for ssh-remote+new-envoy
[11:57:20.004] Opening exec server for ssh-remote+new-envoy
[11:57:20.251] Verified and reusing cached exec server for ssh-remote+new-envoy
[11:57:20.251] No hints found in the recent session.
[11:57:20.438] Verified and reusing cached exec server for ssh-remote+new-envoy
[11:57:20.438] No hints found in the recent session.
[11:57:20.439] Opening exec server for ssh-remote+new-envoy
[11:57:20.516] Verified and reusing cached exec server for ssh-remote+new-envoy
[11:57:20.516] No hints found in the recent session.
[11:57:21.464] [server] [18:57:21] Getting Manifest... github.copilot
[11:57:21.521] [server] [18:57:21] Installing extension: github.copilot {
[11:57:21.521] [server]   productVersion: { version: '1.100.3', date: '2025-06-02T13:30:54.273Z' },
[11:57:21.522] [server]   pinned: false,
[11:57:21.522] [server]   operation: 3,
[11:57:21.522] [server]   isApplicationScoped: false,
[11:57:21.522] [server]   donotVerifySignature: false,
[11:57:21.522] [server]   context: { clientTargetPlatform: 'darwin-arm64' },
[11:57:21.522] [server]   profileLocation: _r {
[11:57:21.522] [server]     scheme: 'file',
[11:57:21.522] [server]     authority: '',
[11:57:21.522] [server]     path: '/home/spehlari/.vscode-server/extensions/extensions.json',
[11:57:21.522] [server]     query: '',
[11:57:21.522] [server]     fragment: '',
[11:57:21.522] [server]     _formatted: 'file:///home/spehlari/.vscode-server/extensions/extensions.json',
[11:57:21.522] [server]     _fsPath: '/home/spehlari/.vscode-server/extensions/extensions.json'
[11:57:21.522] [server]   }
[11:57:21.522] [server] }
[11:57:21.791] [server] [18:57:21] Getting Manifest... github.copilot-chat
[11:57:23.229] [server] [18:57:23] Extension signature verification result for github.copilot: Success. Internal Code: 0. Executed: true. Duration: 975ms.
[11:57:23.842] [server] [18:57:23] Extracted extension to file:///home/spehlari/.vscode-server/extensions/github.copilot-1.330.0: github.copilot
[11:57:23.894] [server] [18:57:23] Renamed to /home/spehlari/.vscode-server/extensions/github.copilot-1.330.0
[11:57:23.894] [server] [18:57:23] Marked extension as removed github.copilot-1.326.0
[11:57:23.945] [server] [18:57:23] Extension installed successfully: github.copilot file:///home/spehlari/.vscode-server/extensions/extensions.json
[12:02:16.479] [server] New EH opened, aborting shutdown
[12:02:16.481] [server] [19:02:16] New EH opened, aborting shutdown

SalmaanP avatar Jun 09 '25 19:06 SalmaanP

Our team has the same problem with a Windows to remote RHEL8 connection. Agent mode cannot edit files (same messages shown as reported here).

It even tries to open Powershell on the RHEL8 host (via terminal) when the default terminal is set to bash. This attempt to open Powershell fails and the agent gives up.

Scar-on-gh avatar Jun 11 '25 00:06 Scar-on-gh

I'm also having this issue. Everything works fine locally, but on the remote server the agent is unable to create or edit files - it tries to work around this by asking to run commands in the terminal to create and edit files. I've tried re-installing everything and it didn't fix it.

Here is the error:

2025-06-11 12:22:40.205 [error] Error from tool create_file with args {"filePath": "/home/[hidden-path]/INSTRUCTIONS.md", "content": "# Shaw App Instructions\n\nThis is a test file to verify the create_file tool works in this remote SSH environment.\n\n## Test Content\n- Created via Copilot create_file tool\n- Date: June 11, 2025\n- Environment: Remote SSH session"}: Error: ENOTSUP: operation not supported on socket, mkdir '/home/[hidden]': Unknown (FileSystemError) (FileSystemError): Error: ENOTSUP: operation not supported on socket, mkdir '/home/[hidden]'
    at Function.e (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:18336)
    at Object.writeFile (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:119:16897)
    at Oj.invoke (/Users/[user]/.vscode/extensions/github.copilot-chat-0.27.3/dist/extension.js:1167:2238)
    at YV.$invokeTool (file:///Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:151:2698)

UPDATE: it seems that in the remote session the file tool is still referencing my local filesystem. Is there a way to force it to work with the remote filesystem?

di-rse avatar Jun 11 '25 10:06 di-rse

I managed to fix this by creating a .vscode directory in the workspace folder on the remote server, then adding the following to a settings.json file in that folder:

{
  "remote.extensionKind": {
    "GitHub.copilot": ["workspace"],
    "GitHub.copilot-chat": ["workspace"]
  },
  "github.copilot.advanced": {
    "debug.overrideEngine": "copilot-chat",
    "debug.useNodeRuntime": true,
    "debug.testOverrideProxyUrl": "",
    "debug.filterLogCategories": []
  },
  "github.copilot.enable": {
    "*": true,
    "plaintext": false,
    "markdown": true,
    "scminput": false
  }
}

Had to then do a full restart of vscode to get it to work.

di-rse avatar Jun 11 '25 12:06 di-rse

@di-rse I think your settings are maybe just restoring things to the default:

"remote.extensionKind": {
  "GitHub.copilot": ["workspace"],
  "GitHub.copilot-chat": ["workspace"]
}

These extensions are run in the workspace by default. I'm guessing that like me you followed some guide telling you to put this in your user settings:

"remote.extensionKind": {
  "GitHub.copilot": ["ui"],
  "GitHub.copilot-chat": ["ui"]
}

This just tells copilot what sorts of files to do autocomplete in:

"github.copilot.enable": {
  "*": true,
  "plaintext": false,
  "markdown": true,
  "scminput": false
}

Curious where you got the advanced settings from though. I'm not sure what those do.

My experience is that copilot doesn't work by default on remotes behind the AMD VPN and to get it to work, you need to add these settings to have it run locally instead:

"remote.extensionKind": {
  "GitHub.copilot": ["ui"],
  "GitHub.copilot-chat": ["ui"]
}

So those settings have crept into our setup instructions. This makes it mostly work, but it breaks some of its interactions with the remote workspace, which is what you're seeing here and I'm seeing in https://github.com/microsoft/vscode/issues/253532. For remotes not behind the VPN you can revert this with:

"remote.extensionKind": {
  "GitHub.copilot": ["workspace"],
  "GitHub.copilot-chat": ["workspace"]
}

(I would recommend putting this in your remote settings rather than your workspace settings, so they will apply to any workspace on the remote). Or if you use remotes off the VPN more frequently, you can delete the remote.extensionKind settings from your user settings and instead add them only to the remote settings for the on-VPN remotes.

GMNGeoffrey avatar Aug 19 '25 18:08 GMNGeoffrey

Same situation here. cannot correctly edit a remote file under agent mode if GitHub.copilot-chat are set to both "workspace" and "ui", which is nevertheless necessary when the remote machine cannot connect to Copilot (such as due to internal vpn) and must request through local machine.

stellaludai avatar Oct 11 '25 09:10 stellaludai