r/PiCodingAgent • u/Miserable_Land_84 • 32m ago
News pi-protokoll: 361 turns, 47 compactions on a local Qwen – and a test of what the agent still knows afterwards
Earlier I posted pi-protokoll in r/PiCodingAgent. It's a Pi extension for very long sessions with local models, and that post explains in detail how it works: https://www.reddit.com/r/PiCodingAgent/comments/1xec00c/piprotokoll_compaction_for_very_long_sessions/
Short version: after every turn the model writes a short protocol. Pi's compaction then builds its summary from these protocols instead of re-summarizing the transcript. Current versions also keep old turns searchable through lookup tools.
This post is about the next question: how much does the agent still know after dozens of compactions?
Setup
- Model: Qwen 3.8 flash (IQ3_S), running locally with a 262k window. Pi compacts at 213k tokens (49k reserve).
- Session 1 was a GrandOrgue audio engine fork: 224 turns over 12 days, 24 compactions. The lookup tools were available throughout.
- Session 2 was a procedural OpenGL demo: 137 turns over 17 days, 23 compactions. It ran on an older pi-protokoll version without lookup tools, so the model could not look anything up during that work.
The first image shows the context of every model call in both sessions.

How I tested it
pi-protokoll's recall mode asks a frozen set of questions against a finished session. Every question targets turns that had already left the context. There are three kinds:
- facts: what was the result or decision?
- updates: something changed later, and the answer must give the current state.
- traps: about things that were never discussed. The right answer is "never discussed".
Qwen generated candidate questions from the protocols. Claude Opus 5.5 then curated them against the full transcript: it dropped ambiguous questions, fixed reference answers that had gone stale, and checked that the traps really never came up. That left 64 questions: 41 from session 1 and 23 from session 2, including 8 traps.
Each question is asked twice: once with the summary's "state of work" section and once without it. In the test, the lookup tools are available in both sessions, including the demo.
The recall mode is a simplified context, not the real working context. There is no Pi system prompt, the summary and the question come in one message, reasoning is off, and answers are capped at 400 tokens.
The local Qwen grades each answer as correct, partial, unknown or wrong. It grades every answer twice and agreed with itself on 87–91 % of them. Claude Opus 5.5 then graded all answers again with the full session transcript in hand. Its verdicts are the numbers below, and it agreed with the local judge on 89 % of answers.
Results (second image)
- GrandOrgue: 80 % correct with the state of work, 71 % without.
- Demo: 74 % with, 78 % without.
- Pooled: 78 % with, 73 % without. The 95 % confidence intervals are 67–86 % with and 62–83 % without. The difference is not significant (McNemar p = 0.63).
- Traps: 5 of 8 answered correctly in both variants.

What this doesn't show
- One model and two sessions, so the samples per category are small.
- The questions are derived from the protocols, which may favour this approach.
- The recall mode isn't the real working context (see above).
- In real work the model rarely looked things up on its own: 5 lookup calls in 224 turns in session 1, and none were possible in session 2. The test measures what it can retrieve when asked, not what it does unprompted.
- There is no comparison yet with Pi's default compaction or other context extensions.
That comparison is the next step: the same long scripted scenario, run once with several compaction related extensions. Ideas for the scenario, long sessions of your own, or spare compute would be very welcome.

