Sessions
Sessions persist automatically per working directory and can be listed, resumed, forked, or deleted.
Sessions persist automatically per working directory under
~/.phi/session/<encoded-cwd>/ as JSONL trajectories.
phi sessions— list session id, mtime, and preview for the current directory/sessionsin the TUI — opens a filterable session picker (Enter resumes;Ctrl+XthenYdeletes the highlighted session); listings show a fork’s source as↳ <id>/new— start a fresh session (new id, empty transcript)/fork— copy the current session at its current point into a new session (new id, same conversation) and switch to it; the source keeps running untouchedphi sessions fork <id>— copy a session at its current point and print the new id; continue it headlessly withphi run --session <new-id>phi sessions remove <id>— delete a persisted session (aliasrm; an id prefix works when unique)phi run --session <id>/phi run --continue-last— resume headlessly (--sessionaccepts an id or a unique prefix)
Each session remembers the model it was using: resuming restores that session’s model, and a new session inherits the most recently selected one.
Headless resume
phi run --session <id> -p "keep going"
phi run --continue-last -p "same session as last time"
Resuming replays tool executions (with their styled rows) instead of dropping them, so a continued conversation stays coherent.