Releases: alexlvcom/TerminalSessionKeeper
Release list
Terminal Session Keeper v1.2.2
Changes
- Enlarged Settings so its controls fit without clipping.
- Captured current PowerShell directories per Terminal tab through an optional prompt hook, and preserved saved directories when restoring.
- Kept tab titles aligned when strong matches confirm tab order.
- Prevented automation-shell
NO_COLORandTERM=dumbsettings from removing restored prompt colors. - Found Windows agents beneath shell wrappers and used the running Codex process's exact resume ID.
PowerShell tabs that change directory after launch need the prompt hook for accurate path capture.
SHA-256 (TerminalSessionKeeper.exe): 30EE71C4CEF0466C612CAA37DB856F965F7C63924251ACA1723746A347191908
Terminal Session Keeper v1.2.1
Fixed Settings not being saved. Closing the dialog cleared its internal reference before the saved values were applied, so the app threw an error and reopened with defaults. Environment variables and the WSL cd setting now persist.
Terminal Session Keeper v1.2.0
- New Settings tab, Environment: custom environment variables for restored WSL tabs, one
NAME=valueper line. They are added only to the tabs a restore opens, passed into WSL throughWSLENV; tabs you open yourself are not affected. - New setting, Type a cd into each restored WSL tab, on by default. It puts a tab back in its saved folder in case the shell changed directory while starting up; turn it off if yours does not, and no extra line is typed into the tabs.
Terminal Session Keeper v1.1.1
- A tab colour no longer moves to the neighbouring tab when the terminal is on a monitor scaled differently from the one at sign-in. The app was not per-monitor DPI aware, so Windows handed it tab positions scaled to the sign-in monitor while the rendered window stayed in real pixels: every tab was sampled a little left of where it is, a red tab's colour was recorded on the tab to its right, and others read as black. The app is now per-monitor aware, and a window whose tab positions still cannot be trusted to match its pixels is not sampled at all.
Terminal Session Keeper v1.1.0
- A restored tab colour can be cleared again. Windows Terminal keeps two colours per tab — the one the command line sets and the one the right-click picker sets on top of it — and the picker's Reset clears only the second, so a colour restored with
--tabColorcame straight back every time it was cleared. Colours are now applied the way the picker applies them, through thesetTabColoraction, which means lending Windows Terminal that action on an F13-and-up key for the second or two it takes to press it. The entries are removed by id afterwards, and by the next start if the app is killed mid-restore. - Tabs no longer pick up colours they never had. The sampler was reading its own output: a restored colour is sampled again on the next snapshot, and un-blending multiplies a rounding error by more than three, so colours drifted until they saturated —
#DD153Dbecame#FF0051, another tab sank to black, and a plain tab acquired a grey. A colour now has to be read the same way twice before it is recorded, a reading close to the colour on file leaves it alone, and a colour read as cleared twice is forgotten — so clearing one in the terminal sticks. - A frame the two background readings disagree about is no longer read at all. One bad frame that reported the tab strip as black had invented a colour for every uncoloured tab in the window at once.
- A tab scrolled out of an overflowing tab strip is skipped rather than sampled from the sliver of it still on screen.
- New setting, Put tab colours back when tabs are rebuilt, on by default. Turn it off to leave restored tabs uncoloured and Windows Terminal's settings untouched.
- A restore builds a window of its own again. Every restore aimed at one fixed window name, and
wt.exeadds a tab to a window that already has that name rather than making one — so the second restore appended its tabs to the window the first had built, however many days earlier. The configured name is now the prefix and the time the restore ran completes it.
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