Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Codex Diff GuardNew to Visual Studio Code? Get it now.
Codex Diff Guard

Codex Diff Guard

yamakawanin

|
1 install
| (0) | Free
Record a workspace snapshot before AI edits and review changed files with VS Code diff.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Codex Diff Guard

Codex Diff Guard records an in-memory workspace snapshot before AI edits, then shows changed files with VS Code diff. It does not require Git and does not call the OpenAI API.

Use Cases

  • You asked Codex, Copilot Agent, or another AI tool to modify code and want to review exactly what changed.
  • You do not want to run git init for every temporary or small project.
  • You want a familiar red/green diff experience like Git diff, without depending on a Git repository.

How To Use

  1. Open a project folder.
  2. Codex Diff Guard starts recording automatically.
  3. Ask Codex or another AI tool to modify code.
  4. Save changed files.
  5. Check M, N, and D markers in the Explorer.
  6. Diffs open automatically when files change. You can also click Show Diffs.
  7. Click a changed file to open the red/green diff again.
  8. If you are satisfied with one file, run Codex Diff Guard: Accept Selected File.
  9. If you want to accept everything, run Codex Diff Guard: Accept All Snapshot.
  10. If you want a fresh baseline, run Codex Diff Guard: Start Recording again.
  11. If you are not satisfied, run Codex Diff Guard: Revert Selected File.

Diff Colors

  • Red = code from the recorded snapshot was deleted.
  • Green = code in the current file was added.

Explorer Markers

  • M = modified file.
  • N = new file or new folder.
  • D = deleted file.

Commands

  • Codex Diff Guard: Start Recording
  • Codex Diff Guard: Show Changed Files
  • Codex Diff Guard: Show All Diffs
  • Codex Diff Guard: Accept Selected File
  • Codex Diff Guard: Accept All Snapshot
  • Codex Diff Guard: Revert Selected File
  • Codex Diff Guard: Clear Recording
  • Codex Diff Guard: Toggle Open Diff On File Open
  • Codex Diff Guard: Export Code as PNG

Export Code as PNG

Use Codex Diff Guard: Export Code as PNG from the command palette or the editor title button. If text is selected, the selection is exported. Otherwise, the whole current file is exported. The PNG uses Courier New as its code font. Common syntax elements such as keywords, strings, comments, and numbers are exported with color.

Limits

  • The extension cannot prove that a change came from Codex.
  • It only detects which files changed after Start Recording.
  • Snapshots are stored in memory by default and are not written to disk.
  • It is not Git and does not replace Git.
  • Files larger than 1 MB are skipped by default to keep VS Code responsive.

Safety

  • No network requests.
  • No OpenAI API calls.
  • No code upload.
  • Snapshots are stored in memory by default.

Development

Install dependencies and compile:

npm install
npm run compile

Press F5 in VS Code to launch the Extension Development Host.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft