VS Code Extension 2026.x — Files No Longer Written to Disk (VFS Change Breaks AI Tool Integration)

VS Code Extension 2026.x — Files No Longer Written to Disk (VFS Change Breaks AI Tool Integration)

avatar

Environment

  • PowerShell Universal Server: 2026.2.0
  • VS Code Extension: 2026.2.x (previous: 5.6.x)
  • OS: Windows 11

Description
After updating the VS Code extension from 5.6.x to 2026.2.x we noticed a breaking change in how script files are handled locally.
Previous behavior (≤5.6.x): The extension fetched scripts from the PSU server via REST API and wrote them as real files to: %AppData%\Local\Temp\.universal.code.script\
This allowed external tools (file watchers, AI coding assistants, search tools) to discover, read, and update the files on disk.
Current behavior (2026.x): The extension now uses VS Code's Virtual File System (VFS) API. Files are served in-memory and are never written to disk. The temp folder is no longer populated.
Impact
This change breaks the integration with AI coding assistants such as Claude Code (and likely GitHub Copilot Workspace, Cursor, etc.). These tools rely on real file paths to:

  • Discover and index scripts
  • Read file contents for analysis
  • Write changes back automatically

With the VFS approach, the AI tool cannot find the files, cannot read them, and cannot apply suggested edits directly — the round-trip has to go through manual copy-paste.
Additionally, the previous workflow of "edit in VS Code → test on DEV server" was instant. With VFS-only files, any change now requires an additional Git sync cycle to get the file onto the DEV server, which significantly increases iteration time.
Request / Question

  1. Is there a setting in the new extension to re-enable writing files to a local temp path (similar to the old "Local Editing" option from v1.8.0)?
  2. If not, is there a recommended integration pattern for AI coding tools with PSU 2026.x?
  3. Would you consider adding an option to mirror the VFS to a configurable local directory so that external tools can interact with the files normally?


All Comments (1)

avatar

Hello ivoruss,

Thank you for the detailed write-up, and for clearly outlining the difference in behavior between the 5.6.x and 2026.x extensions.

You are correct: starting with the 2026.x extension, scripts are served through VS Code's Virtual File System rather than being written to the local temp folder (%LocalAppData%\Temp.universal.code.script). This was an intentional architectural change, and the previous temp-file caching, along with the older "Local Editing" option, is no longer present.

Below are detailed answers and step-by-step guidance for each of your three questions.

  1. Re-enabling a local temp path


There is currently no setting in the 2026.x extension that restores writing scripts to a local temp directory.

That folder was an internal cache tied to the previous editing model, which the Virtual File System replaced. You do not need that cache, however, because PowerShell Universal already keeps your scripts as real files on disk in its repository folder, which the patterns below use directly.

  1. Recommended integration pattern for external/AI tools

First, locate your repository folder:

  • Step 1: Open your appsettings.json (default: C:\ProgramData\PowerShellUniversal\appsettings.json).
  • Step 2: In the Data section, find RepositoryPath. By default this resolves to %ProgramData%\UniversalAutomation\Repository.
  • Step 3: That folder holds your scripts as plain .ps1 files, plus a .universal subfolder with the configuration (scripts.ps1, dashboards.ps1, and so on). This folder, not the extension's virtual workspace, is the on-disk surface external tools should target.


Option A - Git two-way sync (recommended for the "edit locally, run on DEV" workflow):

  • Step 1: Create an empty repository on your Git provider (GitHub, GitLab, Azure DevOps, etc.).
  • Step 2: In the admin console, open Settings, then Git, and click Create Git Settings. Enter:
    • Remote (GitRemote): your repository URL
    • Branch (GitBranch): defaults to master
    • Username and Password (GitUserName / GitPassword): typically a personal access token
    • Sync Behavior (GitSyncBehavior): Two Way
    • Optionally, Sync Interval (GitSyncInterval): defaults to 60 seconds Note: settings changed in the admin console do not update appsettings.json, and vice versa, so configure Git in one place.
  • Step 3: PowerShell Universal performs an initial sync and commits the current repository contents to the remote.
  • Step 4: On your workstation, clone the repository: git clone <remote-url>
  • Step 5: Open the clone in VS Code and point your AI tool at that folder. The scripts are ordinary files it can discover, read, and edit.
  • Step 6: When you are ready to test on DEV, stage and push: git add -A git commit -m "Update scripts" git push
  • Step 7: The server pulls on the sync interval, or immediately when you click Synchronize Now in Settings, then Git. Please note an important documented behavior: configurations do not reload automatically after a pull. The sync reloads only the files changed in the commit, and if a change is not reflected you may need to force a reload (restarting the PowerShell Universal service is a reliable way to do this).


Option B - Direct repository editing (only when PowerShell Universal runs locally, under the same account as your editor):

  • Step 1: Check the service identity in Services (PowerShell Universal, Log On tab). If it runs as LocalSystem or a dedicated service account, the repository files are typically read-only to your interactive user, and Option A is the better choice.
  • Step 2: If it runs under your own account (or you have explicitly granted your account Modify rights on the repository folder, understanding the security implications), open the repository folder directly in VS Code.
  • Step 3: Edit the .ps1 files and save. Be aware that changes made on disk are not always reloaded automatically; if a change is not picked up, force a reload or use the Git workflow in Option A.


For most remote DEV scenarios, Option A (Git) is the cleanest and avoids the file-permission considerations entirely.

  1. Mirroring the Virtual File System to a configurable local directory


This is a reasonable enhancement request, and I have shared it with our product team for consideration. I cannot commit to a timeline, but the feedback is recorded. In the meantime, the repository folder combined with Git two-way sync (Option A above) provides the same "real files on disk" capability that your external tools rely on.

Relevant documentation:


If you would like, let me know your DEV setup (whether the server runs locally or remotely, and under which account), and I can tailor the exact steps to your environment.

Best regards,

Patrick Ouimet