Resuming a session

Relay has two resume shapes:

  • Repo sessions under .agent-relay/sessions/, used by the interactive REPL and scriptable commands.
  • Daemon snapshots under ~/.relay/snapshots/, produced by the always-on daemon when it sees rate-limit events.

Resume in the REPL

Start the interactive shell and use /resume:

terminal
relay
text
/resume
/resume <session-id>

Relay restores the visible prompt/output transcript from the saved turn artifacts, restores provider session metadata when available, and keeps using the same repo-local session lineage for later turns and handoffs.

Continue from scripts

For command-mode automation, use --continue:

terminal
agent-relay run c --continue <session-id> --task "Pick up where we left off"
agent-relay chat c x --continue <session-id> --task "Review and finish this"
agent-relay race c x --continue <session-id> --task "Continue the migration"

The command reads saved session artifacts and creates continuation context for the new managed run.

Resume a daemon snapshot

When the always-on daemon captures a rate-limit snapshot, list and open it with:

terminal
relay snapshots
relay resume <snapshot-id>

Use --print when you only want the Markdown primer:

terminal
relay resume <snapshot-id> --print

The snapshot is daemon-side context. When run inside a repo, Relay can also write a small breadcrumb under .agent-relay/handoffs/<id>/ pointing back to the global snapshot.

Find the session you want

Every repo session is a directory under .agent-relay/sessions/:

terminal
ls -t .agent-relay/sessions | head

Use /status in the interactive shell, or agent-relay status from another terminal, for a formatted view:

text
/status

Coming back tomorrow

No special daemon state is required for a normal repo session. If .agent-relay/sessions/<id>/ still exists, launch relay and /resume it.

Cross-machine resume

Repo sessions are file-backed. To move one, copy the session directory into the same repo on another machine:

terminal
rsync -av .agent-relay/sessions/<id>/ remote:/path/to/repo/.agent-relay/sessions/<id>/
ssh remote
cd /path/to/repo
relay

Then run:

text
/resume <session-id>

Review session artifacts before sharing them. They may contain prompts, model outputs, file paths, diffs, and provider metadata.

Next