Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix: kernel should never be lazy in run mode (#2253)

Akshay Agrawal7df87d6f3df3
diff --git a/marimo/_runtime/runtime.py b/marimo/_runtime/runtime.py
index c215b2f06f..02ee3e114c 100644
--- a/marimo/_runtime/runtime.py
+++ b/marimo/_runtime/runtime.py
@@ -1908,6 +1908,11 @@ def launch_kernel(
else None
)
+ # In run mode, the kernel should always be in autorun
+ if not is_edit_mode:
+ user_config = user_config.copy()
+ user_config["runtime"]["on_cell_change"] = "autorun"
+
kernel = Kernel(
cell_configs=configs,
app_metadata=app_metadata,