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
in "%USERPROFILE%\.vscode\cli" ( = usually
"C:\Users\%USERNAME%\" ) the folder ".vscode\cli\"
is created by vscode , although vscode is in portable mode .
Expected Behaviour :
the folder ".vscode\cli\" should be created within the
portable "data\"-folder , whose path is in the env var
VSCODE_PORTABLE , when vscode is started in portable mode .
i've checked the prior vscode versions down to 1.70 .
it turned out , that this issue could be a "regression" ,
because versions up to 1.77.3 didn't have this issue ,
but all vscode versions since 1.78.0 have this issue .
in the versions 1.78.0 ... 1.78.2 the folder wrongly
created outside of the portable "data\"-folder , was %USERPROFILE%\.vscode-cli
since 1.79.0 , it is %USERPROFILE%\.vscode\cli
Connor Peet (@connor4312)
could you please change the label "feature-request"
to "regression" for this issue .
I am starting the editor session via the CLI itself, if that matters. My launch command includes the CLI argument --user-data-dir=<portable dir>/data, but the ~/.vscode/cli directory is still created (--user-data-dir normally has no effect in Portable mode, but if the CLI doesn't support Portable mode, I thought I'd give it a shot). However, setting the VSCODE_CLI_DATA_DIR environment variable does prevent ~/.vscode/cli from being created (although the cli directory is not then created anywhere, that I can tell).
Hi.
This is an issue with the behavior of code or code-tunnel. code enters portable-mode if there is a data folder directly under it.
Then, how portable code is depends on how complete necessary files are in the data folder.
For example, if there is a valid JSON file named argv.json, code will not try to create a file in ~/.vscode and will be more portable if there is a data/tmp/ folder.
However, for the ~/.vscode/cli/ directory, this convention is broken and the directory will continue to be created even if data/cli/ is provided.
The workaround is to provide --cli-data-dir or VSCODE_CLI_DATA_DIR dynamically.
Can someone please share a valid argv.json file so that we can add it in the appropriate place and prevent its creation altogether before running code portable the first time?
Also I would not call this a feature-request. Portable mode is not actually portable if its still writing files anywhere outside of the vscode program directory.
Activity
dreamflow commentedon Jun 9, 2023
Connor Peet (@connor4312)
could you please add the label
portable-mode to this issue .
dreamflow commentedon Jun 19, 2023
i've checked the prior vscode versions down to 1.70 .
it turned out , that this issue could be a "regression" ,
because versions up to 1.77.3 didn't have this issue ,
but all vscode versions since 1.78.0 have this issue .
in the versions 1.78.0 ... 1.78.2 the folder wrongly
created outside of the portable "data\"-folder , was
%USERPROFILE%\.vscode-clisince 1.79.0 , it is
%USERPROFILE%\.vscode\cliConnor Peet (@connor4312)
could you please change the label "feature-request"
to "regression" for this issue .
connor4312 commentedon Jun 19, 2023
This is not a regression. The CLI never supported portable mode, the default data directory just moved.
NorthboundTrain commentedon Sep 23, 2023
This also occurs under Linux:
I am starting the editor session via the CLI itself, if that matters. My launch command includes the CLI argument
--user-data-dir=<portable dir>/data, but the~/.vscode/clidirectory is still created (--user-data-dirnormally has no effect in Portable mode, but if the CLI doesn't support Portable mode, I thought I'd give it a shot). However, setting theVSCODE_CLI_DATA_DIRenvironment variable does prevent~/.vscode/clifrom being created (although theclidirectory is not then created anywhere, that I can tell).a3db9a13 commentedon Dec 16, 2023
Hi.
This is an issue with the behavior of
codeorcode-tunnel.codeenters portable-mode if there is adatafolder directly under it.Then, how portable
codeis depends on how complete necessary files are in thedatafolder.For example, if there is a valid JSON file named
argv.json,codewill not try to create a file in~/.vscodeand will be more portable if there is adata/tmp/folder.However, for the
~/.vscode/cli/directory, this convention is broken and the directory will continue to be created even ifdata/cli/is provided.The workaround is to provide
--cli-data-dirorVSCODE_CLI_DATA_DIRdynamically.nl8-gh commentedon May 1, 2024
Curious: Is anyone actually working to get this fixed, or, even better, get things aligned with XDG recommendations - officially?
pa-0 commentedon May 12, 2025
Can someone please share a valid
argv.jsonfile so that we can add it in the appropriate place and prevent its creation altogether before running code portable the first time?pa-0 commentedon May 24, 2025
Also I would not call this a feature-request. Portable mode is not actually portable if its still writing files anywhere outside of the vscode program directory.
RoyiAvital commentedon Dec 29, 2025
Any chance to fix this?
daniporr commentedon Jan 17, 2026
The point is that in most cases that folder (
.vscode) just contain a single empty folder (cli), so it is completely useless (see #256373).Can the creation of this folder be avoided when unnecessary?
Risae commentedon Jun 27, 2026
I also just came across this issue, why is this not fixed already? Should be easy to do with GitHub Copilot?
RoyiAvital commentedon Jun 28, 2026
Connor Peet (@connor4312) , Why is it labeled as "Feature Request".
The portable mode is official. This is a small bug in it.
cli: respect VSCODE_PORTABLE and make Quality parsing case-insensitive
cli: respect VSCODE_PORTABLE and make Quality parsing case-insensitive (