Skip to content
| Marketplace
Sign in
Visual Studio Code>Notebooks>Notebook WatchdogNew to Visual Studio Code? Get it now.
Notebook Watchdog

Notebook Watchdog

keigokusumegi

|
4 installs
| (0) | Free
Automatically reloads Jupyter notebooks when modified externally by AI agents or scripts
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Notebook Watchdog

Automatically reloads .ipynb notebooks in VS Code when they are modified externally — by AI agents, scripts, or other tools.

The Problem

VS Code's notebook editor doesn't detect external file changes (vscode#171920). When an AI agent (Claude Code, Cursor, etc.) edits your .ipynb on disk, you won't see the changes until you close and reopen the file.

How It Works

  1. Polls open .ipynb files for changes every ~1 second
  2. Automatically reloads the notebook when an external change is detected
  3. Supports lock files — external tools can create a .watchdog.lock file to batch edits; the notebook reloads once the lock is removed

Lock File Protocol

For tools that make multiple writes in sequence (e.g., running notebook cells), you can prevent intermediate reloads by using a lock file:

  1. Create <notebook>.ipynb.watchdog.lock before editing
  2. Make your changes to the .ipynb file
  3. Delete the lock file when done

The extension pauses reload while the lock exists and applies the final result when the lock is removed.

Commands

  • Notebook Watchdog: Accept All External Changes — Manually reload the notebook from disk

Status Bar

Status Meaning
$(notebook) Watchdog Watching for external changes
$(lock) Watchdog (locked) External lock active, reload paused

Limitations

  • Unsaved edits are overwritten. When an external change is detected, the notebook is reloaded from disk immediately. Any unsaved edits in the editor will be lost. Save your work before letting AI agents or external tools modify the file.

Requirements

  • VS Code 1.85+
  • Jupyter extension (for .ipynb support)

Settings

No configuration needed. Activates automatically when you open a Jupyter notebook.

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