SessionProcess

works.iterative.claude.zio.internal.cli.SessionProcess

Starts and manages a long-lived Claude Code CLI session process.

The process is spawned once and kept alive for the whole session. stdin is fed from a queue (keeping the pipe open across sends). ONE internal reader fiber owns the stdout stream: it parses each line, captures the session id, routes control responses to their waiting request, folds results into the readable SessionState, and fans every message out over a Hub — so any number of events/stateChanges consumers each see the full stream. Scope finalizers close stdin and kill the process on exit.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def start(executablePath: String, options: SessionOptions, archiveHook: SessionArchiveHook = ..., eventsBufferSize: Int = ...): ZIO[Scope, CLIError, Session]

Concrete fields

Default sliding-buffer capacity for the events and stateChanges Hubs. The buffer is a stated contract parameter, not a tuning knob: events is lossy for rendering only, so a conservative default is right.

Default sliding-buffer capacity for the events and stateChanges Hubs. The buffer is a stated contract parameter, not a tuning knob: events is lossy for rendering only, so a conservative default is right.

Attributes