---
title: Sessions and traces
description: Every conversation is saved with every step; reopen one later, and read the trace to see exactly what the agent did and how long it took.
---
# Sessions and traces

## Sessions

Each conversation is a **session**, saved as it goes — every message, tool call, result, error and denial.

- `/sessions` lists them; `/resume <id>` reopens one and continues where you left off. In the web UI they are the first section of the left panel.
- `/new` starts a fresh one in the same project.
- Resuming a session from a previous run tells the agent what changed since (for example, servers it had started are no longer running).
- `/delete <id>` removes one.

## Traces

Next to each session there is a **trace**: a plain-text log, one line per step, with elapsed time and tokens — the fastest way to see where the agent did well or badly.

```
12:03:41  step 3   read src/api/auth.ts                    41 lines      0.1s
12:03:44  step 4   edit src/components/LoginForm.tsx       +6 −1         2.8s
12:03:44  ask      bash npm test                           → allowed
12:03:52  step 5   bash npm test                           exit 0        7.9s
12:03:55  done     5 steps · in 11,802 · out 640 · 38s
```

`/trace` in the terminal (or `/trace 2` for the one before), `≡` next to a session in the web UI, or `tail -f ~/lampson/.lampson/ws/<name>/.lampson/trace/<id>.log`.

## Tokens and budget

`/tokens` shows what this session has used. Each turn has a budget (400k tokens of cost by default); at 80% the agent is nudged to wrap up, at 95% it must answer without more tools. Prompt caching is on for providers that support it, so long sessions stay cheap.

## Long outputs

A tool result over 10k characters is saved whole to a file and the model sees the beginning, the end and the path — it can read the rest in pages. Old results are folded into one-line receipts as the conversation grows, and the context is compacted when it gets too long. You do not have to manage any of this; it is why a session can run for hours.
