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
Polls open .ipynb files for changes every ~1 second
Automatically reloads the notebook when an external change is detected
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:
Create <notebook>.ipynb.watchdog.lock before editing
Make your changes to the .ipynb file
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.