Skip to content

Bug: Cannot run commands in terminal "The URL must be of scheme file" #8091

Closed

Description

@mattmazzola

Before submitting your bug report

Relevant environment info

- 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.

This issue might become part of #928

To reproduce

  1. Open Agent Chat
  2. Enter prompt which causes continue.dev to suggest running command in terminal
  3. Click "Run"

Expected:
Command executes successfully

Actual:
Error response

Log output

Activity

  1. added
    area:tools
    ide:vscode
    kind:bug
    os:windows
    on Oct 3, 2025
  2. tuzumkuru commented on Oct 5, 2025

    @tuzumkuru

    maybe #5996 and this has same origins?

  3. jbm-composer commented on Oct 6, 2025

    @jbm-composer

    Is there any workaround for this? Maybe an older version?

  4. tuzumkuru commented on Oct 6, 2025

    @tuzumkuru

    Is there any workaround for this?

    my workaround is running the command myself and sharing the results :D

  5. mattmazzola commented on Oct 7, 2025

    @mattmazzola
    Author

    .... sharing the results

    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.

  6. tuzumkuru commented on Oct 7, 2025

    @tuzumkuru

    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.

  7. chezsmithy commented on Oct 8, 2025

    @chezsmithy
    Contributor

    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.

  8. shanevcantwell commented on Oct 11, 2025

    @shanevcantwell
    Contributor

    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"]
      }
    }
  9. senart commented on Oct 12, 2025

    @senart

    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.

  10. murphyXu commented on Oct 21, 2025

    @murphyXu

    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?

  11. murphyXu commented on Oct 21, 2025

    @murphyXu

    我尝试过使用 Github Copilot 和 Augment 等插件,它们可以通过远程 SSH 执行命令。不知道 Continue 对此有什么优化计划吗?

    Image
  12. kcupr commented on Oct 23, 2025

    @kcupr

    With my very limited knowledge I found the line responsible for the message:

    cwd = fileURLToPath(workspaceDirs[0]);

    (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)

  13. ad08fee3 commented on Nov 18, 2025

    @ad08fee3

    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:

        "remote.extensionKind": {
            "Continue.continue": ["workspace"],
        },

    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.

  14. kcupr commented on Nov 21, 2025

    @kcupr

    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)

  15. Olyray commented on Nov 23, 2025

    @Olyray
    Contributor

    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

    {"type":"not_found_error","message":"model: claude-4-sonnet-latest"}
    

    I tried using Gemini and when I tried to switch, I got this error:

    Image
  16. ad08fee3 commented on Nov 24, 2025

    @ad08fee3

    @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.

    Image

    There's also this little button that says "Install Local Extensions in WSL:Ubuntu" that I used:

    Image

    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:

    Image

    Then, in that file, ensure you add the following blurb somewhere:

    {
    	
    	// ...Any other existing stuff...
    	
        "remote.extensionKind": {
            "Continue.continue": ["workspace"],
            "pub.name": [
                "ui"
            ]
        }
    }
  17. grantcurell commented on Nov 26, 2025

    @grantcurell

    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.

  18. grantcurell commented on Nov 27, 2025

    @grantcurell

    I have written a patch for this. It's ugly, but it works: https://github.com/grantcurell/continue

    Here's how to build it:

    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.

  19. Olyray commented on Nov 27, 2025

    @Olyray
    Contributor

    I have written a patch for this. It's ugly, but it works: https://github.com/grantcurell/continue

    Here's how to build it:

    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.

    Why not create a pull request?

  20. added 2 commits that reference this issue on Dec 26, 2025
    0b7abad
    788e253
  21. sestinj commented on Jan 15, 2026

    @sestinj
    Contributor

    🎉 This issue has been resolved in version 1.39.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  22. sestinj commented on Jan 22, 2026

    @sestinj
    Contributor

    🎉 This issue has been resolved in version 1.8.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:toolside:vscodekind:bugos:windowsreleased

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions