pub enum SessionEntry {
Header {
version: u32,
id: String,
cwd: String,
created: String,
},
Message {
id: String,
parent_id: Option<String>,
message: AgentMessage,
},
ModelChange {
id: String,
model: String,
},
EffortChange {
id: String,
effort: Option<String>,
},
Compaction {
id: String,
summary: String,
first_kept_message: usize,
tokens_before: Option<u64>,
usage: Option<Usage>,
},
Todo {
id: String,
todos: Vec<TodoItem>,
},
Title {
id: String,
title: String,
},
Unknown,
}Variants§
Header
Message
Fields
parent_id: Option<String>Reserved for future tree/fork sessions; the kernel is linear today
and always records None.
message: AgentMessageModelChange
EffortChange
Compaction
A compaction boundary: summary stands in for every Message before
first_kept_message (an ordinal into the Message sequence).
Fields
Todo
The persisted checklist (the todo tool’s state): last write wins.
Written by the todo tool on every write so plan→todo survives
--resume//reload; read by the tool’s seed path and by /verify (D8).
Title
The session’s semantic name (W031): last write wins, like Todo.
Appended by the auto-titler at a turn boundary (loop_) and by an
explicit /rename (Agent::set_title) — never edited in place, never
re-written by the loop once one exists (§5.5).
Wire tag is title ({"type":"title","id":…,"title":…}): purely
additive, so PROTOCOL_VERSION stays 1 and an older binary reads it as
SessionEntry::Unknown — the forward-compat path pinned by
unknown_entries_tolerated.