Using Gray

Sessions & resume

Sessions are JSONL transcripts on disk with parent-id branching, so you can resume any AI agent conversation at exactly the point it stopped.

Source: crates/gray/src/session_store.rs

Every session is a JSONL file under ~/.gray/sessions. Each line is one message with a parent id, which makes the history a tree rather than a list — branching from an earlier point does not destroy what came after it.

gray -c                    # resume the most recent session
gray resume                # pick from a list
gray resume --all <id>     # resume by id or prefix, ignoring the cwd filter

Sessions are filtered by working directory by default, so resuming inside a repo shows that repo's conversations first.