Limits and Troubleshooting
What Nash does not save
- The position of a window, and the display or virtual desktop it was on. Nash saves the size, not the place.
- Scrollback. A restored pane starts with an empty screen.
- The processes themselves. A restored pane is a new shell. A command that had already finished is not run again.
- Restoring titles that programs set. These help identify panes in the picker, but restored programs supply fresh titles. An explicit tab name is restored.
- Anything between saves after a crash. Nash saves on exit, on termination signals, and when you run Save Window Session. It does not save on a timer.
Nash has no setting that turns the snapshot on or off. It always saves when it exits, and it restores only when you open the dialog.
Commands that run again
When a pane was running a command at the moment of the save, Nash types that command into the new shell and presses Enter. A dev server comes back up by itself. Nash does not ask first.
Nash replays a command only when all of this is true:
- The pane's shell reports the start and the end of commands with
shell integration.
Nash needs the command-start and command-finish markers (OSC 133) and the
NASH_PROGvariable that the shell integration sets. - The command was still running when Nash saved.
A command that had already finished is not replayed, and a pane at an idle prompt gets only its working directory.
Check before you restore. The dialog marks each pane that will run a command
with ▶ and the command text, for example ▶ npm run dev. A command with side
effects, such as a deploy or a database migration, runs again like any other
command. To avoid this, stop the command before you quit. Then Nash records the
pane as idle.
Without shell integration, Nash restores the working directory and the layout and replays no commands.
Why is my old layout gone?
In Nash 0.9.4, quitting a new default window no longer overwrites a different layout from an earlier session. Open Restore Saved Session and look through the save history, newest first.
Nash keeps the 50 newest saves. Saving the same layout again updates its existing entry; changes to sizes or focus alone do not create a different layout. An older layout can disappear if it falls outside the 50-save history, you change configuration directories, or another tool deletes its file.
Earlier versions kept only the latest snapshot, so quitting without restoring could overwrite the previous layout. Updating cannot recover a layout that an older build already overwrote.
A snapshot with no windows is not saved. Nash also keeps the layouts of the last 8 windows closed during a run.
The dialog says "No saved sessions yet"
Nash found no saves in the current history directory. Check these causes:
- Nash never saved. Quit Nash from the menu once, then start it again. You can also run Save Window Session from the command palette.
- A different configuration directory. Saves live under
state/saved-sessions/in the configuration directory. If you start Nash with a differentNASH_CONFIG_DIRorXDG_CONFIG_HOME, it looks in another place. The empty-state detail names the directory it checked. - The files are gone. Another tool or a cleanup script removed files from
~/.config/nash/state/saved-sessions/. - You updated from a build older than 0.5.7. Those builds discarded the snapshot when the application updated.
The dialog says "Saved sessions could not be loaded"
Nash could not list the history directory or read any of its saves. Check the path and error in the detail line, including directory permissions.
If only some files are unreadable, the header counts them and the readable saves remain available. Nash preserves unreadable files; saving again does not remove them.
Back up an affected file before attempting to repair it. If you edited it by hand, restore an unmodified copy. Removing one file removes only that save, not the whole history. Run Save Window Session to create a fresh save of your current layout.
Nash writes each save through a temporary file and a rename, so an interrupted save does not expose half a file.
A restored pane starts in the wrong directory
Nash saves the working directory that the pane reports. A pane that never reported one starts where a new tab starts. Enable shell integration so that your shell reports its directory.
Restored panes appear twice
If you use the multiplexer, the snapshot records panes that live in the server. A restore does not reattach to the panes that still run. It spawns new panes, so the old panes and the restored panes both exist.
Reach a running multiplexer session with nash mux connect <session>. Use the
restore dialog for panes that the Nash window owns.
Restore after an update
On macOS app bundles and Linux AppImages, nash update leaves your windows
running by default. Restart Nash yourself when you are ready. Nash saves the
session as each window exits, and you open Restore Saved Session in the new
build.
On those installs, nash update --restart closes the windows and starts the new
build for you. It saves the layout in the same way. The dialog does not open by
itself, so open it after the new build starts.
Windows installer updates close running Nash processes, even without
--restart. Save your work and run Save Window Session before updating if
you want a current layout snapshot.
See Update Nash from the command line for the full update procedure.
Remove a saved layout
Saves live in ~/.config/nash/state/saved-sessions/. Back up the directory,
then remove only the file for the layout you want to discard. Deleting every
save file clears the entire history and cannot be undone without a backup.
Nash writes a new save the next time it saves. Builds before 0.9.4 used
state/window-tab-state.json instead.