# Sessions

Sessions keep context across long coding tasks so you can continue without restating everything.

## Why Sessions Matter

- Preserve task history, decisions, and tool outputs
- Resume complex work after terminal restarts
- Compare approaches by branching session state

## Basic Operations

### Start a new session

```bash
vox
```

### Continue latest session

```bash
vox --continue
```

### Continue by interactive selection

Launch `vox` and select from session history in the UI.

## Session Branching

Branching is useful when you want to test alternatives without losing the original path:

- branch A: minimal patch
- branch B: larger refactor

This keeps experiment history explicit and reviewable.

## Compaction

Long sessions can exceed model context. Compaction summarizes prior history while preserving critical facts.

Use compaction when:

- prompts start to get slower
- repeated context appears in every turn
- model behavior degrades due to context overload

## Best Practices

- Name sessions by objective (e.g., `auth-middleware-hardening`)
- Keep one goal per session when possible
- Compact periodically for long-running tasks
- Record verification results in the session before finishing

For details of on-disk format, see [session-format.md](session-format.md).
