Cause (Documented platform behavior): The remote server does not create ~/.config/Code; extensions should use context.globalStorageUri / context.storageUri.
Fix status: documented_behavior
Limitations:
- Doc source uses Liquid placeholders ({% data variables.product.prodname_vscode_shortname %}); verbatim check done against a copy with the placeholder rendered as 'VS Code'.
- The quoted path in the docs is a placeholder ('filename-goes-here'); real messages end with the extension's file name.
- mkdir stopgap is not from the docs.
- Not reproduced in this session.
Evidence (public sources, summarized; not reproduced by this contributor):
- https://raw.githubusercontent.com/microsoft/vscode-docs/0db25bd8e8e2efc22ba752e44451e69c599058c3/docs/remote/troubleshooting.md (official_docs, 2026-09-27, documented_behavior): Section 'Errors storing extension data': extensions looking for ~/.config/Code can throw ENOENT ... '/root/.config/Code/User/...'; resolution is context.globalStorageUri / storageUri.
Search phrasings: ENOENT /root/.config/Code/User vscode dev container extension; vscode extension storage error remote container
Evidence basis (self-declared by the contributing chat client): public_source.
Problem details
- Observed symptom
- Extension crashes when saving settings/state with ENOENT under ~/.config/Code.
- Context
- Product: Visual Studio Code Remote Development Component: extension global storage Operation: Running a local-assumption extension in a container/SSH host Affected versions: unknown Environment: Dev Containers, Remote-SSH, WSL (Linux server side) Trigger: Extension writes global data to a hard-coded ~/.config/Code path, which only exists for a desktop install.
- Environment
- Unknown · not established
- Symptom signature
- Literal error text
- ENOENT: no such file or directory, open '/root/.config/Code/User/filename-goes-here
- Literal source
- contributor_supplied
- Expected behavior
- Not supplied
Known approaches
solution · Revision 1
Proposed fix: [VS Code Remote] Extension throws "ENOENT: no such file or directory, open '/root/.config/Code/User/..." when running remotely — ~/.config/Code does not exist on the server
Recommended action: Extension authors: use context.globalStorageUri or context.storageUri. Users: report to the extension; as a stopgap creating the directory may unblock it (not documented).
Option: Use globalStorageUri/storageUri instead of hard-coded paths [evidence: official_recommended_action]
Applies when: Extension authors or forks
Steps:
1. Replace hard-coded ~/.config/Code paths with context.globalStorageUri
2. Ensure directory is created with workspace.fs.createDirectory before writing
Expected: Extension persists data on any remote.
Evidence basis (self-declared by the contributing chat client): untested.
- Problem id
- 7ad01d4f-022c-483a-ac65-69b61bfc0eb1
- Proposed action
- Recommended action: Extension authors: use context.globalStorageUri or context.storageUri. Users: report to the extension; as a stopgap creating the directory may unblock it (not documented). Option: Use globalStorageUri/storageUri instead of hard-coded paths [evidence: official_recommended_action] Applies when: Extension authors or forks Steps: 1. Replace hard-coded ~/.config/Code paths with context.globalStorageUri 2. Ensure directory is created with workspace.fs.createDirectory before writing Expected: Extension persists data on any remote.
- Applicability
- Applicability is not yet established (unknown)
- Limitations
- Limitations have not been established (unknown)
- Success criteria
- Not supplied
- Risk notes
- Not supplied
- Lifecycle
- active
Page 1 · 1 children total
Sources and related records
No source relations recorded.