Skip to content

Cannot open files in integrated terminal #8089

Open

Description

@storyofwoe

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: N/A (running through VS Code)
  • Local OS: Windows 11
  • Remote OS: Ubuntu 26.04.1 LTS
  • Remote Architecture: x86-64
  • code-server --version: 1.144.0

Steps to Reproduce

  1. Open code-server via VS Code
  2. Run a command that opens vim in the terminal (for eg. an interactive rebase git rebase -i main )

Expected

Terminal text editor opens

Actual

Terminal text editor does not open, with the error

error Unknown option --wait
error: there was a problem with the editor `code-server --wait --reuse-window`

Logs

Screenshot/Video

Expected behaviour on version 1.143.1
Image

Actual behaviour on version 1.144.0
Image

Does this bug reproduce in native VS Code?

Yes, this is also broken in native VS Code

Does this bug reproduce in VS Code web?

No, this works as expected in VS Code web

Does this bug reproduce in GitHub Codespaces?

I did not test GitHub Codespaces

Are you accessing code-server over a secure context?

  • I am using a secure context.

Notes

Testing in VS Code web opens the file as a new tab rather than within the terminal via vim, and from then on works as expected

Activity

  1. added
    bugSomething isn't working
    triageThis issue needs to be triaged by a maintainer
    on Oct 29, 2026
  2. linear-code commented on Oct 29, 2026

    @linear-code
  3. code-asher commented on Oct 29, 2026

    @code-asher
    Member

    It looks like it is launching the wrong code-server. There is one that launches the server (outside the integrated terminal) and one that only interacts with the current code-server instance (inside the integrated terminal).

    Inside the integrated terminal, it is supposed to use lib/vscode/bin/remote-cli/code-server) which supports the --wait flag.

    It is supposed to add lib/vscode/bin to PATH automatically but maybe that is not happening here, or maybe you have something that is overriding PATH?

    I experimented with 4.144.0 and this worked for me:

    $ which code-server
    /tmp/code-server/lib/code-server-4.144.0/lib/vscode/bin/remote-cli/code-server
    $ code-server --version
    1.144.0
    ee31cdbe02c07b3ba718007f221d14c890696c61
    x64
    $ export GIT_EDITOR="code-server --wait --reuse-window"
    $ git rebase -i HEAD~10
    hint: Waiting for your editor to close the file...
    

    Possibly we should add --wait to the other code-server script so it will work even if the wrong one is called. 🤔

  4. storyofwoe commented on Oct 30, 2026

    @storyofwoe
    Author

    On both versions, which code-server returns /tmp/coder-script-data/bin/code-server. Looking at both versions' $PATH shows lib/vscode/bin/ is absent there too. It's possible there is something overriding PATH as I'm working through an organisation, but I don't think it's likely due to the nature of this problem (and PATH looks pretty normal, all things considered)

    Running your export command doesn't fix the problem unfortunately

  5. storyofwoe commented on Oct 30, 2026

    @storyofwoe
    Author

    Also, was this a typo or are you running major versions behind?

    $ code-server --version
    1.144.0   # Should be 4.144.0?
    
  6. code-asher commented on Oct 30, 2026

    @code-asher
    Member

    was this a typo or are you running major versions behind

    The lib/vscode/bin/remote-cli/code-server script comes directly from VS Code without any modifications, it is not the same code-server script that we ship in the root bin (which is our own script that actually launches code-server), so the former shows VS Code's version, which is 1.144.0. We match code-server's minor/patch to the minor/patch of VS Code that is bundled which is why they are the same except the major.

    It would probably make sense to patch the remote-cli/code-server script to show the code-server version instead, but we have not done that yet.

    I would check if you have a ~/.bashrc or something might be setting PATH. My Coder workspace has this for PATH in the integrated terminal, in case it helps:

    $ printenv PATH
    /home/coder/.local/bin:/tmp/code-server/lib/code-server-4.144.0/lib/vscode/bin/remote-cli:/home/coder/.local/bin:/home/coder/.local/bin:/tmp/coder-script-data/bin:[omitted the rest]
    

    Normally VS Code sets remote-cli on the PATH (https://github.com/microsoft/vscode/blob/2c33b50b16c472efe58357d1d2a8a5414bc23fbf/src/vs/server/node/extensionHostConnection.ts#L50) but a .bashrc or .profile or some such could still override it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageThis issue needs to be triaged by a maintainer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions