Daily Edition Sources +5

API Discovery: Shorten the Context, Keep the History

Pi v0.87.0 lets a builder append an edit to future model context while leaving the original transcript intact. That is useful for a reading assistant—and it is not data deletion.

An intact transcript passes through an appended context edit to a smaller next request, stamped not data deletion.
Diagram Punka slimmer model view leaves the original record intact.
repo earendil-works/pi evidence
5 source signals 1 repo 5 source signals
Evidence: 5 source signals / September 22, 2026 / Daily Edition
Open Edition Evidence below

A research agent may need the conclusion from a long document without sending the entire document back on every turn. Pi’s September 21 release exposes a local SDK mechanism for that separation: SessionManager.appendContextEdit().

The public format defines an appended entry pointing at an earlier message. Passing null omits that message from future model context; a content replacement changes what the model will receive. The original message remains in raw history, UI history, exports and accounting. Edits follow the active branch, and the latest applicable edit wins.

Example: a smaller reading notebook

Use a disposable research session to keep a long, non-sensitive source excerpt as a user message. Once a short, source-linked note has been added, omit the excerpt from the projected context. The notebook can still show what the reader supplied while later requests carry the note. This illustrative snippet assumes excerptEntryId identifies that message on the active branch of an idle session:

session.sessionManager.appendContextEdit(excerptEntryId, null);
session.refreshContext();

The implementation rejects missing targets and entries outside the active branch. The SDK documentation also changes the integration rule: the session manager owns provider context. Assigning a new array to session.agent.state.messages no longer replaces persisted request history.

Copyable agent instruction

Using Pi v0.87.0 in a disposable local test, create an
in-memory SessionManager with a long synthetic user excerpt
and a short source-linked note. Record the excerpt entry ID.
Append a null context edit targeting that ID. Assert that
buildSessionProjection().messages omits the excerpt while
getEntry(id) still contains the original. Branch to a point
before the edit and check that the excerpt reappears.
Do not call a model or use real private documents. Report
which assertions you ran and which remain untested.

Access and test caveat

This is a local TypeScript SDK API, not a hosted HTTP endpoint. The proposed in-memory check needs no provider credentials; actually running an agent needs a configured model and may incur usage charges. We inspected the tagged implementation and upstream projection tests, but did not execute this example or measure token savings or answer quality.

Do not use omission as a privacy eraser: it leaves the source record intact and cannot recall earlier provider requests. The useful next check is whether the smaller context still supports the agent’s answer with the right source, while the unabridged history remains available for inspection.

Evidence Trail

Receipts below the story

The article above is the public narrative. This section keeps the source trail and limits on the same page.

Edition
DateSeptember 22, 2026
LaneDaily Edition
Confidence78%
Sources5
Reposearendil-works/pi

Primary Evidence

Evidence Limits

  • Inspected the tagged implementation and upstream tests; did not run the example, provider requests or token/answer-quality benchmarks.
  • This is a local TypeScript API, not a public hosted HTTP service. The in-memory experiment needs no provider key; running an agent requires configured model access.
  • Context omission does not delete stored history or undo earlier transmissions to a provider. A shorter projection does not guarantee an adequate summary.
Letters & Corrections

Send a note to the desk

Corrections, missing context, or a follow-up lead.