Skip to content

Content lost while editing with watch flag enabled #7014

@fonnesbeck

Description

@fonnesbeck

Describe the bug

When editing cells (markdown or python) in the editor interface with the --watch flag enabled, text is deleted shortly after being typed.

Here is an example, moving the cursor up and beginning to type a heading. The cell quickly reverts to its original state:

Screencast.From.2025-10-30.12-52-10.mp4

This happens even without the file open in a text editor.

Will you submit a PR?

  • Yes

Environment

{
  "marimo": "0.17.3",
  "editable": false,
  "location": "/var/home/fonnesbeck/repos/xg_model/.pixi/envs/default/lib/python3.13/site-packages/marimo",
  "OS": "Linux",
  "OS Version": "6.16.10-200.fc42.x86_64",
  "Processor": "",
  "Python Version": "3.13.9",
  "Locale": "en_US",
  "Binaries": {
    "Browser": "142.0.7444.59",
    "Node": "v22.20.0"
  },
  "Dependencies": {
    "click": "8.3.0",
    "docutils": "0.22.2",
    "itsdangerous": "2.2.0",
    "jedi": "0.19.2",
    "markdown": "3.9",
    "narwhals": "2.10.0",
    "packaging": "25.0",
    "psutil": "7.1.2",
    "pygments": "2.19.2",
    "pymdown-extensions": "10.16.1",
    "pyyaml": "6.0.3",
    "starlette": "0.49.1",
    "tomlkit": "0.13.3",
    "typing-extensions": "4.15.0",
    "uvicorn": "0.38.0",
    "websockets": "15.0.1"
  },
  "Optional Dependencies": {
    "loro": "1.8.2",
    "mcp": "1.19.0",
    "nbformat": "5.10.4",
    "pandas": "2.3.3",
    "polars": "1.35.0",
    "pyarrow": "20.0.0",
    "pytest": "8.4.2",
    "ruff": "0.14.2"
  },
  "Experimental Flags": {}
}

Code to reproduce

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions