Skip to content

Make session resume use pi's session file#206

Merged
dnouri merged 1 commit into
masterfrom
fix-session-resume-directory-205
May 10, 2026
Merged

Make session resume use pi's session file#206
dnouri merged 1 commit into
masterfrom
fix-session-resume-directory-205

Conversation

@dnouri
Copy link
Copy Markdown
Owner

@dnouri dnouri commented May 10, 2026

Pi may store sessions outside ~/.pi/agent/sessions, for example when the user sets PI_CODING_AGENT_DIR or resumes from a custom path. Use the sessionFile reported by get_state and offer valid sibling session files from that directory instead of reconstructing pi's storage path in Emacs.

If cached state has no session file yet, refresh get_state before listing sessions rather than making the user retry. Filter out JSONL files that are not pi sessions so arbitrary sibling files are not offered in the resume picker.

Fixes #205.

Pi may store sessions outside ~/.pi/agent/sessions, for example when the user sets PI_CODING_AGENT_DIR or resumes from a custom path. Use the sessionFile reported by get_state and offer valid sibling session files from that directory instead of reconstructing pi's storage path in Emacs.

If cached state has no session file yet, refresh get_state before listing sessions rather than making the user retry. Filter out JSONL files that are not pi sessions so arbitrary sibling files are not offered in the resume picker.

Fixes #205.
@dnouri dnouri merged commit a23785b into master May 10, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session resume: Hardcoded Pi config path

1 participant