Skip to main content

parse_session_file

Function parse_session_file 

Source
pub fn parse_session_file(path: &Path) -> Result<ParsedSession>
Expand description

Parses a Claude Code JSONL session file.

Reads each line of the file and extracts user and assistant messages. Skips file history snapshots, sidechain messages, and malformed lines.

ยงErrors

Returns an error if the file cannot be opened. Individual malformed lines are logged and skipped rather than causing a parse failure.