Sessions
ra persists every conversation as JSONL. Resume any session from any interface — CLI, REPL, or HTTP.
Resuming a session
CLI:
bash
ra --resume <session-id> "Continue with the next step"REPL:
› /resume abc-123HTTP API:
json
{
"messages": [{ "role": "user", "content": "Continue" }],
"sessionId": "abc-123"
}Auto-save
Sessions are saved automatically after each turn. You never need to explicitly save.
When AskUserQuestion suspends a CLI run, the session ID is printed to stderr so you can resume later:
Session suspended. Resume with: ra --resume ses_abc123Listing sessions
bash
ra session listVia the HTTP API:
bash
curl http://localhost:3000/sessionsConfiguration
Sessions are stored under {dataDir}/sessions/ (default: .ra/sessions/). Set dataDir to change the root data directory.
yaml
dataDir: .ra # root for all runtime data
storage:
maxSessions: 100 # max sessions to keep (auto-prune oldest)
ttlDays: 30 # auto-expire sessions older than thisStorage format
Sessions are stored as JSONL files — one line per message. This makes them easy to inspect, grep, or process with standard tools:
bash
cat .ra/sessions/ses_abc123.jsonl | head -5See also
- CLI — resuming sessions from the command line
- REPL —
/resumeand/clearcommands - HTTP API —
sessionIdfield in requests - Configuration — storage settings