Sun, Sep 6, 2026
1 note this week
- Sep 5, 2026
Every coding agent (Claude Code, Codex, pi) compacts long sessions the same way: ask an LLM to prose-summarize, then summarize that summary, until load-bearing details erode (why a decision was made, which approaches got rejected). pi-blackhole swaps that for deterministic compaction: a zero-token
compile()that extracts structured sections (goal, files touched, commits, preferences, brief transcript). No LLM, no drift, no cost. The compile is only lossy in the window, not on disk: blackhole also ships arecalltool (BM25 + regex over the raw session JSONL and the memory ledger) that re-fetches any dropped turn on demand, so compile + recall together is lossless where an LLM summary-of-a-summary destroys the original. It also adds observational memory: background observer/reflector workers append durable facts to per-session ledgers that survive every compaction, and/blackhole-exportwalks every past-session JSONL under a git-root into a ranked context file. The clever part is what export trusts. A fact's rank is driven by cross-session recurrence, damped aslog(1 + distinctSessions)with a burst penalty, not raw counts, so one chatty session can't inflate it. Recurrence-as-reinforcement is basically Hebbian: facts that keep firing across sessions get stronger. Dedup is a 3-pass funnel, exact then Levenshtein then Sørensen-Dice token-set, with a Levenshtein floor so keyword overlap alone can't merge two distinct facts. Bonus: the OM workers run on their own model and billing, so I point them atopenai-codex/gpt-5.6-lunawhile the main thread stays on Claude. discuss