<!-- Markdown mirror. Canonical: https://empryo.com/docs/tools/sessions -->

# Sessions

> Empryo auto-saves every conversation as crash-resilient JSONL. Resume by prefix, export to markdown or JSON, branch with tabs, and restore checkpoint git tags.

Every conversation is a session. Empryo auto-saves sessions as JSONL files to `~/.empryo/sessions/` with crash-resilient incremental writes. You can resume any past session, export it, or start fresh.

## Resume

Press `Ctrl+P` to open the session picker. Filter by text, pick a session, continue where you left off.

From the CLI:

```bash
empryo --headless --session <prefix> "now add tests"
```

Session IDs match by short prefix, so `abc` finds `abc123...`.

## Auto-save

Sessions save after every turn. No manual save needed. If Empryo crashes, the session reconstructs fully on relaunch, including mid-stream tool calls.

## Export

```
/session export markdown
/session export json
/session export clipboard
/session export all          full diagnostic dump (prompt + tools)
/session export api          toggle per-step API request logging
```

## Portable bundles

A bundle is the session directory as one `.empryo-session.tar.gz` - the transcript, metadata and sidecars, byte for byte. Move a session to another machine or another checkout and it resumes there like a native one.

```
/session bundle                       export this session (to .empryo/exports/)
/session bundle path/to/out.tar.gz    export to an explicit file
/session bundle import <file>         import a bundle into this project
```

Import never overwrites: a colliding session id lands under a suffixed one, and hostile archive entries (path traversal, non-session files) are refused before a byte is written.

## Checkpoint tags

Sessions carry their [checkpoint](/docs/tools/checkpoints) git tags. Restoring a session restores its undo history. Deleting a session cleans up its tags.

## Shortcuts

| Key | Action |
|-----|--------|
| `Ctrl+P` | Browse sessions |
| `Ctrl+N` | New session (saves current) |
| `Ctrl+B` / `Ctrl+F` | Walk checkpoints within a session |

## Multiple tabs

Each tab inside a session keeps its own messages and checkpoint history. Tabs persist across saves and resumes.
