Advanced
Sessions: reopen last time's windows
With the Sessions module, WolOS remembers your terminal and coding-agent windows and offers once at login to reopen them on their desktops, in their folders.
On this page
What it is
A session here is the set of A window where you type commands instead of clicking. Super+Return opens one. and coding-agent windows you had open: which desktop each was on, which folder it was in, and what it was running. With the Sessions An optional set of tools for one kind of work (development, creative work, gaming, AI) that you add or remove in Settings > Modules. installed, WolOS saves that set while you work and, at your next login, asks once whether to open those windows again.
Only terminals and agents are saved. Other apps reopen as they always do (Settings > General > Login Items).
Why
Work in a terminal is mostly place: the project folder, the desktop it lives on, the agent conversation you were in. A restart, a crash or a power cut throws that away, and rebuilding it by hand takes longer than the restart did. No program survives a reboot, but the place does, so WolOS keeps the place and starts the programs again.
It asks instead of doing it on its own, because some days you want a clean desk.
How
Install the module. Settings > Modules > Sessions (it asks for an administrator's password), or
wol modules install ai-sessionsin a terminal. See Modules.Work as usual. Every minute WolOS saves the terminal and agent windows of this session, so a crash or a power cut loses at most a minute.
Log in again. A notification asks:
You see "Reopen 3 windows from last time?" with "Your terminals and coding agents open again on their desktops, in their folders." and a Reopen button.
Click Reopen. Each window opens again on its desktop, in its folder: a plain terminal as a terminal, a named terminal multiplexer session reattached, a coding agent continuing its last conversation (
claude --continue).Or dismiss the notification. Nothing reopens. WolOS starts saving this new session instead, so the old set is replaced about a minute later.
The offer comes once per login, and only for a set saved in the last 30 days. Up to 64 windows are kept.
From a terminal:
| Command | Does |
|---|---|
wol sessions list | Shows the saved windows (--json for scripts). |
wol sessions save | Saves the current set now. |
wol sessions restore | Reopens the saved set now. |
A helper or assistant may read the list; saving and reopening always show an approval sheet, every time (Assistants and automation).
What is saved, and what never runs
The file is ~/.local/state/wolos/sessions.json, in your account. For each window it keeps the desktop number, the folder, the kind (terminal or agent), a title and one of a few known commands. On restore the command is matched against that fixed list and rebuilt from it, never run as text, and a folder must be a plain absolute path. A window whose entry does not pass is skipped. A file someone edited by hand can therefore move a window, but cannot make WolOS run a program of its choosing.
A worked example
Alice has a terminal in her project folder on desktop two and another running a build on desktop three. The power goes out. At login a notification asks whether to reopen her windows; she clicks yes, and both terminals are back on their desktops in their folders, ready for her to run the build again.
If something goes wrong
| What you see | What to do |
|---|---|
| No offer at login | The module is not installed, nothing was saved in the last 30 days, or this login already asked. wol sessions list shows what is saved. |
| Apps other than terminals did not come back | Sessions keeps terminals and agents only. Add other apps to Settings > General > Login Items. |
An assistant's wol sessions restore asks you | That is the gate: reopening windows always asks. |
Related
- Scripts and shellsRun sh, bash and Ruby scripts with wol script: checked before they run, as you, every change asked on screen and every run recorded. And choose the shell new terminal windows open in, PowerShell included.
- Modules: tools for what you doDeveloper tools, AI assistants, creative apps, games and a richer terminal, each added in one step from Settings > Modules and removed in one step.
- PowerShell basicsUse PowerShell on WolOS: add it, open it, the Verb-Noun commands, objects in the pipeline, help, and making it the shell of every new terminal window.
- Your first Ruby scriptWrite a small Ruby script in a text editor, check it with wol script check, run it with wol script run, and see what WolOS asks before a script changes anything.
- Your first app in CrystalWrite, build and run a small WolOS app in Crystal with Cryswol: it reads the system, tries to post a notification, and handles a refusal the way every app must.