# SessionStore

**Kind:** Class

**Source:** [`atloria-monorepo/libs/agent-core/src/session/session-store.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/agent-core/src/session/session-store.ts#L69)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `save` | `save(snapshot: SessionSnapshot)` | `void` |
| `load` | `load(id: string)` | `SessionSnapshot | undefined` |
| `list` | `list()` | `SessionMeta[]` |
| `delete` | `delete(id: string)` | `boolean` |
| `latest` | `latest()` | `SessionMeta | undefined` |
| `getMeta` | `getMeta(id: string)` | `SessionMeta | undefined` |

## Where it refuses work

- `SessionStore` stops the work with an early return when `!fs.existsSync(sessionPath)`.
- `SessionStore` stops the work with an early return when `!fs.existsSync(p)`.

## When something fails

- `SessionStore` handles failure in 5 places: it turns it into a return value in 2, discards it silently in 2, and lets it reach the caller in 1. A failure discarded silently leaves no trace for whoever debugs this later.
