Skip to content

05_Sessions

Umut Sevdi edited this page Oct 24, 2026 · 4 revisions

Sessions

Every conversation is a session; sessions persist automatically and can be restored later.

What Is Saved

The conversation (user and assistant turns, tool calls and results), todos, every revision of the session's plan document, compacted-context metadata, the session mode (Plan/Build), the title, and the working directory it belongs to.

Runtime-only state is never saved: permission grants, the /undo history, running subagents, pending modals, and interrupt state start fresh on restore. Provider credentials and preferences live in configuration, not in sessions.

In the TUI

  • Exiting Imza saves the session automatically, then lists recent sessions.
  • /sessions opens the session manager: ↑↓ choose, Enter load, DEL delete (with confirmation), Esc close.
  • /new saves the current session and starts a fresh one.
  • /cd <path> switches the working directory mid-session; see Workflow.
  • Loading is refused while the current session still has pending work. Finish or interrupt first.
  • Loading a session switches to its saved working directory; a workspace path that no longer exists falls back to the current directory.

From the Command Line

imza --session ls            # list saved sessions
imza --session <id>          # open a session by ID
imza --session rm <id>       # delete a session

Restoring switches to the session's saved working directory unless you pass a directory argument. --session <id> combines freely with the headless flags.

See Headless mode.

Storage

Sessions live in the platform data directory (see Configuration) behind a cross-process file lock, so concurrent Imza instances cannot corrupt each other's data. A background-loaded session index keeps listings fast. Only meaningful unsaved sessions are written.

Clone this wiki locally