v1.20.60see what's new →

Sessions

Every run writes a transcript — prompts, tool calls, responses — to a local store, indexed by content and project. agents sessions searches it across Claude, Codex, Gemini, and OpenCode, replays it, and streams it live.

Search and read

Pass a query to search this project by topic, file path, or command; pass a session id to open one. A filter flag without --markdown/--json defaults to markdown output.

agents sessions "stripe webhook signature"       # search this project
agents sessions "deploy script" --all            # search every directory
agents sessions a7f3e2c1 --markdown              # replay as markdown
agents sessions a7f3e2c1 --include user          # just the user turns

--markdown renders user, assistant, thinking, and tool calls with secrets redacted by default. Narrow the replay with --include/--exclude <roles> or --first/--last <n> turns. The search reaches across every agent — one query, every CLI's history.

Live sessions

--active shows what is running right now across terminals, teams, cloud, and headless runs, grouped by directory. Each row carries a live state:

agents sessions --active           # everything running now, by directory
agents sessions --active --waiting # only sessions blocked on your input

Focus a live session

sessions focus jumps you into a running session — it attaches the terminal the session lives in, or opens a new tab and resumes it. Omit the id for an interactive picker.

agents sessions focus 80289224      # attach or resume a running session
agents sessions focus --attach-only # attach only, never open a new tab

Stream events

sessions tail follows a session's JSONL events as they are written — one event per line, Claude and Codex only. Start at the end, or replay from the beginning first.

agents sessions tail --latest                 # follow the most recent session
agents sessions tail a7f3e2c1 --from-start    # replay, then follow
agents sessions tail --latest | jq 'select(.type == "user")'

Query another machine

--host <name> runs the query on a remote machine's own index over SSH — no sync needed, SSH access is the only auth. Repeat it to fan the same query across several machines. The interactive listing folds in your other online machines automatically; --local keeps it to this box.

agents sessions "auth bug" --host yosemite-s1        # one remote index
agents sessions "deploy script" --host box-a --host box-b   # fan out
agents sessions --active --local                     # this machine only

Across devices

History also syncs across the fleet via CRDT merge, so a session started on one machine is readable everywhere. Sessions across devices →

Related: Teams, Cloud dispatch, Sessions across devices.