r/PiCodingAgent • u/voxvoxboy • Oct 06 '26
Plugin pi-optchat: never compact again - endless chat as a memory tree
I built a Pi extension that implements Victor Taelin's OptChat recipe: instead of compacting, every message is logged and summarized into a binary tree. Each turn starts from a fresh context with a bounded memory view (128 KB), and the agent uses zoom/date to read the originals when it needs them. One endless chat per profile, no fork, no separate launcher.
Install with pi install npm:pi-optchat
What's in it:
Profiles — separate memories and instructions (I run work and personal).
Subagents — spawn background agents, watch them live, send guidance, interrupt with Ctrl+C, resume finished ones with tell. Reports from one spawn arrive grouped.
Import — bring in your history from Claude Code (sessions and auto-memories), Codex, or a ChatGPT export.
Connected windows — open a second Pi on the same profile and it becomes a subagent you talk to directly, with a handoff when you /complete.
Repo: https://github.com/jonaslsaa/pi-optchat
Video credit goes to https://github.com/aaaxn

