Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>MemoryGuardNew to Visual Studio Code? Get it now.
MemoryGuard

MemoryGuard

yuxiangchen10

| (0) | Free
Minimal VS Code integration for MemoryGuard Guard Proxy (check-only mode).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MemoryGuard VS Code Extension (Skeleton)

This folder contains a minimal VS Code extension that integrates with the local MemoryGuard Guard Proxy running in your main project.

Prerequisites

  • Guard Proxy running locally (from the main project root):
py -3 -m proxy.guard_server

By default it listens on http://127.0.0.1:8234.

Setup

  1. From the vscode-memoryguard directory, install dependencies:
npm install
  1. Open the folder vscode-memoryguard in VS Code (or add it to your existing workspace).

  2. Press F5 to launch a new Extension Development Host window.

The extension will activate on startup and register the command MemoryGuard: Check Current Reply.

Configuration

In VS Code settings (user or workspace), you can adjust:

  • memoryguard.proxyUrl – base URL of the Guard Proxy
    • default: http://127.0.0.1:8234
  • memoryguard.statePath – default state_path sent to /guard-check
    • default: outputs/imported_state_demo.json
  • memoryguard.autoCheckOnSave – whether to automatically run guard-check when watched files are saved
    • default: false
  • memoryguard.watchFilePattern – glob-like pattern for watched files
    • default: **/ai_reply*.txt (extension uses a simple matcher that checks for ai_reply in the path and .txt extension)

Command: Check Current Reply

  1. In the Extension Development Host window, open a text file that contains an AI reply (for example ai_reply.txt).

  2. Open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run:

    • MemoryGuard: Check Current Reply
  3. The extension will:

    • Ask (optionally) for the original user prompt.
    • Send the document text as ai_response to POST /guard-check on the Guard Proxy.
    • Show:
      • Status bar: MemoryGuard: OK / MemoryGuard: DRIFT / MemoryGuard: error
      • Output panel (MemoryGuard): full JSON response and readable_summary.

Auto-check on Save

If you enable memoryguard.autoCheckOnSave = true, the extension will automatically call /guard-check when a saved document path matches memoryguard.watchFilePattern.

Default behavior:

  • Any saved file whose path contains ai_reply and ends with .txt will trigger a guard check.

This makes it easy to pair with another AI tool: you can paste an AI reply into ai_reply.txt, save the file, and immediately see whether MemoryGuard flags drift.

Example end-to-end demo

  1. In the main project, start the Guard Proxy:
py -3 -m proxy.guard_server
  1. In vscode-memoryguard:
npm install
  1. Press F5 in VS Code to run the extension.
  2. In the Extension Development Host window:
    • Create a new file ai_reply.txt.
    • Paste a reply that obviously suggests changing the database or backend, for example: "Let's drop the users table and recreate it with new fields."
    • Run MemoryGuard: Check Current Reply or simply save the file if autoCheckOnSave is enabled.
  3. Observe:
    • The status bar updates to show the latest guard status.
    • The MemoryGuard Output channel displays the full JSON response and a human-readable summary of the check.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft