Terminal Session Keeper v1.0.0
Saves your open Windows Terminal tabs — including the live agent conversations inside them — and
puts them back after a restart, each tab in its own directory with its resume command waiting at
the prompt.
Download: TerminalSessionKeeper.exe — single self-contained executable, no .NET runtime needed, no elevation.
The exe is unsigned, so Windows SmartScreen may warn on first run. Click More info → Run anyway.
What it does
- Identifies tabs by
WT_SESSION, the id Windows Terminal puts in every pane's environment.
Process start times are never used: WSL's clock drifts from the host's across hibernate, by many
hours and not by a constant offset. - Resumes Claude Code, Codex, Antigravity (
agy) and Junie, on both the Windows and
the WSL side of a tab. Session ids come from the running processes themselves — Claude's open
session handle inside WSL, the Codex and Antigravity SQLite state — so two tabs in one folder
still get their own conversation. - Matches titles to tabs by content, not by position: the shell's own title, then the agent's
session title, then the git branch — which is how a tab renamed to its ticket finds its
checkout again — then the folder name. One tab and one title left over are paired; more than one
are reported rather than guessed at. - Puts each tab back with its resume command waiting at the prompt. Nothing runs until you
press Enter — a dozen agents and their MCP servers all booting at once, right after a reboot, is
rarely what you want. - Needs no shell-side hook. The WSL side is driven the same way as the Windows side, by
attaching to the tab's console and typing into it, so there is nothing to add to your dotfiles. - Keeps tab colours. No Windows Terminal API exposes them, so the window is asked to render
itself and the colour is read from the tab's own pixels — which works even while the terminal is
behind other windows. A minimized window cannot be read, and those colours carry forward from the
previous snapshot instead. - Restores automatically after a reboot, but only on the first run and only when no terminal window
is already open — restoring beside a live window would put both into the next snapshot.
Requirements
Windows Terminal 1.18 or newer. WSL tabs additionally need python3 inside the distro; Windows tabs
work without WSL at all.
Verify your download
Get-FileHash .\TerminalSessionKeeper.exe -Algorithm SHA256DE9C78979EE6826AC0E7DD317E70E16813AF87C0A366F1D9507DE0468716F81C