Notebook editor shows stale cell source during Copilot notebook edits
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
[513962fc-084a-4180-a692-a165ac7efb3f.jsonl.txt](https://github.com/user-attachments/files/30347932/513962fc-084a-4180-a692-a165ac7efb3f.jsonl.txt)
[main.jsonl.txt](https://github.com/user-attachments/files/30347939/main.jsonl.txt)
[models.json.txt](https://github.com/user-attachments/files/30347940/models.json.txt)
[cli.log](https://github.com/user-attachments/files/30347943/cli.log)
[Template Based Diagram Layouts.ipynb](https://github.com/user-attachments/files/30347945/Template.Based.Diagram.Layouts.ipynb)
Type: Bug
# Minimal Repro (VS Code Notebook Stale Editor)
Title: Notebook editor shows stale cell source during Copilot notebook edits
1. Open VS Code and create/open a Python notebook.
2. Add a code cell with `x = 1` and run it.
3. Keep the notebook open in the editor.
4. Use Copilot to edit a notebook cell (or apply a tool-driven .ipynb rewrite) so the same notebook is modified while open.
5. Return to VS Code without closing the notebook tab.
6. Observe the cell source may still display `x = 1` (stale in-memory state).
7. Run the visible cell and compare with disk content.
8. Expected: editor refreshes/prompts reload and executes latest on-disk cell source.
9. Actual: editor can remain stale; edits/runs may not match latest file content.
10. Workaround: close/reopen notebook (or reload window) to resync.
Environment:
- VS Code 1.130.0 (Windows x64)
- Notebook type: Jupyter (.ipynb)
## Why this matters
This issue creates high-friction, hard-to-diagnose workflow failures in notebook-heavy projects because developers can no longer trust that what they see, edit, and run is the same as what is on disk, especially when changes are made through Copilot notebook editing flows. The stale in-memory state leads to wasted debugging time, repeated rework, and accidental misreporting of results, particularly in data science and research contexts where reproducibility is critical. Even when intermittent, this behavior has outsized impact because it undermines confidence in notebook execution correctness and can silently delay teams unless users know to force a reload.
VS Code version: Code 1.130.0 (1b6a188127eeaf9194f945eb6eb89a657e93c54c, 2026-07-22T14:55:04Z)
OS version: Windows_NT x64 10.0.26200
Modes:
System Info
|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz (8 x 3000)|
|GPU Status|2d_canvas: enabled
GPU0: VENDOR= 0x10de, DEVICE=0x21c4 [NVIDIA GeForce GTX 1660 SUPER], DRIVER_VENDOR=NVIDIA, DRIVER_VERSION=32.0.15.6607 *ACTIVE*
GPU1: VENDOR= 0x8086, DEVICE=0x3e98 [Intel(R) UHD Graphics 630], DRIVER_VERSION=31.0.101.2115
GPU2: VENDOR= 0x1414, DEVICE=0x008c [Microsoft Basic Render Driver], DRIVER_VERSION=10.0.26100.8875
Machine model name:
Machine model version:
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgpu: enabled
webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.90GB (5.02GB free)|
|Process Argv|StructureRelations.code-workspace --crash-reporter-id a49824f5-6796-408e-895d-4601d64fa899|
|Screen Reader|no|
|VM|0%|
Extensions (18)
Name|Identifier|Author|Version
---|---|---|---
GitHub Codespaces|github.codespaces|GitHub|1.18.15
DICOM Tag Viewer|motivesoft.vscode-dicom-tag-view|Motivesoft|1.0.0
Playwright Test for VSCode|ms-playwright.playwright|ms-playwright|1.1.19
Python Debugger|ms-python.debugpy|ms-python|2026.6.0
Python|ms-python.python|ms-python|2026.4.0
Pylance|ms-python.vscode-pylance|ms-python|2026.3.1
Python Environments|ms-python.vscode-python-envs|ms-python|1.36.0
Data Wrangler|ms-toolsai.datawrangler|ms-toolsai|1.24.2
Jupyter|ms-toolsai.jupyter|ms-toolsai|2025.9.1
Jupyter Keymap|ms-toolsai.jupyter-keymap|ms-toolsai|1.1.2
Jupyter Notebook Renderers|ms-toolsai.jupyter-renderers|ms-toolsai|1.3.0
Jupyter Cell Tags|ms-toolsai.vscode-jupyter-cell-tags|ms-toolsai|0.1.9
Notepad++ keymap|ms-vscode.notepadplusplus-keybindings|ms-vscode|1.0.7
Code Spell Checker|streetsidesoftware.code-spell-checker|streetsidesoftware|4.5.6
Canadian English - Code Spell Checker|streetsidesoftware.code-spell-checker-canadian-english|streetsidesoftware|1.1.31
CSpell Bundled Dictionaries - Code Spell Checker|streetsidesoftware.code-spell-checker-cspell-bundled-dictionaries|streetsidesoftware|2.0.14
Medical Terms - Code Spell Checker|streetsidesoftware.code-spell-checker-medical-terms|streetsidesoftware|3.0.4
Scientific Terms - Code Spell Checker|streetsidesoftware.code-spell-checker-scientific-terms|streetsidesoftware|0.2.7
A/B Experiments
```
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31463988
aj953862:31281341
envsactivate1:31551504
478i5457:31544283
cloudbuttont:31379625
3efgi100_wstrepl:31403338
ec5jj548:31422691
cp_cls_t_966_ss:31526232
4je02754:31466945
c3h7c220:31478652
ge8j1254_inline_auto_hint_haiku:31490510
cp_cls_c_1081:31454833
conptydll_true:31498968
e9c30283:31461165
test_treatment2:31471001
46204921:31447328
control_6dc23131:31555649
idci7584:31464702
e3e4d672:31494082
ei9d7968:31496641
nes-extended-on:31455476
chat:31457767
8hig5102:31480529
89g7j272:31518289
7e187181:31503455
i2gc6536:31499202
52612955:31516516
ghj88844:31499326
h08i8180:31475369
ddid_c:31478207
hmra_i5g22:31518061
7df3h592:31512476
cp_cls_t_1082:31535311
logging_enabled_new:31498466
j0d79568:31499440
jb_cp_cls_t_632:31543129
748c7209:31512887
32d76977:31512328
ha629193:31508444
cdk-lw-on:31524445
f9bf7985:31543584
jh5f2457_c:31540921
hgf2d445:31529595
41836166:31537719
jbcp_cls_pctr_t:31531130
61138546:31518536
cp_intellij_t_nes:31548657
d7b18187:31526828
nes-curr-leftover-1500:31538366
8hjh2968:31555644
h561g132:31533256
sessions_5:31532894
chatquotatrajectorynudge-enabled:31548767
ihg5j128:31534457
f412h606:31551416
7g2b5551:31542111
max-result-20:31551156
5fe6f778:31554331
allow-none:31555437
fd5dc207:31551400
nes-gb3-nf-6k:31554346
0dg73464:31554319
d4c76da2:31554780
treatment-23-1:31555779
unuse_dynamic_mcp:31555281
```
Contributor guide
Assessment
This issue has not been assessed yet.