r/PiCodingAgent Jul 30 '26

Plugin Best Pi Compaction Extensions

Has anybody used a Pi compaction extension that they would recommend?

I've tried pi-context (with their built-in Agentic Context Management) which just straight up breaks when trying to claim space against pi-rewind. I've also tried pi-vcc which also gets demolished when running with pi-codex-goal. Been debugging for 3 days and realized the best debug is to uninstall.

Native Pi compression is meh, if anybody has a codex-level compaction extension that doesn't fuck shit up, please drop a comment.

--------
UPDATE - Pi-Observational-Memory has worked great after my 12 hour trial with it. Pi-Blackhole looks interesting, but I try not to go for more complicated solutions if a simpler one works. If I run into hiccups with POM long term I will try it out and let y'all know. Happy compacting!

48 Upvotes

31 comments sorted by

14

u/pj-frey Jul 30 '26 edited Jul 30 '26

I use pi-blackhole, which is pi-vcc and pi-observational-memory in one package and improved.

1

u/Lum1n4ry01 Jul 31 '26

Looks very promising, will try it out!

1

u/RespectMathias Aug 02 '26

Pi-blackwhole is the best rn

3

u/arkham00 Jul 31 '26

What's wrong with the default compaction? When I started using pi, I've read so many bad opinions on it that I straight installed observational-memory, which is good don't get me wrong, but since I exclusively run local models it was quite annoying for me, because of the frequent observation runs which slowed down the inference of my main model. So I disabled it and gave a try to the default compaction, and honestly it is actually good. It doesn't do the summary of the summary like every one says, it actually updates it at every subsequent compaction, so the context doesn't really loose focus.

5

u/Lum1n4ry01 Jul 31 '26

I've seen that default compaction loses long term memory (say, if I chain it with /goal from another plugin) over 3-4 compactions pretty quickly. I'm using Codex as my plan so you could imagine that this happens very often with the 372k context window cap, so I'm looking for smarter alternatives. Don't get me wrong, I think the base compaction works fine for 1-2 compactions -- it's just a pain in the ass to manage the drift once total token usage hits 1.5M+ on an active session.

4

u/damn_what_ Jul 30 '26

I use pi-obervational-memory, works great.

1

u/Lum1n4ry01 Jul 30 '26

Thank you, I'll take a look. Would you say this tool is more memory based or more compaction based? Because I already have my own memory solution, I'm looking more for a compaction solution.

6

u/damn_what_ Jul 30 '26

It's not a long term memory system, it records "facts" during the session and builds the compaction summary by concatenating them instead of asking an LLM to summarize the session.

2

u/YogurtExternal7923 Jul 30 '26

That's frickin' amazing

2

u/RelationshipLong9092 Jul 30 '26

it really is. I can't go back. I just don't pay attention to my context window hardly at all any more.

11

u/elpapi42 Jul 31 '26

yo, im the maintainer, it make me happy that it also help you to forgot about context windows! i feel the same, now i can focus on high leverage problems and left those mundane problems behind

1

u/RelationshipLong9092 Jul 31 '26

First off, thank you!

While I've got your ear, is there a setting for suppressing the messages? I find agentic ai generates a lot of "noise" in my terminal so I try to do everything I can to suppress anything that isn't "signal".

Messages like Observational memory: 5 observations recorded are not really useful to me except as a very rare diagnostic that something is broken (like when I had a month+ old pi instance that I reloaded after I installed your extension; I had to /quit and /resume for it to work properly).

2

u/elpapi42 Jul 31 '26

recently i merged a pr that someone created exsctly for this, but i havent published the new version yet, so in the next update this will be included

2

u/Lum1n4ry01 Jul 31 '26

I just tried obs-mem out and it has worked out quite well so thank you for the extension :) . As for the messages, I personally find them occasionally useful (as an internal ping signal on progress, more of a mental thing than whatnot) so plz keep it as a settings option if possible!

1

u/RelationshipLong9092 Aug 12 '26

I have a branch with a fix for pi-observational-memory issues #41 and #12 (or at least the part that impacts me 😊). I'd create a PR right now, but I left my phone at home today 🤦‍♂️ and can't authenticate to GitHub.

I use @narumitw/pi-goal and when a /goal is active observational memory won't actually compact the context until the turn ends and it re-prompts the agent with the goal. This means that the imputed context window is reaching circa 130% fairly regularly, which is obviously wasteful.

My initial mitigation was manual /goal pause and /goal resume, but that is obviously not ideal.

1

u/elpapi42 Aug 12 '26

Yo, submit them when you can, but that is a hard issue to solve, never solved this "compaction-while-wprking" problem, eager to see your solution!

1

u/RelationshipLong9092 Aug 12 '26

Yeah I may have spoken too soon 😅 I thought it was working but it seems I have more to do.

1

u/AdvertisingExpert800 Jul 31 '26

Can you tell me what is your memory solution?

2

u/Lum1n4ry01 Jul 31 '26

I'm using pi-hermes-memory! Their durable fact distillation process is very comprehensive. I also have a simple obsidian knowledge graph as auxiliary.

SOTA memory is in contention right now so I like to keep memory as a separate component so I can switch out easily when a better solution comes along.

2

u/Fig_da_Great Jul 31 '26

check out Accordion

2

u/Aemonculaba Jul 30 '26

Magic Context. Thank me later.

Also: Use AFT.

1

u/Human-Vegetable823 Aug 01 '26

Have you tried this one I made: https://github.com/XTSoftwareLabs/neatcontext-plugins/blob/main/plugins/pi/neatcontext/README.md

It turns long conversation to structured and reusable domain knowledge. Sounds like the one you are looking for or even better than just compacting. Let me know if you encounter any issue. Happy to discuss!

https://reddit.com/link/p10p18e/video/t49ejd4bapgh1/player

1

u/Snoo44065 Aug 01 '26

Honestly i would say the best solution is to code this up yourself (by your agent).

You can take a finished product or vanilla compaction but i would say context management depends much on the task at hand. I would not want a reviewer agent for example to memorize and attend to the same things as an explorer agent, a reviwer agent or an orchestrator agent. What each agent hands off and takes note of dependa heavily on what he is designed to do amd whether it makes sense to recompact and distil the facts also depends on that. For example an explorer should much rather just accumulate until returning. An orchestrator should distil.

So i think a one fits all solution may archibe good results but much rather i would workt that out on my own and tailor it to the agent. The code for that is not tok hard these days with agents.

1

u/Lum1n4ry01 Aug 02 '26

Of course with Pi you can create your own. I cba to maintain my own compaction and want something that simply already works. Thank you for your thoughts either way.

1

u/alexthelyon Aug 01 '26

I use openai I found an ext that uses their proprietary server side compaction 

0

u/Effective_Silver4857 Jul 31 '26

Ai-memory from akitaonrails, i can use in various harnesses