Back to top
 
 
 

SASVA Chat Freeze in VS Code Persisting After Full Uninstall (Session History Survives Cleanup)

Problem

SASVA freezes inside VS Code during an active operation (for example, a code generation task). The chat panel becomes completely unresponsive — no button, input box, or menu inside the SASVA panel reacts to clicks, and there is no way to close the frozen chat session or start a new one from within VS Code.

 

What makes this different from a normal freeze: the standard remediation steps do not resolve it:

  • Uninstalling and reinstalling the SASVA extension does not help.
  • Uninstalling and reinstalling VS Code itself does not help.
  • Running the official sasva-clear-sessions script, followed by the SASVA uninstall script (which deletes the extension and the SASVA user workspace), still does not help.
  • After a completely fresh install, the old chat session history reappears as soon as VS Code is relaunched — confirming that some part of the previous session survived the "complete" cleanup.

 

This has also been mistaken for a VS Code core issue and escalated as a generic incident, but verification confirms the freeze is specific to SASVA session state, not VS Code itself.

Root Cause

SASVA persists chat session data in two separate locations:

  1. The SASVA extension's own workspace/extension storage (removed correctly by sasva-clear-sessions and the standard uninstall script).
  2. VS Code's global state database (state.vscdb) and globalStorage folder, which VS Code itself owns at the application level, independent of any single extension.

 

Because the second location is outside the scope of the extension uninstall and the sasva-clear-sessions/uninstall-all scripts, an orphaned session record (including the frozen chat thread's state and pending request lock) remains on disk even after a "complete" removal of SASVA and VS Code. When VS Code is reinstalled and launched again, it reloads its global state DB, which restores the orphaned SASVA session — including whatever locked/frozen condition caused the original hang — so the freeze recurs and old chat history reappears.

Contributing factors:

  • A long-running or interrupted code-generation request that never received a completion/error response from the backend, leaving the UI thread waiting indefinitely.
  • Session/thread identifiers cached in VS Code's global state pointing to a backend session that is no longer valid, causing the panel to hang while trying to reconnect.
  • Cleanup tooling (as of SASVA 3.1.x/4.0 uninstall scripts) scoped only to extension-owned paths, not VS Code's shared global state store.

Note: This is distinct from the generic "VS Code not responding while using SASVA" cache/workspace-storage issue. That issue is resolved by clearing VS Code's per-workspace cache. This issue specifically requires clearing VS Code's global state, which survives even a full SASVA + VS Code uninstall/reinstall.

Resolution/Workaround

Step 1: Close VS Code and Kill All Related Processes

Windows

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. End all related processes: Code.exe, Code Helper, and any lingering node.exe processes associated with VS Code/SASVA.

macOS

  1. Open Activity Monitor.
  2. Search for processes containing Code or Electron and Force Quit each one.

Step 2: Run the Standard SASVA Cleanup (Mandatory First Pass)

  1. Run sasva-clear-sessions.
  2. Run the SASVA uninstall script for your OS (uninstall-all.ps1 on Windows, uninstall-all.sh on macOS) to remove the extension and the SASVA user workspace.

Step 3: Clear VS Code's Global State (Critical — Not Covered by Step 2)

This is the step that resolves the recurring freeze/history issue. With VS Code fully closed:

Windows

  1. Navigate to %APPDATA%\Code\User\globalStorage and delete any folders/files referencing sasva or the SASVA publisher ID.
  2. Navigate to %APPDATA%\Code\User\globalStorage\state.vscdb — rename or back up this file, then delete the working copy (VS Code will regenerate a clean one on next launch).
  3. Navigate to %APPDATA%\Code\Cache, %APPDATA%\Code\CachedData, and %APPDATA%\Code\Code Cache and clear their contents.

macOS

  1. Navigate to ~/Library/Application Support/Code/User/globalStorage and delete any folders/files referencing sasva.
  2. Delete ~/Library/Application Support/Code/User/globalStorage/state.vscdb (back it up first if you want to preserve unrelated VS Code settings history).
  3. Clear ~/Library/Application Support/Code/Cache, CachedData, and Code Cache.

Step 4: Reboot and Reinstall

  1. Restart the machine to release any file locks.
  2. Reinstall VS Code (fresh download, not from a cached installer package).
  3. Reinstall the SASVA extension from the Marketplace/internal registry.
  4. Launch VS Code and confirm no prior chat session or history is restored, and that a new SASVA chat session opens normally.

Step 5: If the Freeze Recurs

  1. Capture the VS Code process ID and generate a process dump (Windows: Task Manager → right-click process → Create Dump File; macOS: sample Code > sample.txt) before force-closing, and attach it to your support ticket.
  2. Enable SASVA verbose/debug logging (Command Palette → "SASVA: Enable Debug Logging") and reproduce the freeze, then share the log folder with support.

Preventive tip:

Avoid force-killing VS Code while a SASVA code-generation task is actively running. Where possible, cancel the in-progress request from the chat panel first, or wait for a timeout response, before closing VS Code. This reduces the chance of an orphaned session lock being written to VS Code's global state.

 
Was this article helpful?
0 out of 0 found this helpful

Comments