Overview
The Linux VSCode Policy lets administrators manage Visual Studio Code extension-update settings on enrolled Linux devices.
The Swif agent merges the configured values into the user’s VS Code settings file:
~/.config/Code/User/settings.json
Existing settings unrelated to this policy are preserved.
With this policy, you can:
Enable or disable automatic extension updates
Delay automatic extension updates for a specified number of hours
Apply consistent extension-update behavior across managed Linux devices
Requirements
Requirement | Details |
Supported platform | Linux |
Device ownership | Company-owned and BYOD |
Device management | The device must be enrolled in Swif |
Application | Microsoft Visual Studio Code |
Extension update delay | VS Code 1.125 or later |
Agent connectivity | The Swif agent must be online |
The policy targets the standard Microsoft Visual Studio Code user-settings location. VS Code Insiders, VSCodium, Cursor, Flatpak packages, portable installations, and remote VS Code Server environments may use different paths and are not necessarily managed by this policy.
How the Policy Works
When the policy is installed, the Swif agent updates the applicable keys in:
~/.config/Code/User/settings.json
The agent preserves unrelated settings, including:
Themes
Editor preferences
Formatting options
Language-specific configurations
Keyboard and interface preferences
Other extension settings
Each Linux user has a separate home directory and VS Code configuration. Verify the policy while signed in as the affected user.
User Settings Versus Enterprise Policies
The Linux VSCode Policy manages the user’s settings.json file. It is different from VS Code’s native Linux enterprise-policy file:
/etc/vscode/policy.json
Native enterprise policies can lock supported settings and display them as managed by the organization. The Swif policy described in this article merges user settings while preserving other values.
If settings must be locked against user changes, review Microsoft’s VS Code enterprise-policy documentation.
Create the Policy
Sign in to the Swif Admin Dashboard.
Go to Device Management > Policies.
Create a new policy.
Select Linux VSCode Policy.
Enter a descriptive policy name.
Configure the extension-update settings.
Assign the policy to a test device or device group.
Allow the device to check in.
Restart VS Code and verify the settings.
Expand the assignment after testing succeeds.
Recommended Configuration
For most organizations:
Setting | Recommended value |
Extensions Auto Update | Enabled |
Extensions Auto Update Delay |
|
Automatic updates help installed extensions receive bug fixes and security updates.
Organizations that require more time to observe or review newly published extension versions can configure a longer delay. Consider the risk of postponing security fixes when selecting the delay.
Policy Settings
Extensions Auto Update
Controls whether Visual Studio Code automatically updates installed extensions.
Value | Behavior |
Enabled | VS Code automatically updates eligible installed extensions. |
Disabled | The general automatic extension-update process is disabled. |
Swif default:
Disabled
When automatic updates are enabled:
VS Code checks for extension updates.
Enabled extensions are updated automatically.
Disabled extensions are not automatically updated.
A disabled extension is normally updated after it is enabled again.
VS Code may request an extension-host restart after installing an update.
This setting updates existing extensions. It does not automatically install new extensions.
Extensions Auto Update Delay
Specifies how many hours VS Code waits after an extension update is published before installing it automatically.
This setting appears only when Extensions Auto Update is enabled.
Value | Behavior |
| Installs eligible updates as soon as they become available. |
| Waits two hours before automatically installing an update. |
Greater than | Provides a longer observation period before installation. |
Swif default:
2
Minimum value:
0
Enter a whole number of hours. Negative values are not supported.
The delay applies only to automatic updates. A user can bypass the delay by selecting Update manually.
Important: Configurable extension-update delay requires VS Code 1.125 or later. Earlier versions may ignore this setting.
Microsoft documents this behavior under Extension auto-update.
Configuration Examples
Automatically Update Extensions After Two Hours
Setting | Value |
Extensions Auto Update | Enabled |
Extensions Auto Update Delay |
|
This configuration provides a short delay while allowing extensions to receive updates automatically.
Install Extension Updates Immediately
Setting | Value |
Extensions Auto Update | Enabled |
Extensions Auto Update Delay |
|
Use this configuration when extension updates should install as soon as they become available.
A zero-hour delay provides the fastest access to fixes, but it also installs newly published versions without an observation period.
Apply a 24-Hour Delay
Setting | Value |
Extensions Auto Update | Enabled |
Extensions Auto Update Delay |
|
This configuration waits 24 hours after an eligible update is published before installing it automatically.
The delay does not perform a security review or approve the extension. Use separate controls when the organization must restrict which extensions developers can install.
Require Manual Extension Updates
Setting | Value |
Extensions Auto Update | Disabled |
Use this configuration only when the organization has a documented process for testing and deploying extension updates.
Leaving extensions outdated can expose devices to unresolved security and compatibility issues.
Verify the Policy
After assigning the policy:
Confirm that the Linux device is online in Swif.
Confirm that the policy reports as installed.
Sign in as the affected Linux user.
Close and reopen Visual Studio Code.
Press
Ctrl+,to open Settings.Search for:
Extensions Auto UpdateConfirm that the displayed value matches the Swif policy.
If automatic updates are enabled, search for:
Extensions Auto Update DelayConfirm that the expected delay is displayed.
Open the Command Palette with
Ctrl+Shift+P.Run:
Preferences: Open User Settings (JSON)Confirm that the extension-update settings are present.
Verify that unrelated settings remain unchanged.
You can also inspect the standard settings file from a terminal:
sed -n '1,240p' ~/.config/Code/User/settings.json
Review the file before sharing it with Swif Support. It may contain internal URLs, file paths, extension configurations, or other organization-specific information.
Interaction With Other Configuration Sources
The resulting behavior can be affected by other tools that manage VS Code.
Review the following sources when troubleshooting:
VS Code Settings Sync
/etc/vscode/policy.jsonConfiguration-management scripts
Shell provisioning scripts
Custom operating-system images
User dotfile-management tools
VS Code profiles
Alternative VS Code distributions
Avoid managing the same settings through multiple systems unless their precedence and update behavior have been tested.
A native enterprise policy can take precedence over a user setting written by this policy.
Remote Development Considerations
VS Code can run extensions locally or in a remote environment through:
Remote SSH
Development containers
WSL
GitHub Codespaces
The Linux VSCode Policy updates the standard local Linux user-settings file. A VS Code Server running in another host, container, or remote environment can use separate settings and extension storage.
Verify whether the extension is installed locally or on the remote host before troubleshooting its update behavior.
Extension Security Considerations
VS Code extensions can access source code, files, processes, network resources, and development credentials according to the permissions available to VS Code.
Automatic updates reduce the time required to receive security fixes, but they also allow newly published extension versions to be installed without individual administrator approval.
For stronger extension governance:
Approve trusted extension publishers.
Review extension permissions and publisher history.
Remove unused extensions.
Monitor installed extensions.
Use an appropriate update delay.
Maintain a process for urgent security updates.
Restrict access to unapproved extension marketplaces when required.
Use native VS Code enterprise policies when locked enforcement or allowlisting is required.
Test business-critical extensions before broad deployment.
This policy controls update timing. It does not install, approve, allowlist, or block extensions.
Troubleshooting
The Policy Reports Installed but VS Code Does Not Change
Check the following:
Microsoft Visual Studio Code is installed.
The Swif agent is online.
The policy is assigned to the correct device.
VS Code was restarted after the policy installed.
You are inspecting the affected Linux user’s settings.
The user’s home directory is available.
Another configuration source is not overriding the setting.
The installation uses the standard VS Code configuration path.
The expected path is:
~/.config/Code/User/settings.json
The Settings File Is in a Different Location
Different packages and VS Code-based applications may use different settings directories.
Examples include:
VS Code Insiders
Flatpak installations
VSCodium
Cursor
Portable installations
VS Code Server
The Linux VSCode Policy targets the standard Microsoft Visual Studio Code path. Confirm the application and installation method before deployment.
The Update Delay Does Not Appear
The delay is displayed only when Extensions Auto Update is enabled.
Also confirm that:
VS Code is version 1.125 or later.
The delay is a whole number.
The value is
0or greater.The device received the latest policy.
VS Code was restarted.
Extensions Update Immediately Despite the Delay
Manual updates bypass the configured delay.
Confirm whether the user selected:
Update
Update All Extensions
Check for Extension Updates
Also check whether another package, script, or extension-management tool installed the update independently.
Extensions Do Not Update Automatically
Confirm that:
Extensions Auto Update is enabled.
The extension is enabled.
The configured delay has elapsed.
VS Code can reach the extension marketplace.
A proxy, firewall, or content filter is not blocking the download.
The extension supports automatic updates.
VS Code has been running long enough to check for updates.
The extension is installed in the environment being inspected.
Extensions installed from a VSIX file have automatic updates disabled by default.
A Disabled Extension Was Not Updated
This is expected. VS Code automatically updates enabled extensions. Disabled extensions normally update after they are enabled again.
The Settings Change Back
Check for another source managing the same keys:
VS Code Settings Sync
Native Linux policy at
/etc/vscode/policy.jsonDotfile synchronization
Login scripts
Configuration-management tools
User edits
Another assigned Swif policy
Use one authoritative management source for each setting whenever possible.
Other VS Code Settings Were Removed
The Swif agent is designed to merge the configured keys while preserving unrelated settings.
If other settings are missing:
Confirm that another tool is not replacing
settings.json.Check whether Settings Sync restored an older file.
Validate the file’s syntax.
Confirm that the correct user’s home directory is being inspected.
Record the policy status and contact Swif Support.
The User Can Still Change the Setting
The policy updates the user’s settings.json file. It does not use the locked native enterprise-policy file.
If users must be prevented from changing the setting, use the applicable VS Code Linux enterprise policy under:
/etc/vscode/policy.json
Permission Errors Prevent the Policy From Applying
Confirm that:
The user owns their VS Code configuration directory.
The settings file is writable by the expected user.
The home directory is mounted and available.
File permissions were not changed by another management tool.
To inspect ownership and permissions:
ls -ld ~/.config ~/.config/Code ~/.config/Code/User ls -l ~/.config/Code/User/settings.json
Avoid changing ownership or permissions until you confirm the expected user and path.
Remove the Policy
To stop managing these settings:
Remove the policy assignment or delete the policy in Swif.
Allow the device to check in.
Restart Visual Studio Code.
Review the user’s VS Code settings.
Removing the policy assignment does not necessarily restore the value that existed before the policy was installed. Verify the resulting configuration and set the desired value if necessary.
Notes
The policy supports enrolled Linux devices.
Company-owned and BYOD devices are supported.
It manages Microsoft Visual Studio Code user settings.
The standard settings path is
~/.config/Code/User/settings.json.Unrelated settings are preserved during the merge.
Extensions Auto Update defaults to disabled in Swif.
Extensions Auto Update Delay defaults to two hours.
The minimum delay is zero hours.
The delay appears only when automatic updates are enabled.
A manual update bypasses the configured delay.
Disabled extensions are not automatically updated.
The policy does not install, approve, allowlist, or block extensions.
Alternative VS Code packages and remote environments may use different settings locations.
Native Linux enterprise policies use
/etc/vscode/policy.jsonand provide different enforcement behavior.
Summary
The Linux VSCode Policy controls how Microsoft Visual Studio Code updates installed extensions on managed Linux devices.
For most deployments:
Enable Extensions Auto Update.
Configure an appropriate update delay.
Assign the policy to a test group.
Restart VS Code after deployment.
Verify the settings as the affected Linux user.
Confirm whether extensions run locally or in a remote environment.
Combine update management with an extension approval and security-review process.