Sessions

works.iterative.claude.zio.Sessions
See theSessions companion object
trait Sessions

The sessions a host has started and still holds.

A session is a running process, and a process outlives the request that started it: whoever asked for it has to be able to come back to it — after a reload, from a second tab — and reach the same agent rather than a new one. That is the whole of what this is for. Nothing about the conversation is kept here; the transcript is the CLI's own file, and this holds only what a file cannot be: the live process, by name.

Every session held is let go of when the holder's scope closes, so a host that stops leaves no agent running behind it.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def held(sessionId: SessionId): UIO[Option[Session]]

The session held under this id, if this host started it and it is running.

The session held under this id, if this host started it and it is running.

A session whose process has ended is not held any more: a page sent back to a dead session would type into nothing and never be told.

Attributes

def start(options: SessionOptions): IO[CLIError, SessionInfo]

Starts a session and holds it under the id the CLI names it with.

Starts a session and holds it under the id the CLI names it with.

Returns once the session has a name, because a caller with no name for it could never ask for it again. A session that ends before naming itself is let go of rather than held under nothing.

Attributes