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
code -w -g file:line does not exit when the tab is closed (code serve-web only) #342514
bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeededworkbench-cliVS Code Command line issues
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
Open a terminal in VS Code in the browser with code serve-web.
Run code -w README.md. A tab opens. Go on and close it. The command exits. Works correctly
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.
bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeededworkbench-cliVS Code Command line issues
Activity
web: release `code -w -g file:line` once the file's editor closes (#3…