Skip to content

Manage tabs and kernels

Molt always presents four tabs. Each tab owns a separate Python subprocess and a separate execution queue.

Select Tab 1 through Tab 4, or press Cmd+1 through Cmd+4.

Within one tab:

  • Variables, functions, classes, and imports survive from one cell execution to the next.
  • Requests execute sequentially through that tab’s queue.
  • Execution counts increase independently.

Across tabs:

  • Namespaces are isolated.
  • Queues are independent.
  • Long-running work in one tab does not prevent another tab’s kernel from running.
  • Source is stored separately by tab.

Kernels start lazily. Tab 1 starts during app initialization; another tab starts when first selected or when its code is run.

The toolbar shows the frontend execution coordinator’s kernel state, while a running cell changes its run button to a square interrupt button.

Select Stop to kill the active tab’s Python process.

Stop preserves:

  • Cell source and order.
  • Existing rendered outputs.
  • Saved notebook data.

Stop discards the live namespace. The tab cannot execute again until you select Restart.

Select Restart to kill the current process and spawn a new one for the active tab.

Restart:

  • Discards variables, imports, and other live Python state.
  • Clears rendered cell outputs.
  • Leaves source and cell order intact.
  • Creates a new Python process with the interpreter captured when Molt launched.

If a cell is busy, Molt asks for confirmation before restarting.

Recover after interruption or process exit

Section titled “Recover after interruption or process exit”

Restart when any of these occurs:

  • An interrupt is followed by a terminated-kernel error.
  • Native code or a package crashes the Python process.
  • The toolbar reports stopped or error.
  • Execution requests stop receiving responses.

After Restart, rerun the cells needed to reconstruct the namespace. Saved source remains available, but Molt does not replay cells automatically.

Goal Control Source removed? Namespace removed? Outputs removed?
Remove all visible cells Clear Yes Yes Yes, with the cells
Pause execution and kill Python Stop No Yes No
Rebuild Python while keeping code Restart No Yes Yes
Cancel the current cell Cell square button No Only if it remains busy after two seconds Current result becomes an error or fails

After Clear, select Restart before running new code.

A practical pattern is:

  1. Put imports and setup in the first cell.
  2. Put data preparation in following cells.
  3. Put calculations or checks in later cells.
  4. Select Restart.
  5. Select Run All.
  6. Verify that the tab succeeds from a fresh namespace.

This sequence is the closest Molt provides to notebook reproducibility. There is no automatic restart-and-run-all command in this release.