Persistence
katu stop --all (or a server restart via SIGTERM) writes every running
session’s windows and splits — with each pane’s working directory — to
~/.katu/sessions.json before it exits. Run katu resurrect afterward (it
starts the server if needed) to recreate them: same windows, same splits, same
directories, fresh shells.
Agent windows come back running the AI command again rather than a plain shell,
and resume the actual conversation if [ai] resume_flag is set. Sessions
already running under a saved name are left alone, so running it again is
always safe.
This is v1 and deliberately minimal: no scrollback, no popup state, no zoom,
and no autosave — only a clean shutdown saves anything, so a crash isn’t
covered. AI context needs no special handling: context files are keyed by
session name alone, so a resurrected session reconnects to its existing
KATU_AI_CONTEXT automatically.