You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: Cannot run commands in terminal "The URL must be of scheme file" #8091
area:toolsRelates to tool usageide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on Windowsreleased
- OS: Windows 11
- Continue version: 1.2.7
- IDE version: 1.104.3
- Model: N/A
- config: N/A
Description
When working in .devcontainers continue.dev cannot run commands in the terminal
Attempt to run results in error
run_terminal_command failed with the message: The URL must be of scheme file
Please try something else or request further instructions.
Running commands in the terminal does work with the native Gitub Copilot extension so there must be some detection mechanism the extension can perform to know which URL scheme to use.
From my limited understanding VSCode uses URI schemes to represent resources in different contexts.
file:// - Local file system paths vscode-remote:// - Files inside remote environments (containers, SSH, WSL)
It seems continue.dev is hard-coded or not adapting to the environment it is running in and always using file:// when it should be using vscode-remote://
Although the error message "The URL must be of scheme file" makes it seem like it should be file:// but this may be misleading.
What did you mean by this?
I assume you were copying the command output and putting it back into the next prompt
I thought the extension already had access to read the terminal, but perhaps not. Maybe the error we see about attempts to send commands failing would also imply reading fails to, but those logs may be elsewhere.
I assume you were copying the command output and putting it back into the next prompt
Exactly, while working on WSL (which gives the exact same error as devcontainers) when it wants to run a command, i run it in my terminal and copy the results to the chat if necessary or just let it know I ran it.
I don't think the extension has access to the terminal I use but normally can run commands through tools and get the output and continue its work. In addition to VSCode, Gemini Code Assist can work in WSL (probably in devcontainers too) without any problems.
If you update the extensionKind to workspace you can install the extension into the remote workspace like WSL or a container. We need to solve for the extension proxy bridge to be able to run terminal commands remotely along with some kind of jetbrains solution as well. We also need to solve for terminal commands running remotely while file edits are local and synced into the remote workspace which might have some to be tested side effects.
fwiw, I just ran into this. I got into trying to solve for it just enough to narrow it to wsl2, too. Creating a .vscode/settings.json with the following contents, which added the ability to turn on console for just wsl2, which it did with correct scope. The agent still could not execute without the 'scheme file' error. I closed VS Code and re-opened through the Windows shortcut instead and it functions fine outside of wsl2 mode, as well as on my native Ubuntu workstation.
Same issue using devcontainers on Ubuntu.
Easiest workaround for me was to navigate to do this VSCode Extensions > Continue > Settings > Add to devcontainer.json.
Then I uninstalled the extension from my local extensions (backing up my config.yaml), rebuild the devcontainer, restored my config.yaml and the agent can now execute terminal commands.
I tried using plugins like Github Copilot and Augment, which can execute commands via remote SSH. I wonder if Continue has any optimization plans for this?
(I tried to modify/replace the input to use "file://" instead of "vscode-remote://", then it goes past this line, but I am unable to generate any path which would work then (original result starting with "\\wsl+ubuntu" doesn't work, after some replacing start with "\\wsl$\Ubuntu" doesn't work ...). If I use the fallback "os.tmpdir()", then some trivial command is in fact invoked, but with windows path (inside win temp folder starting with "C:") and in powershell instead of /bin/bash)
The "put Continue in your WSL extensions" workaround worked for me. Documenting for posterity:
First, In VSCode, I went to Extensions and specifically ensure that Continue is installed on my WSL: Ubuntu setup, and I disabled it on Local. That alone may be enough to solve the issue for some people, depending on the models in use.
I likewise had to edit my VSCode settings.json to include:
In my case, I'm using a local instance of LM Studio, running on my host Windows machine. So now I need Continue (now on WSL) to communicate with the LM Studio server, running on Windows localhost. To do this, in LM Studio I had to change the Server Settings to "Serve on Local Network." It shows the IP address of my Windows PC in the LM Studio window. In my case, it was http://192.168.0.10:1234
On my Windows machine, in a web browser I went to http://192.168.0.10:1234 and verify I was able to hit the endpoint.
On a different machine (a Raspberry Pi) I was not able to contact the server:
$ curl -I http://192.168.0.10:1234
(ctrl^c)
curl: (28) Failed to connect to 192.168.0.10 port 1234 after 138121 ms: Couldn't connect to server
(It just hung indefinitely.)
To fix this, I had to allow the port to be contacted. Back on my Windows machine, I went to "Windows Defender Firewall with Advanced Security". (Shortcut to open: Win+r --> WF.msc)
Then I did Inbound Rules --> New Rule... --> Port --> Specific local ports: 1234 (or whatever your port for LM Studio was) --> Allow the connection --> Then give it a descriptive name like "Port 1234 for LM Studio" or something.
After creating that firewall rule, I was able to ping the server from my Pi:
$ curl -I http://192.168.0.10:1234
HTTP/1.1 200 OK
// ...etc
So within my Continue extension I had to set up the .continue/config.yaml again since it was a "new" copy of the extension. I added LM Studio but had to change the apiBase IP to the network IP address: apiBase: http://192.168.0.176:1234/v1/ and from there, it worked! I was able to use Continue to run commands on my WSL directories while running VSCode and LM Studio on native Windows.
Note: I edited the firewall rule after creation to only allow connections to LM Studio. I did right-click --> Properties --> Programs and Services tab --> This program: (Browse...) --> [Navigate to LM Studio in your program files] -->OK. The connection with Continue should still work.
First, In VSCode, I went to Extensions and specifically ensure that Continue is installed on my WSL: Ubuntu setup, and I disabled it on Local. That alone may be enough to solve the issue for some people, depending on the models in use.
How did you do this? I installed mine in the workspace via the extensions UI and started getting errors galore. When I tried using Claude, I got this error
@Olyray it's a bit confusing. I don't remember exactly what I did, and don't know if what I did even really had any effect, but here's what I tried to do, at least:
In your Extensions panel, in the "Local - Installed" section I right-click-->Disabled Continue, and then in my "WSL: Ubuntu" section I right-click-->Enabled Continue.
There's also this little button that says "Install Local Extensions in WSL:Ubuntu" that I used:
But, most importantly, open up File --> Preferences --> Settings (or press ctrl+,) and in the top right press the button to open the settings.json file:
Then, in that file, ensure you add the following blurb somewhere:
{// ...Any other existing stuff..."remote.extensionKind": {"Continue.continue": ["workspace"],"pub.name": ["ui"]}}
git clone https://github.com/grantcurell/continue.git && cd continue
npm install
cd core && npm run build && cd ..
cd extensions/vscode && npm run esbuild && npm run package
Go to your extensions in vscode, uninstall continue, reload, install from local using the ... and then open a new chat (found out the hard way) and it should work.
git clone https://github.com/grantcurell/continue.git && cd continue
npm install
cd core && npm run build && cd ..
cd extensions/vscode && npm run esbuild && npm run package
Go to your extensions in vscode, uninstall continue, reload, install from local using the ... and then open a new chat (found out the hard way) and it should work.
area:toolsRelates to tool usageide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:windowsHappening specifically on Windowsreleased
Activity
tuzumkuru commentedon Oct 5, 2025
maybe #5996 and this has same origins?
jbm-composer commentedon Oct 6, 2025
Is there any workaround for this? Maybe an older version?
tuzumkuru commentedon Oct 6, 2025
my workaround is running the command myself and sharing the results :D
mattmazzola commentedon Oct 7, 2025
What did you mean by this?
I assume you were copying the command output and putting it back into the next prompt
I thought the extension already had access to read the terminal, but perhaps not. Maybe the error we see about attempts to send commands failing would also imply reading fails to, but those logs may be elsewhere.
tuzumkuru commentedon Oct 7, 2025
Exactly, while working on WSL (which gives the exact same error as devcontainers) when it wants to run a command, i run it in my terminal and copy the results to the chat if necessary or just let it know I ran it.
I don't think the extension has access to the terminal I use but normally can run commands through tools and get the output and continue its work. In addition to VSCode, Gemini Code Assist can work in WSL (probably in devcontainers too) without any problems.
chezsmithy commentedon Oct 8, 2025
If you update the extensionKind to workspace you can install the extension into the remote workspace like WSL or a container. We need to solve for the extension proxy bridge to be able to run terminal commands remotely along with some kind of jetbrains solution as well. We also need to solve for terminal commands running remotely while file edits are local and synced into the remote workspace which might have some to be tested side effects.
shanevcantwell commentedon Oct 11, 2025
fwiw, I just ran into this. I got into trying to solve for it just enough to narrow it to wsl2, too. Creating a .vscode/settings.json with the following contents, which added the ability to turn on console for just wsl2, which it did with correct scope. The agent still could not execute without the 'scheme file' error. I closed VS Code and re-opened through the Windows shortcut instead and it functions fine outside of wsl2 mode, as well as on my native Ubuntu workstation.
{ "remote.extensionKind": { "extension.id": ["continue.continue"] } }senart commentedon Oct 12, 2025
Same issue using devcontainers on Ubuntu.
Easiest workaround for me was to navigate to do this
VSCode Extensions > Continue > Settings > Add to devcontainer.json.Then I uninstalled the extension from my local extensions (backing up my
config.yaml), rebuild the devcontainer, restored myconfig.yamland the agent can now execute terminal commands.murphyXu commentedon Oct 21, 2025
I tried using plugins like Github Copilot and Augment, which can execute commands via remote SSH. I wonder if Continue has any optimization plans for this?
murphyXu commentedon Oct 21, 2025
kcupr commentedon Oct 23, 2025
With my very limited knowledge I found the line responsible for the message:
continue/core/tools/implementations/runTerminalCommand.ts
Line 89 in c9b9862
(I tried to modify/replace the input to use "file://" instead of "vscode-remote://", then it goes past this line, but I am unable to generate any path which would work then (original result starting with "\\wsl+ubuntu" doesn't work, after some replacing start with "\\wsl$\Ubuntu" doesn't work ...). If I use the fallback "os.tmpdir()", then some trivial command is in fact invoked, but with windows path (inside win temp folder starting with "C:") and in powershell instead of /bin/bash)
ad08fee3 commentedon Nov 18, 2025
The "put Continue in your WSL extensions" workaround worked for me. Documenting for posterity:
First, In VSCode, I went to
Extensionsand specifically ensure thatContinueis installed on myWSL: Ubuntusetup, and I disabled it onLocal. That alone may be enough to solve the issue for some people, depending on the models in use.I likewise had to edit my VSCode settings.json to include:
In my case, I'm using a local instance of LM Studio, running on my host Windows machine. So now I need Continue (now on WSL) to communicate with the LM Studio server, running on Windows localhost. To do this, in LM Studio I had to change the Server Settings to "Serve on Local Network." It shows the IP address of my Windows PC in the LM Studio window. In my case, it was
http://192.168.0.10:1234On my Windows machine, in a web browser I went to
http://192.168.0.10:1234and verify I was able to hit the endpoint.On a different machine (a Raspberry Pi) I was not able to contact the server:
(It just hung indefinitely.)
To fix this, I had to allow the port to be contacted. Back on my Windows machine, I went to "Windows Defender Firewall with Advanced Security". (Shortcut to open:
Win+r-->WF.msc)Then I did
Inbound Rules-->New Rule...--> Port --> Specific local ports: 1234 (or whatever your port for LM Studio was) --> Allow the connection --> Then give it a descriptive name like "Port 1234 for LM Studio" or something.After creating that firewall rule, I was able to ping the server from my Pi:
So within my Continue extension I had to set up the
.continue/config.yamlagain since it was a "new" copy of the extension. I added LM Studio but had to change the apiBase IP to the network IP address:apiBase: http://192.168.0.176:1234/v1/and from there, it worked! I was able to use Continue to run commands on my WSL directories while running VSCode and LM Studio on native Windows.Note: I edited the firewall rule after creation to only allow connections to LM Studio. I did right-click --> Properties -->
Programs and Servicestab -->This program: (Browse...)--> [Navigate to LM Studio in your program files] -->OK. The connection with Continue should still work.kcupr commentedon Nov 21, 2025
Thanks @ad08fee3 , that actually works. Now my ollama model invokes the command inside wsl.
(now there is "only" the issue in the output of the command, always twice
your 131072x1 screen size is bogus. expect trouble)(and this https://github.com/continuedev/continue/discussions/8098)
Olyray commentedon Nov 23, 2025
How did you do this? I installed mine in the workspace via the extensions UI and started getting errors galore. When I tried using Claude, I got this error
I tried using Gemini and when I tried to switch, I got this error:
ad08fee3 commentedon Nov 24, 2025
@Olyray it's a bit confusing. I don't remember exactly what I did, and don't know if what I did even really had any effect, but here's what I tried to do, at least:
In your Extensions panel, in the "Local - Installed" section I right-click-->Disabled
Continue, and then in my "WSL: Ubuntu" section I right-click-->EnabledContinue.There's also this little button that says "Install Local Extensions in WSL:Ubuntu" that I used:
But, most importantly, open up File --> Preferences --> Settings (or press
ctrl+,) and in the top right press the button to open thesettings.jsonfile:Then, in that file, ensure you add the following blurb somewhere:
grantcurell commentedon Nov 26, 2025
Has this been resolved? I'm remotely SSH'd into a box and I'm seeing the same behavior.
Running every command manually and copy pasting the answers back in basically defeats the point of an AI agent altogether.
grantcurell commentedon Nov 27, 2025
I have written a patch for this. It's ugly, but it works: https://github.com/grantcurell/continue
Here's how to build it:
Go to your extensions in vscode, uninstall continue, reload, install from local using the
...and then open a new chat (found out the hard way) and it should work.Olyray commentedon Nov 27, 2025
Why not create a pull request?
fix: wrap fileURLToPath in try-catch for WSL2 compatibility
fix: wrap fileURLToPath in try-catch for WSL2 compatibility
sestinj commentedon Jan 15, 2026
🎉 This issue has been resolved in version 1.39.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
sestinj commentedon Jan 22, 2026
🎉 This issue has been resolved in version 1.8.0 🎉
The release is available on:
Your semantic-release bot 📦🚀