pub struct SessionMeta {Show 15 fields
pub schema_version: u32,
pub session_id: String,
pub goal: String,
pub model: String,
pub provider: String,
pub created_at: String,
pub updated_at: String,
pub message_count: u64,
pub status: SessionStatus,
pub tool_registry_hash: Option<String>,
pub first_prompt: Option<String>,
pub last_prompt: Option<String>,
pub cost: Option<SessionCost>,
pub preset: Option<String>,
pub name: Option<String>,
}Expand description
Metadata for a JSONL session.
Fields§
§schema_version: u32Schema version of the persisted SessionMeta. Bumped
whenever a non-backward-compatible field is added (e.g.
dropping a #[serde(default)] attribute). The on-disk
format is read by SessionReader::load_meta, which checks
this field and refuses to load a session with a
schema_version it does not understand.
Defaults to 1 for pre-Goal-269 session files (the field
was introduced in Goal 269, 2026-06-11).
session_id: String§goal: String§model: String§provider: String§created_at: String§updated_at: String§message_count: u64§status: SessionStatusLifecycle state of the session. Defaults to Active for
.meta.json files written before Goal 276 (no status
key) and degrades to Active for unknown string values
(caught by SessionStatus::Active’s #[serde(other)] arm).
tool_registry_hash: Option<String>BLAKE3 hash of the tool registry specs at session creation
time. Used by recursive resume (g151) to refuse loading a
session whose tool inventory has drifted. None for
pre-g151 sessions; resume tolerates the absence with a
warning rather than an abort.
first_prompt: Option<String>First user message in this session, truncated to 200 chars (g157).
last_prompt: Option<String>Most recent user message, truncated to 200 chars (g157).
cost: Option<SessionCost>Cumulative token usage for this session (g156).
preset: Option<String>Resolved provider preset id (e.g. “deepseek”) at session creation
time. None for pre-preset-config sessions or when the user did
not configure a preset. Optional + skipped on serialize so old
session files round-trip cleanly.
name: Option<String>Optional human-readable display name for this session, set via --name.
Shown in the /resume picker and sessions list output.