Skip to content

code -w -g file:line does not exit when the tab is closed (code serve-web only) #342514

Closed

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.142.0
  • OS Version: container: Ubuntu 26.04.1 LTS (aarch64) (macOS: 27.0.1)

What happens

code -w in the integrated terminal waits until I close the file's tab, then exits. That's how it's supposed to work.

If I add -g file:line, the command never exits when I close the tab.

Steps to reproduce

  1. Open a terminal in VS Code in the browser with code serve-web.
  2. Run code -w README.md. A tab opens. Go on and close it. The command exits. Works correctly
  3. Run code -w -g README.md:1. A tab opens. Go on and close it. The command keeps running. Doesn't work.

Expected

Step 3 should exit when the tab is closed, like step 2.

Why it matters

Tools that open VS Code as an editor and wait for it hang forever. For example, pressing ctrl+g in Claude Code runs code -w -g file:line and gets stuck.

Setup

  • VS Code 1.142.0 (commit 6d62b1d)
  • Browser version (code serve-web), used as a PWA in Google Chrome on macOS
  • VS Code server runs on Linux (aarch64) in a dev container
  • The code command is the remote CLI: ~/.vscode/cli/serve-web/<commit>/bin/remote-cli/code

Only in the browser version

The same steps work correctly in:

  • desktop VS Code on macOS
  • desktop VS Code with dev container extension and "attach to running container"

The problem only happens in the browser version (code serve-web).

Activity

  1. added
    bug
    workbench-cli
    and removed on Oct 19, 2026
  2. added a commit that references this issue on Oct 28, 2026
    448eafb
  3. added
    unreleased
    on Oct 28, 2026
  4. added this to the 1.145.0 milestone on Oct 28, 2026
  5. added
    insiders-released
    and removed
    unreleased
    on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

buginsiders-releasedverifiedworkbench-cli

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions