sting8k/pi-vcc
Smart, Fast & Lossless session compaction for Pi. No LLM calls - produces structured, transcript-preserving summaries using pure extraction and formatting.
What it solves
pi-vcc is an algorithmic conversation compactor for the Pi AI coding agent. It solves the problem of context window overflow and the loss of information that occurs during standard LLM-based summarization, where history is often discarded or hallucinated. It reduces token usage by 35-99% without relying on LLM calls for the compaction process itself.
How it works
Instead of using an LLM to rewrite the conversation, pi-vcc uses a purely algorithmic approach to extract and format a brief transcript. It processes the conversation through a pipeline that calibrates token estimates, filters noise, and extracts key semantic sections (such as session goals, modified files, and git commits) using regex and pattern matching.
To prevent permanent data loss, it includes a vcc_recall tool that reads raw session JSONL files directly, allowing the agent to search and retrieve specific historical messages from the active lineage or all branches of the conversation, even after they have been compacted out of the immediate context.
Who it’s for
Users of the Pi AI coding agent who want to maintain a searchable, deterministic, and cost-effective way to manage long conversation histories without losing critical technical details.
Highlights
- Zero LLM Cost: Performs compaction algorithmically, eliminating API costs and latency associated with summarization calls.
- Lossless Recall: Bypasses standard compaction by reading raw session files, keeping the entire history searchable via regex and keyword search.
- Semantic Structuring: Organizes compacted history into five specific sections: Session Goal, Files & Changes, Commits, Outstanding Context, and User Preferences.
- Deterministic Output: Ensures the same input always produces the same output, removing the risk of LLM hallucinations during history compression.
- Customizable Compaction: Supports manual triggers via
/pi-vccand "smart keep" logic to optimize how many recent turns are preserved.
Related
- Project
- Project
- Project
- Project