← r/LocalLLaMA
▲
65
+59
27👁
r/LocalLLaMA · u/TheVoxcraft · 3d ago

pi-optchat: never compact again - endless chat as a memory tree

post image

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.

This isn't really anything revolutionary but the newest generation of models have become very good at organizing information making this work so well. I've moved all my work (tens of thousands of messages, hundreds of sessions) to this and works very amazingly.

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

65 0 65 10/7 01:49 10/9 07:48 UTC
scorecomments27 sightings
first seen 2026-10-07 01:49 UTClast seen 2026-10-09 07:48 UTCscore then 6score now 65gained +59sightings 27
open on reddit ↗ 💬 41 (+29)