SessionState

works.iterative.claude.core.model.SessionState
See theSessionState companion object
case class SessionState(resultsSeen: Long = ..., notificationsSeen: Long = ..., lastResult: Option[ResultMessage] = ..., lastNotification: Option[ResultMessage] = ..., ended: Option[SessionEnd] = ...)

The session's activity state, folded from the message stream.

Read it to observe completion: resultsSeen is a monotone counter of real turn completions, so a predicate like resultsSeen > n is stable once true and readable at any time — there is no window to lose a race in. A background task finishing bumps notificationsSeen instead, so it can never wake a waiter for a real result.

Value parameters

ended

set once the session's process has ended

lastNotification

the most recent background-task result, if any

lastResult

the most recent real result, if any

notificationsSeen

monotone count of background-task results (wire origin key present)

resultsSeen

monotone count of real results (wire origin key absent)

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product