Pi accepts an environment variable, PI_CODING_AGENT_DIR, and looks for its configs, sessions, user-scoped skills, commands, prompt overrides, etc, down that directory.
Naturally, on my machine, that is set to ~/.config/pi/agent (so sessions are in ~/.config/pi/agent/sessions/*/*.jsonl).
However, pi-coding-agent--list-sessions hardcodes ~/.pi/agent/sessions/. As a consequence, it does not find any of my sessions.
I suggest one of the following:
- read the same environment variable (defaulting to
~/.config/pi/agent) and expand sessions/ against the value, OR
- have a Custom option that can be set by the user, OR
- take an existing session’s
sessionFile (from the get_state or get_session_stats) and strip the file name off that.
Pi accepts an environment variable,
PI_CODING_AGENT_DIR, and looks for its configs, sessions, user-scoped skills, commands, prompt overrides, etc, down that directory.Naturally, on my machine, that is set to
~/.config/pi/agent(so sessions are in~/.config/pi/agent/sessions/*/*.jsonl).However,
pi-coding-agent--list-sessionshardcodes~/.pi/agent/sessions/. As a consequence, it does not find any of my sessions.I suggest one of the following:
~/.config/pi/agent) and expandsessions/against the value, ORsessionFile(from theget_stateorget_session_stats) and strip the file name off that.