Docs/Sessions & trail

Sessions & trail

Constant keeps an append-only ledger of every carry — the trail — and gives you commands to see what is carryable, what it has done, and what is running.

List carryable sessions

constant sessions
constant sessions --from codex --titles
constant sessions --all --json

By default sessions scopes to the current directory. --all scans all known runtime stores (codex, claude, gemini, opencode). --titles reads transcripts to derive a preview title, so it is slower on large stores. In text output, · marks a session known to be empty when titles were requested.

Resume a conversation

constant resume                # newest conversation in this directory
constant resume cobalt-37      # by handle — never ambiguous
constant resume auth           # by slug or conversation id
constant resume --list         # show the candidates
constant resume auth --in codex

resume re-hosts a conversation from the trail: it wakes the latest projection live in the harness with the session identity declared from birth. If every projection has been deleted, it reprints one from the record first. Without a TTY it prints the native resume command instead, so it stays scriptable.

Trail

constant trail
constant trail --all
constant trail --events

trail shows conversations with their handles, names, and chapters: each carry is a chapter (ch04 from codex …). --events shows the raw append-only switch ledger from ~/.constant/trail.jsonl.

Inside a hosted session, Ctrl-B t shows the same lineage as a live graph.

What's running right now

constant ps
constant ps --json

ps (alias live) is a census of every agent CLI process alive on the machine: runtime, uptime, the session it holds, the conversation name when the trail knows it, and its working directory. Read-only — wrappers (dtach, sh -c, login shells, Constant's own host) are never double-counted.

Route

constant route
constant route --all

route is the debug view. It reconstructs the fork graph Constant knows about and labels projections with readable aliases like codex[1] and claude[1.1].

Export the neutral IR

constant export --from codex --out thread.constant.json
constant export --session <path-or-session-id>

export writes the distilled, redacted neutral conversation model. Without --out it prints JSON to stdout. It refuses to overwrite the source session.

Next: Naming & handles.