Repository navigation
Releases
v0.8.0: SLICE extension preview for Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0
SLICE v0.8.0 supplies an ordinary extension for unmodified official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0.
Install this release from npm, then restart Pi:
pi install npm:slice-pi@0.8.0Start a new persistent text session and run /compaction-doctor to check it without calling a model. To follow later releases, install npm:slice-pi without a version and update only this package with pi update --extension npm:slice-pi. A plain pi update updates Pi itself. The same package is on Git as the fixed tag extension-v0.8.0; source tag v0.8.0 selects the development monorepo, not the package:
pi install git:github.com/youxi-huang/slice@extension-v0.8.0An installation from Git keeps working and updating through extension-preview. To move it to npm, run pi remove git:github.com/youxi-huang/slice and install from npm; sessions and settings carry over.
OpenCode and DSH get SLICE's context_history from npm too, with no build. For OpenCode, add the package to plugin in opencode.json and restart it:
{ "plugin": ["slice-opencode@0.8.0"] }For DSH, add it to a profile built on DSH's base bundle; the package enables itself there:
dsh plugin --profile <profile> add slice-dsh@0.8.0Before publication each package was installed by name from a loopback registry on official OpenCode 1.19.4 and 1.19.5 and DSH 0.2.1-rc.3 and 0.2.1-rc.5, where a scripted session compacted natively and read its original history back. Both are retrieval only: compaction stays the host's.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 150 stock-Pi package and lifecycle checks on official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.4.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: 2ac60f9. Preview runtime: stock-preview+src.7c815afa75319b7b. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.8.0 adds segments to the Pi extension as an experiment, off by default, and fixes three ways a session at default settings could block: a tool batch that left the writer no room for its handover, which the writer now reads in bounded chunks; notes that cited more than 20 sources in one item; and a branch moved with /tree that outgrew the writer's room. DSH gains an opt-in manual writing preview, and the OpenCode package is unchanged. No checkpoint format or source hash changed: checkpoints this release writes, segments included, reopen under v0.7.5. No resident build fingerprint or evaluation pin changed either.
Added
-
Segments, off by default: with
previewSegments.enabled, the session model writes segment notes in the background after completed turns, and compaction merges them with the previous note without a model call, committing through the prefix path so later turns stay verbatim, up to one segment range: 15% of Pi's trigger, between 8,192 and 32,000 tokens. A longer tail goes to the writer instead of staying in context. When the user changes an earlier ruling, the segment's new instruction replaces the old one if it cites the user's own message; a segment cannot withdraw a ruling on the model's word alone. Compaction waits at most 15 seconds for a segment still being written when only it would let the merge commit. When segments cannot serve, the writer compacts as before anddetails.preparation.segmentsFallbacksays why./compaction-statusshows how many segments are ready and how much of the history since the last checkpoint they cover;/compaction-doctorsays when they are paused. They remain an experiment: on GPT-6 Luna and DeepSeek V4.1 Flash they did not shorten the pause over whole sessions, and before the bound on the tail a very large input soon after a segments compaction could block the session. With the bound, a rerun on GPT-6 Luna blocked no session, but segments served no compaction and the wait for one still being written lengthened each pause by up to 15 seconds. In replayed sessions with 10-second turns, Luna's segments served three compactions of eight, in 45 to 108 ms; on the 200k route a compaction they did not serve met Pi's own trigger with no room for the writer's handover: it blocked the session until the fix below, and with the fix it took 143 to 155 seconds. On the evaluation set's probes, sessions recovered as well with segments as without: 47 of 49 answers right in both, none wrong. -
Segments can be written at a thinking level of their own:
previewSegments.effort, one ofoff,minimal,low,medium,high,xhighandmax, with the session's level when unset. A segment written at its own level stays valid when the session's level changes. An unknown level turns segments off, and/compaction-statusand/compaction-doctorshow the level in use. When a compaction waits for a segment still being written,details.preparation.segmentsWaitMsrecords how long, and/compaction-statuscounts undersegments.resultshow this session's segments ended: linked, cancelled, superseded, refused or failed by error code, or dropped from the chain by reason. A segment note that restates the previous checkpoint is kept to its own turns before the range check rather than refused: facts that cite only earlier turns are dropped, since the merge carries them, and a plan resting on earlier turns leaves the previous plan in place. -
DSH has an opt-in manual writing preview at
slice-dsh/compaction:/compactwrites and validates a Slice checkpoint in the native log,/compaction-statusreports the gate, and failed or unconfirmed attempts block later requests. It usesrawOutput, a field DSH owns, for the structured checkpoint. The default history entry remains retrieval-only; stage 1 has no automatic compaction. -
With preparation on, a checkpoint that preparation did not serve records why in
details.preparation.preparationFallback: nothing was prepared, a run was still in flight or had failed or been cancelled, the candidate no longer matched its sources, a stale candidate left no reusable prefix, the turn was unfinished, or the prefix did not fit. Work notes already record their own reason innotesFallback. Older readers ignore the field; no checkpoint format changes.
Changed
- With segments on, ranges can close after complete tool batches inside a long run. The first link starts at half the trigger, chosen over an earlier start on the complete offline grid. The core can cut immediately after a covered batch, keeping later batches verbatim under the existing tail and fit bounds. At a boundary, the most recent completed writer or segment call in this session estimates whether the segment in flight can finish within the wait; otherwise the writer starts at once, recording
in-flightwithoutsegmentsWaitMs. The estimate stays in memory, and a session with no completed call waits as before. Scheduling uses the read-only start of the next model turn, preserving cache-warming state on older Pi hosts. These rules apply whenever segments are on; segments stay off by default.
Fixed
- If a tool batch crosses Pi's compaction trigger and leaves the session writer too little room for its handover, the same writer now reads the original evidence in bounded chunks instead of failing with
CONTEXT_WRITER_CAPACITY. The choice is made before any request, so a writer that fails still blocks the session. A handover that fits, segment calls and the tail a segments checkpoint keeps are unchanged. The chunked compaction makes more calls and cannot use the session's prompt cache: on GPT-6 Luna it took 143 and 155 seconds where a handover that fits takes about 20. - The note writer now states the note schema's limit of 20 source IDs per item in its rules, where only the attached schema gave it. On large sessions GPT-6 Luna at Pi's default thinking level cited 21 to 33 entries in one fact, t...
v0.7.5: SLICE extension preview for Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0
SLICE v0.7.5 supplies an ordinary extension for unmodified official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0.
Install this release from npm, then restart Pi:
pi install npm:slice-pi@0.7.5Start a new persistent text session and run /compaction-doctor to check it without calling a model. To follow later releases, install npm:slice-pi without a version and update only this package with pi update --extension npm:slice-pi. A plain pi update updates Pi itself. The same package is on Git as the fixed tag extension-v0.7.5; source tag v0.7.5 selects the development monorepo, not the package:
pi install git:github.com/youxi-huang/slice@extension-v0.7.5An installation from Git keeps working and updating through extension-preview. To move it to npm, run pi remove git:github.com/youxi-huang/slice and install from npm; sessions and settings carry over.
OpenCode and DSH get SLICE's context_history from npm too, with no build. For OpenCode, add the package to plugin in opencode.json and restart it:
{ "plugin": ["slice-opencode@0.7.5"] }For DSH, add it to a profile built on DSH's base bundle; the package enables itself there:
dsh plugin --profile <profile> add slice-dsh@0.7.5Before publication each package was installed by name from a loopback registry on official OpenCode 1.19.4 and 1.19.5 and DSH 0.2.1-rc.3 and 0.2.1-rc.5, where a scripted session compacted natively and read its original history back. Both are retrieval only: compaction stays the host's.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 150 stock-Pi package and lifecycle checks on official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.4.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: dcdb270. Preview runtime: stock-preview+src.b0f389ab614f8cf3. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.7.5 publishes SLICE on npm for all three hosts: the Pi extension as slice-pi, and the OpenCode and DSH history packages as slice-opencode and slice-dsh. The Pi extension compacts as v0.7.4 did; its one runtime change is which copy the duplicate notice keeps. This release changes no checkpoint format, resident build fingerprint or evaluation pin.
Added
- From 0.7.5 each release is published on npm as well as on Git, so none of the three hosts needs a clone or a build. Pi installs the extension with
pi install npm:slice-pi. OpenCode installsslice-opencodeat start once it is listed underplugininopencode.json. DSH installsslice-dshwithdsh plugin --profile <profile> add slice-dsh. The Git package and theextension-previewbranch stay, and the OpenCode and DSH packages are also taggedopencode-v<version>anddsh-v<version>for installation without npm. Before anything is published, the release workflow installs the OpenCode and DSH packages by name from a loopback registry on official OpenCode 1.19.4 and 1.19.5 and DSH 0.2.1-rc.3 and rc.5, where a scripted session compacts natively twice and reads its history back, and installs, runs and removes the Pi package by name on every supported Pi. All three are published with npm provenance.
Changed
- The Pi package is named
slice-pi, its npm name, on Git as well; it waspi-context-compaction-preview. Pi identifies a Git package by its address, so existing installations keep loading and updating. When an npm copy and a Git copy are both loaded, the duplicate notice keeps the npm one and names the Git one to remove; a second npm copy is named without its version,pi remove npm:slice-pi. - The DSH package declares a DSH bundle, so
dsh plugin addenables it with no hand-addedslice-historyrow in the profile'scordis.patch.yml. A profile that carries that row from an earlier build must drop it, since the tool refuses to register twice.dsh plugin --profile <profile> remove slice-dshremoves the package and deselects its bundle. - The OpenCode package declares
engines.opencode>=1.19.4 <2.0.0, which OpenCode checks before it loads an npm plugin. Both packages carry a README of their own.
Fixed
- The DSH package installs on DSH 0.2.1-rc.4 and rc.5. Its peers named rc.3 alone, and DSH checks them before installing and at startup, so it refused the package on any later release. They now admit rc.3 and every later 0.2.x release; nothing the adapter uses changed between rc.3 and rc.5.
Maintenance
scripts/context-memory-version.mjsholds the release version every package reads. CI gains anadaptersjob that runs the adapter checks and the install acceptance,scripts/context-memory-adapters-acceptance.mjs.context-memory-host-run.mjs --install registryinstalls an adapter by package name from a loopback registry,scripts/context-memory-loopback-registry.mjs. The release workflow gainsid-token: writefor npm trusted publishing and a 30-minute limit. The first npm publication uses anNPM_TOKENsecret, deleted once each package has a trusted publisher, as the extension guide's maintainer section describes.
v0.7.4: SLICE extension preview for Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0
SLICE v0.7.4 supplies an ordinary extension for unmodified official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0.
Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:
pi install git:github.com/youxi-huang/slice@extension-v0.7.4Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.7.4 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/slice@extension-preview. A plain pi update updates Pi itself.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 138 stock-Pi package and lifecycle checks on official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.4.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: a70c76c. Preview runtime: stock-preview+src.c95e6c599a4b7aa1. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.7.4 brings the source and installable Pi extension to the same version, including the changes below since v0.7.2. The existing v0.7.3 tag remains a source-only release and is not moved; the matching installable package is extension-v0.7.4. This release preparation changes no runtime behavior, checkpoint format, resident build fingerprint or evaluation pin.
Added
- The preview evaluation set gains P5, one long session for compactions on 200k and 272k routes: its checkpoints 1, 3 and 5 are three rounds at about 150,000 tokens of context, 2 and 4 two rounds at about 204,000, each later round compacting with the earlier notes in place. Its probes ask for early facts after two and three notes and for values that changed between rounds. P5 has its own version and manifest, so P1 to P4 keep their pins. The preview bench selects a route's rounds with
--cuts, runs only the session's own probe condition with--probe-conditions history, stops a run at the first request past--max-input-tokens, cached tokens included, and with--compactions-onlyruns a chain without its probes.--cache sessionruns each warm-up turn on the session itself, so the writer continues it as it continues a session's last turn, which OpenAI's implicit cache needs. scripts/context-memory-host-run.mjsruns fixture P5 as a session on the official OpenCode 1.19.4 or DSH 0.2.1-rc.3, with the Slice retrieval package and a 200k or 272k route's capacity profile. A local stand-in for OpenAI's Responses API answers with--provider loopback;--provider openaisends GPT-6 Luna requests through the proxy secret. The user pastes every command's output and the host's own model replies, so native compaction runs at the profile's line; after two compactions the run asks P5's questions, then four exact log timestamps that summaries rarely keep. No request may reach 262,000 tokens by estimate, and a provider run needs request, time and cost limits, which hold inside a turn too.report.jsonrecords each model call's usage, the compactions and their pauses, the retrieval calls and both scores.- The preview bench's
--arm nativeruns aprobeschain with no package loaded, so Pi's own compaction summarizes each cut with the same model, thinking level and settings, and the probes answer from Pi's summary. It takes only--probe-conditions none, since there is nocontext_historywithout the package, and its summary calls count toward--max-input-tokens. Paired with a Slice run'shistorycondition it compares what a user gets with and without the package; the first pair, on GPT-6 Luna atmedium, is in the validation record. scripts/context-memory-pressure-profile.mjsprints native compaction settings for Pi, OpenCode 1.19.4 and DSH 0.2.1-rc.3 from verified context, output and optional input limits. A 200k route with a 32k output cap gets a 150k trigger and 15k of recent text;--modelscopes Pi's values to that route. Missing or contradictory limits are refused, and OpenCode withoutlimit.inputis reported as keeping its 168k line. The script writes nothing and changes no adapter's scope.
Fixed
- The independent preview no longer stops a long session short of Pi's compaction trigger. Its request guards estimated four characters per token, while Pi's trigger reads the provider's reported usage; English prose and escaped code run past four characters a token, so on GPT-6 Luna at Pi's defaults the guards stopped requests about 16,000 to 18,000 tokens before the trigger and no automatic compaction ran. Both guards now read Pi's own count once a response has reported usage, and the session writer sizes its prefix by it too. Because Pi's default reserve of 16,384 tokens is less than the session writer's handover takes on a 272,000-token route, a settled turn whose context, with one more turn as large as that reserve or as the turn just settled, would leave the handover no room now starts the compaction
/compactwould, once per checkpoint interval. One-shotprintandjsonruns, which exit when the turn settles, leave it to Pi's trigger. /compactright after a turn that ended on a provider error, an abort or a stopped request now compacts instead of pausing the session withCONTEXT_TOOL_BOUNDARY, which said a turn was still running when none was. That turn stays whole after the checkpoint, and the session writer's prefix now ends at the last completed turn: ending on the turn's unanswered request led GPT-6 Luna to answer it instead of writing the note, refused asCONTEXT_NOTE_INVALIDon every retry.- A note whose sources include an ID naming no entry, or an entry with nothing to read, is no longer refused when every fact keeps a readable source: those sources are dropped and the note is checked again, and
/compaction-statuscounts them asscopeDropped. On GPT-6 Luna one ID a character off a real one, beside three valid citations, refused the same note on every retry. A fact that would be left without a source, or asupersedesID out of scope, still refuses withCONTEXT_NOTE_SCOPE. - The resident runtime's session writer no longer adds a second system prompt to a session whose first recorded prompt sits mid-history, as in a session begun before prompts were recorded. It checked only the first message, so it put the current prompt and tools at the head as well, which duplicated the instructions and could revive tools the transcript had removed; its request-size estimate counted the prompt twice. A regression covers the mid-history case beside the existing one at the head.
- The independent preview's session writer now reads the session's prompt cache in a session begun before Pi 1.4.0. Pi 1.4.0 records the system prompt in the transcript, there mid-history, and sends no leading prompt; the writer added one at the head, so its request diverged from the session's at the first item and wrote the whole context to the cache again. On GPT-6 Luna, with 150,000 tokens of context, the writer read 0 tokens before the fix and 150,145 after it, at a quarter of the cost. Over five compactions on 200k and 272k routes the writer read 95 to 97% of its input from the cache and cost 59 to 63% less; the pause, set mostly by reasoning at
max, did not shorten consistently. The request-size estimate and the excerpt check follow the same rule. context_historysearch on OpenCode, DSH and the independent preview opens each excerpt where the most query terms meet, not at the first place any one of them appears, and no longer returns the tool's own earlier results. On GPT-6 Luna a query for one line of a long log opened hundreds of lines early, and each search brought back copies of the ones before; finding four exact timestamps took 15 to 28 calls on each host, and one answ...
v0.7.2: SLICE extension preview for Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0
SLICE v0.7.2 supplies an ordinary extension for unmodified official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0.
Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:
pi install git:github.com/youxi-huang/slice@extension-v0.7.2Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.7.2 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/slice@extension-preview. A plain pi update updates Pi itself.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 122 stock-Pi package and lifecycle checks on official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.4.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: 738722a. Preview runtime: stock-preview+src.ae7bb53ee105c16a. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.7.2 moves the repository and its install source to youxi-huang/slice, and a second installed copy no longer pauses the session: a copy that finds another one loaded stands aside, so only one compacts. The extension otherwise compacts as v0.7.1 did, and the checkpoint schema, the source-hash format, the resident build fingerprint and the evaluation pin are unchanged. The source tree also gains retrieval-only previews for DSH and OpenCode, built from source and not published. Results are offline, on official Pi installations with loopback services, except GitHub's redirect, which was tested against the renamed repository; real-provider behavior is not part of this release.
Added
- Source-only retrieval previews for DSH
0.2.1-rc.3and OpenCode 1.19.4. Each adds onecontext_historytool that searches and reads the current session's original records through the host's public storage API and the shared core, citing native event and part IDs, with bounded pages, continuation cursors and source-change checks. They keep no second history database and refuse forked or seeded sessions. Neither writes SLICE checkpoints yet: DSH's pinned persistence contract cannot carry a required external checkpoint record, and OpenCode keeps its native compactor.
Changed
- The repository moved from
youxi-huang/pi-context-compactiontoyouxi-huang/slice, and the install source is nowgit:github.com/youxi-huang/slice. GitHub redirects the old address, so existing installations keep loading and updating, andpi updateandpi removestill name the address they were installed from. Pi counts the two addresses as two packages: moving means removing the old address and installing the new one, never installing both, since Pi then loads both copies. The release script, the package's repository and homepage, and the install commands in the README and the preview guide follow the new name. The package name, the commands, the configuration file and stored checkpoints are unchanged. - The README now shows how to build and load the DSH and OpenCode previews. Both sets of steps were run on the official hosts.
Fixed
- Two installed copies of the extension, from two addresses or two scopes, no longer pause the session at their next compaction. Pi loads both and runs both copies' handlers, so each wrote its own checkpoint for one attempt and the commit could not be confirmed. A copy now finds the others in Pi's command list: one compacts, the first loaded unless a copy of v0.7.1 or earlier is loaded, since that one cannot stand aside, and every other copy stands aside, says once which copy compacts and names the
pi removecommand that keeps one, preferring theyouxi-huang/sliceaddress./compaction-doctor:1and:2, as Pi names the commands of two copies, list both. Two copies of v0.7.1 or earlier still conflict. On official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0 a v0.7.2 copy installed after or before v0.7.1 leaves one writer request per compaction and a committed checkpoint; the stock-Pi acceptance gains the case with two v0.7.2 copies.
Security
- DSH
0.2.1-rc.3pins zod 4.4.3, affected by GHSA-mrhx-c7xc-m3w5. A root override lifts the new development dependencies to 4.6.7, sonpm auditstill reports no advisories. The OpenCode adapter imports zod 4.6.7 directly rather than the plugin package, whose V2 runtime it does not use. - Remove the unused upstream sandbox example, whose
@anthropic-ai/sandbox-runtimedependency held zod at 3.25.76, affected by GHSA-mrhx-c7xc-m3w5. No zod 3 release carries the fix, and even the latest sandbox runtime requires zod 3. With the example gone, every remaining dependent accepts zod 4, so the root lockfile moves zod to 4.6.7 andnpm auditreports no advisories. zod was never in the coding-agent install lock or the independent Pi extension; before the new OpenCode adapter, it arrived only through the example, as an optional peer of the provider SDKs and as a dependency of the upstream evaluation tools.
Maintenance
- Regressions for the v0.7.2 install-source move show, on Pi's real package and settings managers over a local repository, what happens when the old address is replaced, when both addresses are installed and when either scope is changed: configuration and sessions survive, checkpoints still validate, and a pending or failed compaction stays guarded through the reinstall. The same cases run against an official Pi on request. GitHub's redirect itself was tested after the rename, on each official host.
- CI runs its full pipeline on every push to main, including a merge that changes Markdown documents alone; only such a pull request still skips it. Publication accepts a tagged commit only after its
verifycheck concludedsuccess, and a skipped job concludesskipped, so a release tagged on a documentation-only merge would have failed at its last step, after the whole stock-Pi acceptance had run. A regression runs the workflow's scope step on a documentation-only commit for a pull request, a push and a manual run.
v0.7.1: SLICE extension preview for Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0
SLICE v0.7.1 supplies an ordinary extension for unmodified official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0.
Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:
pi install git:github.com/youxi-huang/pi-context-compaction@extension-v0.7.1Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.7.1 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/pi-context-compaction@extension-preview. A plain pi update updates Pi itself.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 118 stock-Pi package and lifecycle checks on official Pi 1.4.0, 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.4.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: 4d97d35. Preview runtime: stock-preview+src.1a4f2d4911b1a0a3. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.7.1 is the first extension built on the v0.7.0 host-neutral core, and the first release under the SLICE name. It adds official Pi 1.4.0 as the primary host beside 1.3.0, 1.2.0 and 1.1.0 and behaves as extension-v0.6.0 did: the core lifts were byte-identical on scripted inputs, and the checkpoint schema, the source-hash format, the resident build fingerprint and the evaluation pin are unchanged. The core's import gate now also refuses module loads it cannot verify. Every result is offline, on official Pi installations with loopback services; real-provider behavior is not part of this release.
Added
- Official Pi 1.4.0 is supported and becomes the primary host, beside 1.3.0, 1.2.0 and 1.1.0. Its extension API declarations, extension runner and session storage match 1.3.0, and it installs the same seven runtime packages, without
chord. Stock-Pi acceptance runs on all four hosts: each older host compacts a checkpoint written on 1.4.0, and 1.4.0 reopens the result. Pi 1.4.0's summary changes, the ignoredreserveTokensand custom instructions on a split turn, concern Pi's own summarizer, which the extension does not call. Its persistent omission of a truncated attempt's tool results arrives as context edits, which the extension already validates in full before the next request.
Changed
- The project is now called SLICE, Source-Linked Indexed Compaction of Everything, in the documentation, the release notes and the package description, and the README is rewritten for first-time readers. Its commit diagram is redrawn for the extension's checks and disk readback, and the opening illustration no longer says that checkpoints are written only on a manual
/compact. The repository, the install source, the package namepi-context-compaction-preview, the/compaction-*commands, thepi-context-memory.jsonconfiguration file and stored checkpoint identifiers keep their names, so existing installations and sessions need no change.
Fixed
- The core's import gate checked a dynamic import only when its specifier was a literal, so
import(name)or an interpolated template passed unchecked. Such a specifier now fails the gate with its location and expression. A regression covers both forms beside the literal ones that stay allowed. - The core's import gate never saw a module loaded by name through
node:module'screateRequire, throughprocess.getBuiltinModule, which needs no import at all, or through a barerequire.node:modulenow fails the gate, andrequire(x)andprocess.getBuiltinModule(x)are checked likeimport(x), so a specifier that is not a literal fails closed. Nothing in the core used any of these routes. A regression plants each form beside a builtin that stays allowed.
Security
- Update undici from 8.10.2 to 8.12.3 for GHSA-qrxm-fqhp-jwvm, GHSA-2m5v-pch6-74hx, GHSA-4w7w-5xrc-9h26, GHSA-xjj6-f33q-929c, GHSA-55wc-3pg8-jfw6, GHSA-f72v-6w45-q472, GHSA-4qv8-2p9j-2685 and GHSA-9fm3-97px-rjf6, and the development-only fast-uri, which the evaluation workspace pulls in through ajv, from 3.1.8 to 3.1.9 for GHSA-w74x-v6f9-j3xg, GHSA-wjr9-j795-jxcr, GHSA-xhq7-xmqj-769h and GHSA-333x-w4r6-6crp. The coding agent built from this tree sends its HTTP requests through undici, so the generated coding-agent install lock moves with it. The independent extension ships neither package; on official Pi it runs with the undici that Pi installs.
Maintenance
- The Publish extension preview workflow recognizes a source release. A
v*tag whose version differs from the extension package it builds, while that package version is already published, now ends after the build with a notice and publishes nothing, instead of running stock-Pi acceptance and failing at the publish step as v0.7.0 did. A tag beside an unpublished package version still fails, before any official Pi is installed. - The stock-Pi scenarios add
tool-loadout. With arm B off, the provider is offeredcontext_historyand notcontext_notein a fresh session, after a restart and after/treenavigation; a branch that calledcontext_notewhile B was on is offered it again after a restart; and a session started before the extension was installed stays usable withoutcontext_note. Pi 1.4.0 activates an extension tool a restored branch never recorded unless the tool registers withdefaultActive: false, whichcontext_notedoes while B is off, so the v0.5.3 saving of about 1,209 tokens per request holds. The case passes on official Pi 1.4.0 and 1.3.0.
v0.6.0 — Independent extension preview for Pi 1.3.0, 1.2.0 and 1.1.0
Pi Context Compaction v0.6.0 supplies an ordinary extension for unmodified official Pi 1.3.0, 1.2.0 and 1.1.0.
Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:
pi install git:github.com/youxi-huang/pi-context-compaction@extension-v0.6.0Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.6.0 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/pi-context-compaction@extension-preview. A plain pi update updates Pi itself.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 88 stock-Pi package and lifecycle checks on official Pi 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.3.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: 86dbbdc. Preview runtime: stock-preview+src.64965b134b6fdc64. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.6.0 is the footprint milestone's offline delivery, in the independent preview only. Three opt-in mechanisms ship behind their own switches, every one off by default: deterministic reversible reductions (previewReduction) replace consumed and superseded tool results in the request's projection with one line each while the session file stays untouched; labelled historical excerpts (previewExcerpts) answer an identifier the prompt names from compacted entries without touching the cached prefix; and derived summary renderings (previewRendering) fold repeated lineage and old failed paths while the stored checkpoint bytes never change. The bench gains a token-overhead report with required cache-write and page-back columns, candidate wiring and the P4 fixture. On the offline loopback the reduction cut the writer's input 46.8 percent with zero of 216 probe outcomes changed, and the lineage fold cut the rendered summary 36.7 percent at 40 checkpoints; real-provider savings, recovery and cache behavior are unmeasured, each provider bench is a separately budgeted step, and the writer instruction and sources repair inherited from v0.5.3 still await their qualifying bench. The resident runtime, its build fingerprint, the checkpoint schema, the frozen fixtures and the evaluation pin are unchanged.
Added
- When the independent preview's note writer leaves at most five facts without sources, and that is the candidate's only fault against the note schema, the writer gets one repair request that names those facts beside the entries they may cite: the active requests and other user messages in full, excerpts of the entries the rest of the note cites, and the uncovered entries by their opening words. The answer may add sources only; each fact's text, quote and supersedes stay as written, and the whole note is checked again, so an invented ID or a quote the cited entries do not contain still blocks. The extension never supplies an ID itself. This is the compaction's one repair under
noteRepair, shared with the quotation and size repairs, and like them it runs without reasoning. /compaction-statusreports the first candidate refused on the note schema underlastWriter.schema: facts without sources by section, and whether the note fails the schema for another reason too. A repair that ran reportsrepairKind: "sources". Both are counts; no fact text or ID is reported.- Behind a new
previewReductionswitch, off by default, the independent preview's request projection replaces two kinds of tool results with one line each — an earlier read of a file that was read again later, and a consumed result after which a later turn completed — naming the tool, its target, the first line of its result and the record ID, whichcontext_historyreads back in full. The reduction is a pure function of the session records, recomputed on every request and never stored: the session file is untouched, the same records always produce the same bytes, appending turns never un-reduces an entry, and the writer's prefix and the main model's context reduce identically, so both share one cached prefix. User messages, assistant text, checkpoint summaries, error results and the sole evidence cited by a committed fact are never reduced; tool calls stay paired; a checkpoint written over a reduced view is byte-identical to one written without it; a failed compaction blocks exactly as before. An invalid switch value disables the feature without touching requests./compaction-statusreports content-free counts underreduction. - Behind a new
previewExcerptsswitch, off by default, when the user's prompt names an identifier-shaped term that only compacted or reduced entries hold, the request ending with that prompt gains one short original excerpt at its end, labelled as historical evidence with its record ID and role, never as an instruction. At most two excerpts of at most 200 estimated tokens each are appended within the request limit, a deterministic secret filter withholds a matching record entirely and names only its ID, nothing enters the session file, and every earlier message is reused unchanged, so the provider's cached prefix is untouched./compaction-statusreports counts underexcerpts, including excerpts appended and excerpts no answer cited. context_historyresults statereadTokens, the estimated cost of reading each hit in full, and mark hits whose entries are already in context (a reduced entry is unmarked, since only its one line is).readacceptsdetail: "low"for a bounded opening with the full cost stated;fullremains the default and returns what it did before.- Behind a new
previewRenderingswitch, off by default, the summary the model sees is derived from the stored note and lineage by a pure function while the stored checkpoint rendering stays byte for byte; the recovery guards accept and require that same derivation, so a tampered rendering is still refused, and with the switch off behavior is byte-identical to before. Three candidates are selectable one at a time for measurement: failed paths and reasons whose sources precede the previous checkpoint fold to one line with their source IDs; repeated lineage state lines fold with guidance rendered once and every anchor kept; and each fact can show the roles of the records it cites, computed from the records, never claimed by the note. An invalid switch value disables the feature without touching requests./compaction-statusreports the active candidates underrendering.
Changed
- The independent preview's writer instruction says that every fact in every section, next steps included, cites the entries that support it, whether or not it carries a quote, and that a next step cites the request or recorded progress it continues without claiming the step is done. The in-task handover asks the same of its continuation step. In the v0.5.3 relay bench, each refused GPT-6 Luna note examined held next steps with text alone. The resident runtime, its build fingerprint, the checkpoint schema and the evaluation pin are unchanged.
Fixed
/compaction-statusreportedsent.effort: mediumfor every GPT-6 Luna writer request. Since Pi 1.3.0, models that change effort mid-conversation receive a fixedreasoning.effortofmediumand the requested level in aconfiguration_updateinput item.sent.effortnow reports that item's level, andsent.fixedEffortthe fixed one.
Maintenance
- The preview bench records each attempt's schema counts and sums them per cut and overall under
schemaRefusals, and counts sources repairs beside quotation and size repairs. The stock-Pi scenarios addsources-repair-refusedand `sources-r...
v0.5.3 — Independent extension preview for Pi 1.3.0, 1.2.0 and 1.1.0
Pi Context Compaction v0.5.3 supplies an ordinary extension for unmodified official Pi 1.3.0, 1.2.0 and 1.1.0.
Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:
pi install git:github.com/youxi-huang/pi-context-compaction@extension-v0.5.3Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.5.3 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/pi-context-compaction@extension-preview. A plain pi update updates Pi itself.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 88 stock-Pi package and lifecycle checks on official Pi 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.3.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: 5cde2de. Preview runtime: stock-preview+src.cb5dcce5a76c043e. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.5.3 adapts the independent extension's note writer to GPT-6 Luna. The session writer sends the session's ID with its request, so Pi's Codex provider can serve it from the session's prompt cache. Writers are asked for the note itself, and the two schema envelopes Luna returned around complete notes are removed before every commit check runs. A fresh session without arm B no longer offers context_note, saving about 1,209 Pi-estimated tokens per request. In a writer bench beside the v0.5.2 release build on the same day, DeepSeek V4.1 Flash committed 64 of 64 notes against 62 of 64; GPT-6 Luna at max, through a third-party relay, committed 47 of 64 against 37 of 64 before, and the notes it still loses carry next steps without sources. The changes are in the independent preview only: the resident runtime, its build fingerprint, the checkpoint schema and the evaluation pin are unchanged.
Changed
- The independent preview's session writer sends the session's ID with its request, as Pi does with each of the session's requests. Pi's Codex provider keys its prompt cache on that ID: without it, GPT-6 Luna's writer read 7.1% of its input from cache, against 93.6% on DeepSeek. Providers that need no key ignore it.
- The independent preview asks its note writers for the note itself rather than for an object matching the note's JSON Schema. Before validation it removes the two schema envelopes GPT-6 Luna returned around complete notes: a string
typebeside exactly the seven sections, andtype,propertiesandrequiredwith exactly the seven sections underproperties. Nothing else is rewritten, every commit check still applies, and/compaction-statusnames a removed envelope underenvelopeinwriterCallDetails. Answers that are not JSON are refused as before. - With arm B off, a fresh independent-preview session no longer offers
context_note, saving about 1,209 Pi-estimated tokens per request. A branch with an earlier call, saved or refused, activates it on reopen or branch navigation; explicit activations and saved notes remain usable.
Maintenance
- The preview bench measures
openai/gpt-6-lunathrough an OpenAI-compatible relay with--provider relay --base-url, keeping Pi's catalog settings and the Responses API, so the session writer's cache key reaches the relay. A relay's own usage counts make its cache share and cost incomparable with other runs; refusals, notes and probe scores compare. Writer rows record each relay response's shape as they do for Codex, and both now name the keys and kinds of each section's items, which is how the relay run traced its refused notes to next steps without sources. - The preview bench stops a unit still running after
--unit-minutes, 10 by default, so one request that never returns cannot hold a run; the unit settles as crashed and a probe it held is scored as blocked. Writer rows and the summary also count the schema envelopes removed from notes. - The preview bench measures
openai-codex/gpt-6-lunaon the ChatGPT subscription with--provider codex, in writer, probes and smoke modes, under the same request, time and cost limits. In writer mode it records the shape of every Codex response, never its text, which is how the first run traced its refused notes. In Claude Code cloud sessions the access token stays in the environment's network proxy and Pi holds an unsigned placeholder;docs/context-memory/codex-subscription.mdcovers the setup and the renewal every ten days or so.
v0.5.2 — Independent extension preview for Pi 1.3.0, 1.2.0 and 1.1.0
Pi Context Compaction v0.5.2 supplies an ordinary extension for unmodified official Pi 1.3.0, 1.2.0 and 1.1.0.
Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:
pi install git:github.com/youxi-huang/pi-context-compaction@extension-v0.5.2Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.5.2 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/pi-context-compaction@extension-preview. A plain pi update updates Pi itself.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 88 stock-Pi package and lifecycle checks on official Pi 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.3.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: 86cb9c6. Preview runtime: stock-preview+src.289ffa92e5522496. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.5.2 makes the independent extension quiet when it works and specific when it has to stop. Pi's footer now shows whether compaction is on, how many checkpoints the branch holds, when a note is being written and when requests are paused. Notices say what happened before why and end with the code, and a blocked session gets a one-line reminder instead of the whole notice on every input. Text typed while requests are paused goes back to the editor instead of into a request Pi then aborts. A session that reopens with a checkpoint shows its ready or off notice at the first input, where Pi's own status line used to overwrite it. Around a compaction the extension spends 44% less of its own time, with every check in place. The changes are in the independent preview only: the resident runtime, its build fingerprint, the checkpoint schema and the evaluation pin are unchanged. Each change was walked through in an 80-column terminal on official Pi 1.3.0, 1.2.0 and 1.1.0 with synthetic responses; no real-provider run is part of this release. The source tree also drops an unused upstream example that pulled in a vulnerable node-forge.
Added
- The independent preview shows its state on Pi's footer line: on, the number of checkpoints on the current branch, writing a note, or paused with a pointer to
/compaction-doctor. Before, a paused session showed only when an input was refused.
Changed
/compaction-doctorends withResult: ready for requestsinstead ofResult: ready, so it no longer reads as a promise that/compactwill run, and its note on Pi's history threshold is shorter.- While the independent preview is paused, text typed in Pi's interactive editor goes back to the editor, and the notice says why. No request starts, nothing is recorded in the session, and Pi no longer adds
This operation was aborted. Commands still run, and the request guard still stops every other paused request. - The independent preview's notices begin with
Source-linked compaction, say what happened before why, and put the code last. A blocked session no longer repeats the whole notice on every input: later inputs blocked by the same code get one short line until a checkpoint or recovery is confirmed./compaction-doctorreports arequestsline instead ofdurable block, and every code a preview session can raise or restore has its own advice. - The independent preview spends less of its own time around a compaction and when a long session reopens: at 40 checkpoints in a synthetic session, 311 ms instead of 558 ms around the writer and 75 ms instead of 118 ms added to a reopen. Within one synchronous step it now serializes, hashes and reads the session file once where it did so several times. Every source comparison runs at the same moments, and checkpoint hashes are byte-identical.
Fixed
- When a session with a checkpoint reopens in Pi's interactive mode, the independent preview's ready or off notice now appears with the first input. Before, Pi's
Session compactedstatus overwrote it.
Security
- Remove the unused upstream Gondolin micro-VM example and its workspace dependency chain, which included
node-forgeaffected by GHSA-86w9-cpqp-85rv. Remove its standalone lockfile and the obsolete audit exception, and update the example index and isolation guide. The documented agent maintenance commands, resident compaction runtime and independent extension do not use this example.
v0.5.1 — Independent extension preview for Pi 1.3.0, 1.2.0 and 1.1.0
Pi Context Compaction v0.5.1 supplies an ordinary extension for unmodified official Pi 1.3.0, 1.2.0 and 1.1.0.
Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:
pi install git:github.com/youxi-huang/pi-context-compaction@extension-v0.5.1Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.5.1 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/pi-context-compaction@extension-preview. A plain pi update updates Pi itself.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 88 stock-Pi package and lifecycle checks on official Pi 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.3.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: e215597. Preview runtime: stock-preview+src.a6732408742a34f4. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.5.1 makes the independent extension's quotation repair cheaper and its failures easier to diagnose. The repair now runs without reasoning, whatever the writer's effort: in v0.5.0 one repair at high spent its output on reasoning and returned nothing usable. /compaction-status names what each writer call asked for, what its request carried and how it ended, and counts the citations behind a scope refusal. A repair can no longer withdraw a ruling a user stated, and context_history's list no longer marks a still-valid fact as superseded. The changes are in the independent preview only: the resident runtime, its build fingerprint, the checkpoint schema and the evaluation pin are unchanged. Two bounded runs with DeepSeek V4.1 Flash on Pi 1.3.0 are in the validation record: over 38 planted repair cases, two attempts each, the repair passed 76 of 76 without reasoning against 75 of 76 at high, and in writer benches beside a same-day run of the v0.5.0 release build the candidate committed 121 of 128 notes against 62 of 64. They cover one model and synthetic tasks, not a general failure rate.
Added
/compaction-statusreports for each writer call the reasoning effort it asked for, the reasoning settings and output cap its provider request carried, read from the request Pi built without its content, and how the response ended; a quotation repair's withdrawn facts are also counted by section. In v0.5.0 a repair that spent its output on reasoning could not be told apart from other failed calls. On official Pi 1.1.0 to 1.3.0, a DeepSeek Flash session at thinking levelmediumalready runs athigh, because the model declares nomedium, so its writer sendsreasoning_effort: "high".- For a note refused with
CONTEXT_NOTE_SCOPE,/compaction-statuscounts the cited IDs that name no entry on the branch and those of entries with no readable text, by entry kind, without naming them. The two call for different fixes, and the refused note itself is not stored. Four such refusals in one DeepSeek writer bench left their cause unknown.
Changed
- The quotation repair runs without reasoning, whatever the writer's effort. In v0.5.0 one repair at
highspent 10,720 of its 11,962 output tokens reasoning and returned nothing usable. On DeepSeek V4.1 Flash over the 38 planted repair cases, two attempts each, the repair passed 76 of 76 without reasoning against 75 of 76 athighand atlow, at a median of 65 output tokens and 1.4 s against 277 and 2.4 s athigh, and none of the three levels lost a user's ruling. The size repair keeps the writer's effort; it was not measured. - The quotation and size repairs set no tool choice, as the session writer does. Their requests offer no tools, so the model sees the same request; they no longer send
tool_choice: "none"without any tool to choose.
Fixed
context_history's list no longer marks a still-valid fact as superseded because a revision names the entry it shares with a revised fact. A note'ssupersedesnames entries, not facts: a constraint stated in the same message as a timeout that was later raised was listed as replaced by the new timeout. A revision now marks only the facts of its own section on that entry, and only when they are no more than the revisions naming it; other facts on a revised entry carrysourceRevisedBy, and the tool description says what it means.- A quotation repair can no longer withdraw an instruction whose quoted text a user message contains. Such a repair committed a note without the rule; it now refuses the note with
CONTEXT_NOTE_REPAIR_LOSS, and re-citing the rule or dropping its quote remains possible. Withdrawing a fact no user message supports is unchanged.
Maintenance
- The preview writer bench has a
repairmode over 38 deterministic quotation-repair cases planted in the P fixtures: misattributed, misspaced, echoed and paraphrased rulings, and an order only a tool wrote. Only the repair reaches the measured model, and scoring counts lost rulings and instructions quoted from assistant or tool text without a judge.--provider deepseek-localbuilds the requests from Pi's DeepSeek catalog model and answers them locally.
v0.5.0 — Independent extension preview for Pi 1.3.0, 1.2.0 and 1.1.0
Pi Context Compaction v0.5.0 supplies an ordinary extension for unmodified official Pi 1.3.0, 1.2.0 and 1.1.0.
Install this release's extension package (a fixed package tag) from your terminal, then restart Pi:
pi install git:github.com/youxi-huang/pi-context-compaction@extension-v0.5.0Start a new persistent text session and run /compaction-doctor to check it without calling a model. Source tag v0.5.0 selects the development monorepo, not the package. To follow later previews instead, install the moving extension-preview branch in place of the tag and update only this package with pi update --extension git:github.com/youxi-huang/pi-context-compaction@extension-preview. A plain pi update updates Pi itself.
This pre-release supports manual /compact and Pi's threshold compaction after completed text turns, source-linked history retrieval and explicit disk-confirmed failure recovery. In the sessions it handles, overflow recovery still requires explicit /compact, and background cache warming is paused. Sessions it never protected and cannot check, such as ones with native checkpoints, images or another Pi version, are left to Pi without a failure marker. Other checkpoint formats, parent-history grants, attachments, concurrent writers and Windows are outside its verified scope.
Ordinary Agent retries after transient provider failures are supported, including partial-response connection drops. Existing retry-related blocks and text-only context-overflow failures can use explicit /compact recovery when sufficient completed source history exists. Arbitrary context edits and unfinished tool-call omissions remain unsupported.
Optional preparation has two arms, both disabled by default: A prepares with the configured writer; B merges data-only work notes from the session model. A validated candidate can commit its covered prefix without a writer call while every later original stays verbatim. B carries covered user messages in full and falls back to the configured writer when they do not fit. Every writer call is journaled, including cancelled or discarded preparation and unknown usage. These are experimental paths; real-provider pause, total cost, cache behavior and recovery benefits remain unproven.
Validation: this publication run passed 88 stock-Pi package and lifecycle checks on official Pi 1.3.0, 1.2.0 and 1.1.0 and the full default-settings scenario suite on Pi 1.3.0 with strict acceptance and no performance exceptions or known gaps. Scenario evidence is bound to this exact package and source commit; the 50 ms request-overhead target and checkpoint-growth bound are required checks. Focused, security and frozen evaluator checks also remain required on final main. Services are synthetic and loopback only; no real-provider quality, latency or interactive TUI claim is made.
Source commit: f95109b. Preview runtime: stock-preview+src.c6aefd74b04f4aaa. Resident runtime keeps its v0.3.0 fingerprint.
Usage and recovery · Validation
Changes
v0.5.0 makes the independent extension's notes harder to lose and its history quicker to search. The session writer sees every uncovered user message in full beside its entry ID, a note that fails only on its quotations gets one targeted repair, and context_history lists constraints, decisions, failed approaches, files, edits and errors directly. The writer also reuses the session's prompt cache, which cut its cost by about 70% on DeepSeek. The changes are in the independent preview only: the resident runtime, its build fingerprint, the checkpoint schema and the evaluation pin are unchanged, and a v0.5.0 checkpoint reopens under v0.4.3. Two bounded runs with DeepSeek V4.1 Flash on Pi 1.3.0 are in the validation record: on the two synthetic sessions both writers ran, v0.5.0 builds committed 37 to 40 of 40 notes against 32 for the v0.4.3 writer, and on the session built for retrieval every probe passed with fewer calls than the baseline. They cover one model and synthetic tasks, not a general failure rate.
Added
- One quotation repair. When a candidate note fails only because quotations do not match the entries they cite, for at most five facts, the writer gets one request about those facts alone: the entries they cite and the entries that do contain the quoted text, with their roles. A replacement may change only its sources and quote, or withdraw the fact; the rest of the note is kept as written and the whole note is checked again.
noteRepairgoverns this repair and the size repair, and a compaction spends at most one of them. A second failure blocks as before, and the extension never moves a quotation to another entry on its own. context_historylists one kind of item withoperation: "list": the constraints, decisions, failed approaches, files, plans and state that committed checkpoints recorded, plus edits and errors read from tool records, newest first, with superseded items marked and their original entries named. The list is computed on every call and stores nothing; search and read are unchanged./compaction-statusreports underlastWriterthe first refused candidate's quotation failures by class, the kind of repair that ran, what a quotation repair changed, how many writer responses called a tool and whether one was declined.
Changed
- The session writer's handover request lists every uncovered user message in full beside its entry ID, and says that the manifest's openings are not to be copied as quotations. Both recorded live runs lost a checkpoint to a quotation cited to the wrong entry. The list is marked as serving quotation only: on DeepSeek, without that line, the writer read it as the whole task and recorded the assistant's announced next step as unrequested.
- The session writer sets no tool choice, as the session's own requests do, so a provider that caches prompt prefixes serves its request from the session's cache. With
tool_choice: "none", DeepSeek left the tool definitions out of the prompt and every compaction paid for the whole history; in a check, 91 to 99.6% of the writer's input now came from cache and each call cost about a third. The request tells the model to call no tool. A tool call is never run: the first is answered as unavailable and the request continues once on the same cached prefix, without spending the size or quotation repair, so a compaction makes at most three writer calls; a second tool call refuses the note, andnoteRepairgoverns the continuation too. - A refused quotation's message counts the failures by class: text found in other entries, text that differs only in spacing or punctuation, and text found nowhere. A refused
context_notenames each failing field and the entries that contain its quoted text.
Maintenance
eval/previewadds an evaluation set for the preview, separate from the frozen fixtures: three invented sessions with revisions, withdrawn work, forbidden retries, quotation traps and, in P3, answers no note can hold, with 75 typed probes and their scorer. Scorer version 2 passes an answer that leads with the right value in prose and counts it;rescore.tsapplies it to saved replies.scripts/context-memory-preview-bench.mjsruns a writer bench and the probes on official Pi, offline by default.- The stock-Pi scenarios check quotation repair and the typed list end to end.
- The bench reaches a provider through Pi's proxy-aware dispatcher, retries a refused probe cut up to four attempts, and reports each committed note's size against the history it condenses and the gold answers it cites. By default it reproduces a session's prompt cache, warming the prefix before each cut's compactions as a session's turns do;
--cache coldmeasures a cold prefix. Two bounded DeepSeek runs of the baseline and the candidate are in the validation record.