r/PiCodingAgent • • 2d ago

Plugin I've been experimenting with context compaction for Pi

I've been using pi-vcc for long-running coding sessions. It works well, but as sessions got longer and went through multiple compactions, I noticed the agent spending quite a bit of time looking up past decisions and constraints.

I wanted something better suited to long sessions, so I built a hybrid version that keeps track of the current state alongside the original compression and recall mechanism.

I ran some benchmarks on code repair tasks and 1M-token conversations.

Code and benchmark results are here:
https://github.com/choam2426/vcc-hybrid

Feedback welcome.

16 Upvotes

6 comments sorted by

1

u/PerfectReflection155 1d ago

I’ve been through testing a bunch myself. Currently testing magic context and using a free api tiers for the LLM calls by the historian. I was using pi black hole before that. Smarter compact before that. I will have to check

4

u/MonsieurHen 2d ago

Have you used pi blackhole? How does it compare to that?

1

u/Odd_Werewolf_4478 2d ago

Blackhole observes conversations in the background to extract and refine memories, while vcc-hybrid focuses on making VCC itself more efficient.

It only uses an LLM at compaction time to index the current valid state and reference the original messages. The goal is to preserve the benefits of VCC's structural compression while reducing unnecessary recall calls.

1

u/MonsieurHen 3h ago

Have been using it and seems to work really well for me. Also benchmarked it against other techniques and seems to come out top!

1

u/Odd_Werewolf_4478 3h ago

Thanks for giving it a try! Really glad to hear it's working well for you. I'm actively using it myself and continuously working on improvements. If you have any suggestions or spot anything that could be improved, feel free to open an issue or submit a PR on GitHub. I'd be happy to take a look!

1

u/pretty_clown 1d ago

pi-tuck has been great for me