Skip to main content

Module session

Module session 

Source
Expand description

Engine-level session management โ€” save, load, resume, clear.

Owns the conversation state that both TUI and headless modes need: messages, token counts, cost.

Structsยง

ContextHeadPersistence
Session-scoped durability barrier state, shared by persistent frontends. A failed (or dropped in-flight) publication requires explicit reload/new session before saving or scheduling more inference. Never rollback-save an old head: save_durable can fail after publishing its replacement.
ConversationState
Conversation state tracked by the engine.