Skip to main content

read_session_title

Function read_session_title 

Source
pub fn read_session_title(path: &Path) -> Option<String>
Expand description

The one-line title for a picker row: the first real user message in the rollout, first line only.

Not in the header, so it costs a second read — which is why the picker fills titles in for the rows it is about to draw rather than for the whole list (ADR-0029; codex loads previews the same way, tui/src/resume_picker.rs:772). Reads at most TITLE_SCAN_LINES records, so a session that opens with a long injected preamble does not turn into a full parse.

Injected framing is skipped: an AGENTS.md reminder or a skills listing is a User message the user never typed, and titling a session with it would make every session in a project look identical.