Context is the actual bottleneck in long Claude Code sessions — you either resend the whole transcript every turn (cost balloons, agent gets slower and dumber as it fills up) or you lose stuff. So I built a harness around a different idea: treat context like managed virtual memory instead of an ever-growing transcript. A small resident file (your non-negotiable rules + current task state) stays in context always. Everything else — past decisions, facts, project history — lives in a plain-markdown store on disk and gets paged in one line at a time when something in the live conversation touches it, then faulted in full only if the agent actually needs it. Nothing gets resent whole unless it’s asked for. Benchmarked it head-to-head against a stock Claude Code session — same model, same tasks, same pass/fail checks, only the memory strategy differs. 120 cells across short/medium/long sessions: 63% cheaper on short sessions, 72% medium, 84% long — 81% cheaper in aggregate 100% task correctness vs. 92% for stock, including 17/17 on a recall probe (fact dictated early, checked 30+ turns later — genuine recall, not a lucky recent-context hit) It’s v1, not a finished product — the findings doc is written to show what’s confirmed vs. still uncertain, not just the numbers that look good. Worth reading before trusting the headline. MIT licensed, free to use: GitHub Happy to answer questions about how the paging actually works or what broke while building it. submitted by /u/GoneWheeling
Originally posted by u/GoneWheeling on r/ClaudeCode
