# pi · Context recovery

> Levels are per column and must not be summed, averaged or ranked. A level states which written criterion the runtime's source meets. It is not a measure of quality or task success. Higher is not always preferable.

Source: "Agent runtime comparison: ten open-source agent runtimes, source review", study of 2026-11-28. Mark notation: `3` is the level in the default deployment; `1→4 [opt: …]` is level 1 by default and level 4 in the named configuration; `s` source-verified, `d` documented or test only. Service dependencies are classes (E embedded, O on demand, R resident service, X external server required), not levels.

- Runtime: [pi](https://ai-agents-review.com/runtime/pi.md)
- Column: [Context recovery](https://ai-agents-review.com/column/context-recovery.md) (Evidence and memory)
- Mark: 2 s
- Default deployment: 2
- Best supported configuration: 2
- Page: https://ai-agents-review.com/cell/pi/context-recovery

## Rationale

Originals in JSONL; recovery via file lists and temp-file paths only; no transcript search tool (level 3 unmet)

## Rubric criteria for this column

- 0: Evidence that leaves the prompt is gone, or never stored
- 1: Only an in-prompt summary; originals not stored, or stored but unreachable by the agent
- 2: Originals stored, reachable only through generic means (re-reading files, temp-file paths named in the summary) or through a retrieval tool that is off by default
- 3: Default-on retrieval tool or command over stored transcript/memory (search plus read)
- 4: Level 3, plus automatic relevance-based injection of stored evidence **or** stable references (ids/paths) that survive restart and compaction

## Review finding

Built in. Compaction at window − 16k keeps about 20k tokens. The summary carries cumulative read/modified file lists so files can be re-read. No transcript-search tool. Bash full output is reachable by temp-file path [E89][E90][E91]. Note E-7.

## Evidence cited by the mark

- [E89] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/src/core/tools/output-accumulator.ts#L32-L117 — bash full output to temp file (`full_output_path`) — [S]
- [E90] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/src/core/compaction/compaction.ts#L126-L129 — compaction defaults: reserve 16384, keepRecent 20000 — [S]
- [E91] pi — https://github.com/earendil-works/pi/blob/2126569de40d5595dd3f41f7af126001f04c1de0/packages/coding-agent/src/core/compaction/compaction.ts#L52-L78 — `CompactionDetails{readFiles, modifiedFiles}` accumulated across compactions — [S]

## Grading record

- Grader A (default / best): 2 / 2
- Grader B (default / best): 2 / 2
