Skip to main content
A JSONL store saves each session as one plain text file in a directory you choose. Every line is a JSON object: line 1 is the session header, and each subsequent line is one conversation entry. See Session file format for the complete schema.
A JSONL store holds sessions only. Intercom continues using its own store (local files by default, or top-level storage when configured).

When to choose JSONL

Choose JSONL when you want sessions as ordinary plain-text files on a single machine:
  • Inspect, grep, or diff sessions with standard text tools.
  • Copy or back up the folder like any regular directory.
  • Delete individual sessions by deleting their files.
For most single-machine workflows, keep the default local SQLite store (which adds worktree snapshots and zero-copy forks). To share sessions across machines, use PostgreSQL.

Select a JSONL store

Configure sessions.storage in ~/.atomic/agent/settings.json or a trusted project’s .atomic/settings.json:
You can also select a JSONL directory from the environment or CLI: Use an absolute path to avoid path-resolution surprises. Atomic creates the directory automatically if it does not exist. From the SDK, pass sessionStore: { kind: "jsonl", dir } (see SDK session storage). Validation rules:
  • { "dir": "..." } is valid only in sessions.storage and ATOMIC_SESSIONS_STORAGE. Using it in top-level storage, --storage, --storage-file, or ATOMIC_STORAGE fails with StorageConfigError.
  • --session-dir cannot be combined with --session-store or --no-session.
  • A non-empty ATOMIC_CODING_AGENT_SESSION_DIR cannot be combined with ATOMIC_SESSIONS_STORAGE, --storage, or --storage-file (StorageConfigError with reason conflicting-overrides).
When multiple options are set, see Which selection wins. Run atomic storage status in your project directory to inspect the active store.

Where the files go

Session files sit directly inside the directory you selected:
Filenames combine the creation timestamp (: and . replaced with -), _, and the hex SHA-256 hash of the session ID. Sessions from all projects share the same directory; line 1 records cwd, which /resume uses to filter sessions for the current project. Alongside .jsonl files, Atomic maintains these sidecars and folders: To delete a session, select it in /resume and press Ctrl+D (moves to trash when a trash command is installed), or delete its .jsonl and .jsonl.idx files directly.

Several Atomic processes

Multiple Atomic processes on one machine can safely share the same JSONL directory at the same time:
  • Parallel across sessions, serialized per session. Writers coordinate through operating-system advisory locks striped across 32 lock files (while also maintaining .session.lock for compatibility with older Atomic releases). Writes to different session files proceed concurrently, while writes to the same session file wait in order. If a writer process crashes or is killed, the OS releases its lock immediately so the next writer proceeds without waiting out a 10-second stale timeout.
  • Crash-safe grouped saves. Saves queued behind an active write are batched together under one lock, and every save waits until its bytes are synced to disk before being acknowledged. New, forked, or replaced session files are synced before being renamed into place.
  • File handles during writes. On Unix/macOS, Atomic keeps an active session file open between rapid saves and closes it once writes pause. On Windows, Atomic closes each file immediately after writing so other operations can delete or replace it.
Keep a JSONL directory on a local disk of a single machine. Do not share it across machines over a network drive (NFS/SMB) or cloud-synced folder.

What JSONL doesn’t do

Compared with local SQLite or PostgreSQL, a JSONL directory store:
  • Cannot be shared across machines. Use PostgreSQL for multi-machine access.
  • Writes full copies on fork. Unlike SQLite and PostgreSQL shared-history forks, JSONL forks duplicate the full parent file on disk.
  • Does not record worktree snapshots. Worktree snapshots require a SQL database store.
  • Cannot resume subagents on another machine. Subagents launched from a JSONL store stay tied to the local machine (see Resume on any machine).

Move to SQLite or PostgreSQL

1

Export your JSONL sessions

Run atomic storage export while the JSONL store is still selected. If you normally select it with --session-dir, pass ATOMIC_SESSIONS_STORAGE for this command instead (atomic storage export does not accept --session-dir):
2

Stop selecting the JSONL store

Remove sessions.storage from your settings, and unset ATOMIC_SESSIONS_STORAGE and ATOMIC_CODING_AGENT_SESSION_DIR.
3

Import into SQLite or PostgreSQL

Into default local SQLite:
Into PostgreSQL (after completing Set up the database):
4

Verify and clean up

Confirm your sessions appear in /resume and atomic storage status shows the new store. Import leaves the original JSONL files untouched—delete the directory once you verify everything migrated. See Exporting and importing sessions for details.