Code-mode cell edits never reach the editor, and the stale editor code overwrites them
I maintainer di solito rispondono entro 1 giorno
@manzt ci sta già lavorando.
Dal 9/10/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the bug
Context: the edits are made by an AI coding agent (Claude Code, through the marimo-pair skill). It runs code in the kernel's scratchpad and changes cells with marimo._code_mode. A person has the same notebook open in the browser at the same time.
Steps to reproduce
- Open
nb.pyin the browser. - From the scratchpad, edit and run an existing cell:
async with cm.get_context() as ctx:
ctx.edit_cell(cid, code=new_code)
ctx.run_cell(cid)
- Reload the browser tab.
Expected: the cell editor shows new_code, both after the edit and after the reload.
Actual
- After step 2: the output, the file on disk,
ctx.cells[cid].codeandctx.graph.cells[cid].codeall reflectnew_code. The cell editor in the browser still shows the old code. - After step 3: the editor still shows the old code.
ctx.cells[cid].codehas gone back to the old code, whilectx.graph.cells[cid].codekeepsnew_code. - Running or saving from the tab: this writes the old code back to the kernel and the file, silently undoing the agent's edit.
- Workaround: only a server restart fixes it, since the new session loads from disk.
It happens on every attempt and has repeated over several sessions.
Will you submit a PR?
- Yes
Environment
marimo 0.25.1, Python 3.14, macOS, Chrome Version 154.0.8037.98 (Official Build) (arm64). It happens with marimo edit nb.py, with or without --watch, with or without watchdog installed.
Code to reproduce
No response
- Lingua principale
- Python
- Stelle
- 22.9k
- Fork
- 1.3k
- Merge medio
- 1g 10h
- PR unite (30g)
- 380
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di marimo-team/marimo
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
marimo-team/marimo#12027 ·
I maintainer di solito rispondono entro 1 giorno
-
"Clamp all outputs" leaves cells without output marked `expand_output: true`Forse già presa @marthacryan l’ha presa 12 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 91/100
marimo-team/marimo#11768 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Cell referencing a variable from a "cancelled" cell runs and raises NameError instead of being blockedForse di nuovo libera @dmadisetti l’ha presa 33 giorni fa e non c’è nessuna pull request aperta. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
marimo-team/marimo#11307 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
molab
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
marimo-team/marimo#11298 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Theme change does not affect terminal colorsForse di nuovo libera @CloudCorpRecords l’ha presa 36 giorni fa e non c’è nessuna pull request aperta. Apertaneeds discussion
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
marimo-team/marimo#11244 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di marimo-team/marimo
Issue simili
-
run_gate loads a custom tasks file from outside the working directoryForse già presa @Ru0k3 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
MakazhanAlpamys/Soup#3189 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
nautechsystems/nautilus_trader#5741 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
huggingface/datasets#9128 ·
I maintainer di solito rispondono entro 1 giorno