pub struct Session {
pub name: String,
pub session_id: String,
pub cwd: String,
pub backend: String,
pub jsonl_path: PathBuf,
pub permission_mode: Option<String>,
pub backend_version: Option<String>,
pub created: u64,
}Expand description
Persisted identity of one driven session.
Fields§
§name: Stringtmux session name (also the sidecar filename stem).
session_id: StringPinned --session-id UUID; makes the transcript path deterministic.
cwd: StringWorking directory the agent was spawned in.
backend: StringBackend that drives this session (claude, later codex).
jsonl_path: PathBufPath to the session transcript JSONL.
permission_mode: Option<String>--permission-mode the session was spawned with, if any.
backend_version: Option<String>Backend CLI version probed at spawn (the binary is pinned for the session’s lifetime, so
state/ps can check marker drift without a per-poll subprocess). None when the probe
failed or the sidecar predates this field.
created: u64Unix epoch seconds at spawn — used to correlate plan files (which live in a global dir).
Implementations§
Source§impl Session
impl Session
Sourcepub fn sidecar_path(name: &str) -> Result<PathBuf>
pub fn sidecar_path(name: &str) -> Result<PathBuf>
Where this session’s sidecar lives on disk. Validates name first so a hostile value
(path separators, ..) can never escape the sessions directory on save/load/delete.