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
CLI on Windows: --folder-uri option only works as the last argument and when the --wait option is not present #209072
bugIssue identified by VS Code Team member as probable buggood first issueIssues identified as good for first-time contributorsinsiders-releasedPatch has been released in VS Code Insidersteam-low-hangingLow effort issues team members can help fix. No external contributions will be accepted.verifiedVerification succeededwindowsVS Code on Windows issuesworkbench-cliVS Code Command line issues
Does this issue occur when all extensions are disabled?: Yes
VS Code Version: 1.87.2
OS Version: Windows 10 Pro 19044.2486 VM
Steps to Reproduce:
Case where --folder-uri is not the last option. Run code --folder-uri vscode-remote://ssh-remote+vscode@some-workspace --disable-extension ms-vscode-remote.remote-containers --new-window --wait. Command will return immediately without action or error.
Case where --folder-uri is the last option but --wait is present. Run code --disable-extension ms-vscode-remote.remote-containers --new-window --wait --folder-uri vscode-remote://ssh-remote+vscode@some-workspace. Command will return immediately without action or error.
There seems to be a behavior where the the code command silently errors when --folder-uri and the --wait options are used together. Also, there seems to be a bug where the the code command silently errors when the --folder-uri option is not the last option.
Passing code --any-arg with-a-colon: --verbose fails (exits immediately without calling main.js) but removing the colon works code --any-arg without-a-colon --verbose. Same when calling the exe directly versus going through a batch script.
Yeah the uri argument handling is not a bug but a security fix in the runtime, we also hit this in another feature of vscode for context: #188769 (comment)
Would it be possible to encode the uri for the argument ?
Hi maintainers, I’m interested in working on this issue and contributing a fix for the CLI behavior with --folder-uri on Windows.
If the issue is still open, could you please assign it to me?
Hi, I noticed this issue is already assigned, but I'm a student learning open source contribution and would love to try fixing this CLI parameter bug for practice. Could I follow along and submit a PR for learning purposes?
bugIssue identified by VS Code Team member as probable buggood first issueIssues identified as good for first-time contributorsinsiders-releasedPatch has been released in VS Code Insidersteam-low-hangingLow effort issues team members can help fix. No external contributions will be accepted.verifiedVerification succeededwindowsVS Code on Windows issuesworkbench-cliVS Code Command line issues
Activity
connor4312 commentedon Mar 29, 2024
This seems like an electron bug(?)
Passing
code --any-arg with-a-colon: --verbosefails (exits immediately without callingmain.js) but removing the colon workscode --any-arg without-a-colon --verbose. Same when calling the exe directly versus going through a batch script.deepak1556 commentedon Apr 2, 2024
Yeah the uri argument handling is not a bug but a security fix in the runtime, we also hit this in another feature of vscode for context: #188769 (comment)
Would it be possible to encode the uri for the argument ?
kiwi-bui commentedon Apr 5, 2024
Is this also related to the --wait option not being able to be used with the --folder-uri option?
4 remaining items
jaleelw7 commentedon Feb 11, 2026
Hello Robo (@deepak1556). Has this issue already been resolved? If not, I'd like to work on it as a first contribution.
zhanglinqian commentedon Feb 12, 2026
I'd like to work on this issue.
omwanere commentedon Mar 17, 2026
Hi maintainers, I’m interested in working on this issue and contributing a fix for the CLI behavior with
--folder-urion Windows.If the issue is still open, could you please assign it to me?
even0120021 commentedon Mar 27, 2026
Hi, I noticed this issue is already assigned, but I'm a student learning open source contribution and would love to try fixing this CLI parameter bug for practice. Could I follow along and submit a PR for learning purposes?
fix: combine URI flags to prevent Electron argument filtering on Windows
fix: combine URI flags to prevent Electron argument filtering on Wind…