Manage tabs and kernels
Molt always presents four tabs. Each tab owns a separate Python subprocess and a separate execution queue.
Use tabs as isolated contexts
Section titled “Use tabs as isolated contexts”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.
Read the running indicators
Section titled “Read the running indicators”The toolbar shows the frontend execution coordinator’s kernel state, while a running cell changes its run button to a square interrupt button.
Stop a kernel
Section titled “Stop a kernel”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.
Restart a kernel
Section titled “Restart a kernel”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.
Choose between Clear, Stop, and Restart
Section titled “Choose between Clear, Stop, and Restart”| 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.
Run a reproducible tab
Section titled “Run a reproducible tab”A practical pattern is:
- Put imports and setup in the first cell.
- Put data preparation in following cells.
- Put calculations or checks in later cells.
- Select Restart.
- Select Run All.
- 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.
