# letta-code · 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: [letta-code](https://ai-agents-review.com/runtime/letta-code.md)
- Column: [Context recovery](https://ai-agents-review.com/column/context-recovery.md) (Evidence and memory)
- Mark: 2→3 [opt: experimental local backend] d
- Default deployment: 2
- Best supported configuration: 3 (opt: experimental local backend)
- Page: https://ai-agents-review.com/cell/letta-code/context-recovery

## Rationale

Cloud compaction/search [D] caps D; local mode keeps rows with default BM25 search and recall subagent

## 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

API: server-side compaction [D]. Local: an in-tree LLM sliding-window summary keeps the raw rows on disk. They are searchable with in-tree BM25 via `letta messages search` and a recall subagent. The agent has to ask. Nothing is injected automatically [E39][E40][E41][E42].

## Evidence cited by the mark

- [E39] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/backend/backend.ts#L549-L555 — API-mode compaction request forwarded to server (algorithm server-side) — [S] client / [D] server
- [E41] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/backend/local/transcript-search.ts#L280-L319 — in-tree BM25 (k1 1.2, b 0.75) over local transcripts — [S]
- [E42] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/agent/prompts/recall_subagent_local.md#L13-L60 — recall subagent uses `letta messages search/list` — [S]

## Evidence also cited by the review finding

- [E40] letta-code — https://github.com/letta-ai/letta-code/blob/52a3bb3bc1999a2fd0f06b1dc2e4b0d94a925c21/src/backend/local/compaction.ts#L29-L63 — local summarizer modes (all / sliding_window) — [S]

## Grading record

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