Skip to content

.vscode\cli\ ignores portable mode #184646

Closed

Description

@dreamflow

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

  • VS Code Version : 64bit 1.79.0
  • OS Version : 64bit Windows 10 22H2 Pro & Enterprize

Steps to Reproduce :

run vscode in portable mode as described here
https://code.visualstudio.com/docs/editor/portable

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 .

Activity

  1. added
    feature-request
    on Jun 9, 2023
  2. dreamflow commented on Jun 9, 2023

    @dreamflow
    Author

    Connor Peet (@connor4312)
    could you please add the label
    portable-mode to this issue .

  3. added
    portable-mode
    on Jun 9, 2023
  4. dreamflow commented on Jun 19, 2023

    @dreamflow
    Author

    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 .

  5. connor4312 commented on Jun 19, 2023

    @connor4312
    Member

    This is not a regression. The CLI never supported portable mode, the default data directory just moved.

  6. NorthboundTrain commented on Sep 23, 2023

    @NorthboundTrain

    This also occurs under Linux:

    • VS Code Version: 1.82.2
    • OS Version: Linux x64 5.4.0-163-generic

    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).

  7. a3db9a13 commented on Dec 16, 2023

    @a3db9a13

    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.


    • OS: Linux x64 6.1.66-1-lts
    • APP: Visual Studio Code x64 1.85.1
  8. nl8-gh commented on May 1, 2024

    @nl8-gh

    Curious: Is anyone actually working to get this fixed, or, even better, get things aligned with XDG recommendations - officially?

  9. pa-0 commented on May 12, 2025

    @pa-0

    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?

  10. pa-0 commented on May 24, 2025

    @pa-0

    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.

  11. RoyiAvital commented on Dec 29, 2025

    @RoyiAvital

    Any chance to fix this?

  12. daniporr commented on Jan 17, 2026

    @daniporr

    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?

  13. Risae commented on Jun 27, 2026

    @Risae

    I also just came across this issue, why is this not fixed already? Should be easy to do with GitHub Copilot?

  14. RoyiAvital commented on Jun 28, 2026

    @RoyiAvital

    Connor Peet (@connor4312) , Why is it labeled as "Feature Request".
    The portable mode is official. This is a small bug in it.

  15. added 2 commits that reference this issue on Oct 14, 2026
    d1e524e
    a4d6dc1
  16. added
    unreleased
    on Oct 14, 2026
  17. added
    insiders-released
    verification-needed
    and removed
    unreleased
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

code-clifeature-requestinsiders-releasedportable-modeverification-neededverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions