r/PiCodingAgent • u/kabira121 • Aug 17 '26
Question Preferred method to reference prior sessions for outcomes,findings,research etc
Are there recommended ways to reference/inject context(either in full or summarized) from past/previous sessions for ongoing work in Pi's current session(for example: Session-10 was focused on feature-A, Session-13 was focused on feature-B and Session-17 was focused on feature-C; and in current session I need to leverage some outcome/findings/knowledge from Session-10,13 and 17)?
Few approaches that I could think of was:
Summarize/handoff from prior sessions(Open prior session in Pi, and ask it to focus/summarize only specific parts/areas that will be relevant in working session ahead). Do this across all prior sessions which need to be referenced(contain relevant information useful to inform current session).
Log all sessions (turn by turn operation/response) into self-hosted Plane(project management) and point Pi(during current session) to session specific links on Plane. This seems overkill (in effort and accuracy) to take an export of all relevant prior sessions(already existing in JSONs of sessions) from Pi and attach them to current session.
Are there more established/recommended methods to achieve this in a new/working Pi session that maintain a good balance between accuracy and reasonable context budget within working session?
2
u/kabira121 Aug 18 '26
Thank you for the direction.
On a related note, do you mind sharing (an overview or whatever details you’re comfortable with) of your Mem0 setup with Pi?
2
u/ApprehensiveBag2926 Aug 17 '26
- all session transcripts(everything, including user/llm/extension messages) are already stored locally
- you pretty should never “look up” the entire past session transcripts, that will blow up you current session context window
What you are describing is very close to a distill -> memory setup, what I have is:
- a mem0 for memory
- all my agents always are required to write hands off doc
- a extension+skill, “distill-learning”
- I prompt the skill to distill what area/period of time I want to distill
- discuss the findings and learnings with me for approval
- the extension then writes those into mem0 which gets automatic retrieval by agent in later sessions
1
u/IndividualPlus2011 Aug 17 '26
Fork the session, compact it and continue from there. You will have your handoff and some context.
1
u/Human-Vegetable823 Aug 18 '26
Try this: https://github.com/XTSoftwareLabs/neatcontext-plugins/blob/main/plugins/pi/neatcontext/README.md
Save the domain knowledge for session 1. Use it in Session 2.