You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keeping several long-running Pi-Bolt sessions open can put substantial pressure on RAM, even when they are idle and most of their history is no longer in the model context. Compaction helps with context size, but it does not release the older session entries.
On Pi-Bolt 1.4.0 (macOS arm64, JIT build), I compared two synthetic JSONL sessions with the same two messages in the active context. The only difference was 64 MiB of image tool results before the latest compaction in one file. In offline RPC mode with extensions disabled, the process's physical footprint went from about 12 MiB to 82 MiB. The session loader retains the parsed entries when it opens a session.
Upstream Pi is aware of the problem. The report is closed as not planned, and there is no announced timeline for using pi-durable in the coding agent.
A few approaches seem worth discussing:
Index the JSONL and read older entries on demand. Keep the active context in memory and use file offsets to read older entries when needed. This preserves the session file and helps with text-heavy histories too. A reusable index would avoid a full scan on ordinary resumes. Opening an old branch would cost disk reads, and extensions that explicitly request the full history could still load it.
Store large payloads separately. Loading images by reference would help screenshot-heavy sessions without changing how other entries are read. It would not help much with long text histories unless extended to those payloads, and copying or exporting a session would need to account for the referenced files.
Offer opt-in pruning after compaction. This would reduce memory use with the existing loader, but pruned output could no longer be inspected or used when revisiting an old branch.
Would reducing memory use for large sessions be in scope for Pi-Bolt?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Keeping several long-running Pi-Bolt sessions open can put substantial pressure on RAM, even when they are idle and most of their history is no longer in the model context. Compaction helps with context size, but it does not release the older session entries.
On Pi-Bolt 1.4.0 (macOS arm64, JIT build), I compared two synthetic JSONL sessions with the same two messages in the active context. The only difference was 64 MiB of image tool results before the latest compaction in one file. In offline RPC mode with extensions disabled, the process's physical footprint went from about 12 MiB to 82 MiB. The session loader retains the parsed entries when it opens a session.
Upstream Pi is aware of the problem. The report is closed as not planned, and there is no announced timeline for using
pi-durablein the coding agent.A few approaches seem worth discussing:
Would reducing memory use for large sessions be in scope for Pi-Bolt?
All reactions