Memory
Memory records what you worked on so a later session can recall decisions, fixes and unfinished work. It is on by default and independent of quizzes: quiz.enabled: false stops questions while memory continues.
Start by asking /eklavya:memory about a past change. To browse, use the Memory dashboard. To check capture or a stalled queue, run eklavya memory status.
What gets captured
Hooks record prompts, Claude’s final message for each turn, session events and tool activity. A tool event includes its name, arguments, file paths and what came back: a failed call keeps its error (up to 800 characters), and a successful call keeps an excerpt of its result, the first 1,600 and last 600 characters. Reads and edits keep no result, so a file’s contents are never stored as a second copy of your repository.
The result is what lets an observation say what was found, not only what ran: kubectl get configmap is remembered with the value it printed. It also means command and query output is stored locally after redaction. To keep a tool’s output out of memory entirely, for example a database query tool that returns sensitive rows, add it to privacy.exclude_tools.
| Event kind | Source |
|---|---|
prompt | A message you send. |
tool_use, tool_error | Successful tool calls with a result excerpt, or failed calls with their error. A failure comes from either the PostToolUse hook (a response marked as failed) or the PostToolUseFailure hook; both carry the call’s tool_use_id, so one failure is stored once. |
file_edit | Edit, Write, NotebookEdit and MultiEdit. |
file_read | Read, NotebookRead, Glob and Grep. |
assistant, lifecycle | Claude’s final message at the end of each turn (from Claude Code’s Stop hook), and session start/stop events. |
note | A note saved explicitly. |
Bodies are limited to 4,000 characters after redaction; edits retain up to 600 characters per side. memory.capture: minimal keeps prompts, assistant messages, session events and notes. off stops capture but keeps existing history searchable.
What is never captured
Privacy checks run before evidence is stored. Built-in path exclusions are substring matches:
.env .env. /.ssh/ id_rsa id_ed25519 .pem.p12 .keystore credentials.json .netrc .npmrcsecrets. .eklavya/knowledge.dbNothing is captured in a folder outside a git checkout unless retrieval.cross_project is on: only a cross-project search serves that folder, so otherwise its evidence would only take up space. An excluded read or edit is dropped when it has no remaining allowed file. Any other event that names an excluded file, including a failed Read, Edit or Write, is dropped whole even when it also names an allowed file, because its error or result can quote the excluded file and cannot be split by file. A failure on an allowed file is still recorded. Earlier releases kept the error text of a failed Read, Edit or Write of an excluded file. The first time the database opens after an upgrade, a migration deletes that evidence. It does not change summaries already written from it; delete any affected entry with memory_delete. Eklavya’s own tool calls, CLI traffic and checkpoint messages are excluded to prevent its output feeding back into memory. An unattended session, such as claude -p or a script (the host sets CLAUDE_CODE_SESSION_ATTENDED=0), records no prompts, replies or session starts, only its tool and file activity. Otherwise each one-question call would queue a summary job of its own.
Secret detection redacts private keys, URL passwords, common provider tokens, JWTs, bearer tokens and secret assignments such as DB_PASSWORD=…. It preserves markers such as [redacted:github-token] so the surrounding event remains understandable. The built-in rules also apply to saved notes and imported entries. Redaction, including your privacy.redact_patterns, runs before any excerpt or length limit cuts the text: a quoted secret whose closing quote was cut off is still redacted, and the partial word at a cut is dropped so a shortened token cannot slip past its pattern.
Built-in secret shapes
| Shape | Examples |
|---|---|
| Private keys | PEM private-key blocks, including unfinished blocks. |
| URL credentials | Passwords in scheme://user:password@host. |
| Anthropic, OpenAI and Stripe | sk-ant-, sk-, sk-proj-, sk-svcacct-, sk-admin-, Stripe sk_ and rk_ forms. |
| GitHub, GitLab and npm | ghp_, gho_, ghu_, ghs_, ghr_, github_pat_, glpat-, npm_. |
| AWS, Slack and Google | AKIA, ASIA, xoxb-, xoxa-, xoxp-, xoxr-, xoxs-, AIza. |
| Other credentials | Three-part JWTs, bearer tokens, and values assigned to names ending in password, passwd, passphrase, secret, credential, token, API/access/private key or authorization. |
Add rules with privacy.exclude_paths, privacy.exclude_tools and privacy.redact_patterns. They extend the built-in rules; invalid regular expressions are skipped.
How observations are made
An observation summarises a batch of evidence into a title, narrative, facts, files and tags. Batches close:
- At
memory.batch_max_eventsevents (40 by default). - At a turn end when they contain at least eight events or are 20 minutes old.
- At the next session start, even if a smaller batch remains. Compaction is the same session, not a new start.
- At any turn end or session start in any project, for a leftover from a session that has gone quiet for 20 minutes. A session you never return to is still summarised, without waiting for another session in its project.
New installs use claude-haiku-5-5 to write observations through claude -p and
your Claude Code login. The captured evidence described above goes to that
model. Hooks queue the work and return without waiting. Types include bugfix,
refactor, decision, feature, discovery, change and explicit note.
Set providers.observer to null to use the local local-v1 summariser. It
makes no model calls and extracts what the evidence says without inferring why
a change happened; its observations carry confidence 0.5. Search and storage
are local with either summariser. Existing installs keep their saved model;
older configs with no observer setting keep local summaries.
The model is told to record what was learned, built, fixed, decided or configured rather than what the agent was doing, and to skip routine operations such as status checks with nothing to report, clean installs and searches that found nothing. It writes one observation per distinct finding, decision or change, up to six per batch, each with at most 12 facts. When it goes past those limits, the extra is trimmed and the rest is kept; only output with the wrong shape fails the batch.
Only one model worker runs at a time. It processes up to four batches and hands remaining ready jobs to a fresh worker. Calls have a 100-second limit; cancellation or timeout also stops child processes. Observer helper sessions are excluded from capture.
When the model is unavailable
If Claude Code is not logged in, a usage limit is reached or claude cannot be found, the queue pauses instead of retrying every job. While it is paused:
- Each session start and turn end writes
local-v1observations for up to four waiting batches, so recall keeps showing current work. These are stand-ins: the jobs stay queued, and when the model later summarises a batch, its observations replace the local ones. - At most every 30 minutes, a turn end or session start checks whether the cause is fixed. A login is checked with
claude auth status, which makes no model call. A usage limit is retried after an hour. Once the check passes, the queue resumes by itself. - The session banner says so, for example
Memory paused · claude not logged in since 23 Sep · local summaries meanwhile · fix it, then: eklavya memory process.
Separately, if the oldest waiting job is more than six hours old, the banner shows Memory behind · 12 jobs waiting, oldest 9h · run: eklavya doctor.
The memory health verdict
A stalled memory looks exactly like a working one from the outside: recall keeps returning older entries and nothing complains. So Eklavya computes one verdict, ok, warn or stalled, from facts already in your local database, and shows the same verdict in four places: eklavya memory status (the health: line), the memory_status tool (health), eklavya doctor (health rows) and the dashboard’s Health page. When a check that points at a fault fails, and only then, session start adds one amber line, even with quiet set. The last two checks below describe how Claude used memory, not a fault you can repair, so they appear in the other four places but never in that line. A healthy memory adds no line. There is no setting for it.
| Check | warn | stalled |
|---|---|---|
| Work captured since the newest generated entry of the same project (imported entries do not count) and still not summarised. Needs at least 5 such events and activity in the last 24 hours, so a short session’s leftovers and an idle project raise nothing; batches you quarantined are not counted | after 6 hours | after 24 hours |
| Jobs waiting in the queue | oldest job older than 6 hours | oldest job older than 24 hours |
| Paused queue | any paused job, with the cause: claude not logged in, usage limit reached or claude not found on PATH | paused for 24 hours |
| Jobs that failed permanently | any in the last 7 days that no later job has finished after, with the cause: claude -p timed out or crashed, batch too large for the model, summary failed validation or, for anything else, provider failing | never |
| Spool | a file waiting in the spool for over an hour, or an event dropped in the last 7 days | never |
| Recall without reads | at least 3 recalls delivered across your last 10 sessions and memory_search never called | never |
| File context without firing | at least 10 reads, in those sessions, of files an earlier entry already named (once per file per session), and no file context delivered | never |
Zero reads is a warning, not an error: Claude may be answering from the recalled index, and nothing proves it ignored memory. Quarantined jobs are listed in eklavya memory status but never raise the verdict by themselves, because you quarantined them on purpose. Evidence whose batch was quarantined is not counted as waiting either, so old quarantined work never shows as nothing new remembered. The cause is a fixed label: the provider’s own error message is matched, never shown. Session start, eklavya memory status and memory_status read the current project’s evidence, entries, receipts and reads; doctor and the dashboard read every project. The job queue is machine-wide in all of them. Memory evidence still cannot change mastery.
| Need | Command or setting |
|---|---|
| See queue, worker and provider health | eklavya memory status |
Resume now after fixing login, quota or a missing claude command, instead of waiting for the next check | eklavya memory process |
| Stop the current worker and return its unfinished job to the queue | eklavya memory stop |
| Inspect, quarantine, restore or discard selected jobs | eklavya memory backlog |
| Return to local summaries | Set providers.observer to null. |
Clearing the observer or disabling memory cancels the active provider call without discarding queued jobs. See the CLI reference for selectors and options.
Session summaries and checkpoints
Each session that did durable work has one summary entry, rewritten as the session grows.
- With a model observer, the summary is a checkpoint. When a batch ends a turn (it contains Claude’s final message), the same summarising call also writes where the session stands: Request, Investigated, Learned, Completed and Next steps. The model is shown the session’s previous checkpoint and the observations already recorded, so the checkpoint covers the whole session, not only its last few minutes. No extra model call is made. The call’s output schema requires the checkpoint for such a batch, so the model cannot leave it out; when the session did no durable work, the checkpoint comes back empty and is discarded.
- Without one, the summary rolls up the session’s observations locally and is titled with the first thing you asked.
If checkpoints stop partway through a session (the observer is removed or paused, or its end-of-turn batches fail) while work is still recorded, the local roll-up replaces the older checkpoint so the summary never shows next steps the session has already moved past.
A session that recorded no observations, such as a quick question, gets no checkpoint, so it never replaces the next steps of the session before it. Summaries imported from Claude Mem use the same sections and are read the same way.
How recall works
At session start, Claude receives recent project history in an <eklavya-memory> block, in three parts that read top to bottom as the story of the last few days:
- A timeline. Up to
retrieval.timeline_itemsrecent entries (50 by default; 0 leaves the timeline out), oldest first and grouped by day, one line each:[#id] time type · title. Asessionline stands for a whole session: what was asked in it, or, when that is no longer on record, its first observation. This part has its own allowance of about 1,100 estimated tokens. - The newest work in full, under
Latest, in full:. Withretrieval.seam_queryon, this part is the work closest to what you are doing now, underClosest to the current work, in full:(see below). - Where the last session left off: the newest summary of an earlier session in this checkout, usually a checkpoint ending in its next steps. It is left out when a later session did newer work without a summary yet, and it never comes from another checkout, even with
retrieval.cross_projecton. A resumed or compacted session does not see its own summary here. Each checkpoint section is cut at 350 characters (a local roll-up at 1,750 in all);memory_getreturns the full text.
The timeline ends with one line saying what the full entries behind its titles would cost together (the same estimate as every receipt) and the exact ToolSearch query that loads memory_get and memory_search, because Claude Code defers MCP tools until they are loaded. Parts 2 and 3 share retrieval.max_tokens (1,200 estimated tokens by default) and retrieval.max_items (6 by default). The checkpoint is counted first. An entry too long for the remaining budget is skipped and shorter ones fill the space; nothing is sent both in full and as a timeline line. The block names its receipt in its header (receipt="123") and says when to look further: when the task needs an earlier decision, fix or unfinished work, open a matching entry with memory_get({ids: [<id>], receipt_id: 123}) before answering. In a recall for a prompt, whose candidates are ranked, the line also names the best one or two (Best matches: #12, #9) and says to open them if the task touches them; a session start’s entries are newest-first and name none. The timeline adds that older work can be found with memory_search. Every recall note, here, on a prompt and before a file read, also says what to do with an entry the current code contradicts: replace it with memory_correct({id, body}), or mark it with memory_flag_stale({id, reason}) when what is true now is unclear. Neither deletes anything. A session-start block then gives a standing rule: use memory throughout the session, and search it for the key terms before starting a task and whenever the work turns to another area, file, bug, ticket, PR or earlier decision, before reading code or querying other systems. The rule names moments rather than leaving relevance to Claude, because the conditional wording alone was followed in about 4% of working sessions. Its cost is an occasional search that finds nothing. The block is marked as evidence to verify, never instructions to obey. Entries a correction replaced are left out of recall; memory_timeline still lists them as the audit trail. Claude Code replaces any hook output over 10,000 characters with a stub, so a block that long would reach Claude as nothing. Eklavya measures the text it sends, counting the standing instruction that rides in the same output, and sheds whole items until it fits: first the checkpoint (its session stays in the timeline as a title), then the entries under Latest, in full: from the oldest end, then the timeline by halves, newest lines kept. A default recall stays under the limit; the cap matters when retrieval.max_tokens or retrieval.max_items is raised. Session-start recall is independent of questions: it is sent with questions off and in a session whose questions were silenced.
### 2026-09-25[#11] 17:40 session · Add row-limit checkbox to CSV export[#12] 17:52 bugfix · CSV export ignored the unchecked row limit### 2026-09-26[#14] 14:10 discovery · QA auth configmap has REFRESH_ENABLED=falseLatest, in full:1. [#15] ACCESS_TTL of 600s causes logout when refresh is disabled — discovery, 2026-09-26 …Where the last session left off ([#19], 2026-09-26 16:05):Request: Find why QA users get logged out after 10 minutes…Next steps: set REFRESH_ENABLED=true in the QA configmap and verify with a 15-minute idle testThe session banner says what was delivered, for example Memory · 3 past entries + 45 titles recalled (~2.1k tokens) · ~88% smaller than its sources, counting the full entries and the timeline lines. The percentage is an estimate of how much smaller the recall is than the evidence behind its full entries (four characters per token); it is left off when that is not a saving. A project with only a few entries shows no titles, for example Memory · 3 past entries recalled (~1.1k tokens). It prints no memory line when nothing was recalled.
Ranking session start by your current work
Session start has no prompt to search with, so by default it sends the newest entries. A decision from last month behind sixty newer entries is then only reachable through a search. With eklavya config set retrieval.seam_query true, Eklavya builds a query from what you are probably about to work on and ranks the full entries by it, newer entries first among equal matches:
- the branch name, without a prefix such as
feat/(main,master,trunk,developand a detachedHEADadd nothing), - up to 20 changed or untracked files from
git status, - the subjects of the last three commits,
- the next steps of the last session’s checkpoint.
The three git commands share a one-second budget and are skipped if git is missing, slow or the folder is not a checkout. When nothing matches, the recall is the same as with the setting off. The timeline still lists the newest work either way. It is off by default while it is measured (eval/recall-replay.mjs replays your own sessions from a copy of the database and reports how often session start offered an entry whose files the session then opened).
A resumed session gets back its whole transcript, so on resume the block leaves out every entry the session itself wrote, in the timeline and in full. After a compaction those entries can be the detail the summary dropped, so they are still recalled.
When you send a prompt
A prompt with at least 25 characters of your own words (pasted blocks and background-agent reports are ignored) is searched against the project’s memory. A prompt with fewer than three meaningful words (filler such as “use” or “please” does not count) is matched on its words alone, so a bare tool name recalls entries that mention it, never entries that are merely close in meaning; a prompt of only filler recalls nothing. An entry is recalled only if it passes the relevance gate or is close in meaning, within a third of retrieval.max_items and retrieval.max_tokens. The gate is retrieval.prompt_gate:
strict: the entry contains every word of the prompt, so a long sentence rarely matches.terms(default): common words and request filler (“can you”, “look at”, “please”) are dropped, file names keep their stem and identifiers are split (fetchUserByIdalso searchesfetch,user,id), and an entry matching any of them is considered. It is recalled when two of the prompt’s informative words appear in it, or when the words that do appear carry at least 60% of the prompt’s rarity weight, so one identifier only a few entries use can pass alone while one common word cannot. Matches in the title and files rank above matches in the narrative.
“Close in meaning” is a cosine of at least 0.25 on local-hash-v2, which prompt recall uses with the default retrieval.prompt_gate: terms, and 0.35 on local-hash-v1, which it uses with strict. The two scales were measured separately (see below), and each hit is held to its own embedder’s cut-off. Prompt recall never repeats an entry this session was already handed, and never recalls an entry this session wrote: that work is already in Claude’s context. When nothing qualifies, nothing is added.
When Claude opens a file
Before Claude reads a file this project has history about, Eklavya adds that file’s past work: up to 8 observations, one dated line each, with their IDs. Entries about that file specifically come before ones that only listed it among many. It happens once per file per session, only for files of at least 1,500 bytes, never for a subagent’s reads, and never for session summaries. Files are matched by their path inside the checkout you are working in, so a worktree finds the same history as the main checkout. History captured in a worktree by earlier versions was filed under a longer path and is not matched. The block names a receipt like other recall, so a memory_get it leads to is linked to it. It adds context only, with one exception: a whole-file Read of a code file of at least 32 KB that has history is held, every time in that session. The first hold hands Claude the same titles, the exact memory_get call for their IDs, and the way to read less: code_outline for the file’s declarations with line numbers, code_find_symbol to find one, then a Read with offset and limit for only that part, with the ToolSearch query that loads those tools (Claude Code defers MCP tools until they are loaded). Later whole-file reads of that file get a shorter refusal with the same way out. A read counts as whole when it has no offset (or offset 1) and either no limit or one that reaches the file’s last line, so limit: 99999 does not get round it. A Read that stops short, or starts later, is never held, so the hold cannot strand a session. Only files code_outline can outline are held (TypeScript, JavaScript, Python, Go, Rust, Java, Ruby and SQL); Markdown, YAML, TOML, JSON, lockfiles and other types are never held. The hold exists because titles alone did not lead Claude to open an entry, and because a retry that always went through saved nothing. Turn it off with eklavya config set memory.file_hold false. Otherwise whether the read is allowed is still up to Claude Code and your permission settings.
Recall needs a git checkout. In a folder outside git there is no project to recall from, so neither session-start nor prompt recall runs, and nothing is captured there unless retrieval.cross_project is on. Evidence that earlier versions captured outside git stays under No repository and is not summarised.
Relevant memory can also be supplied on a substantive prompt later in the session. It gets a third of the session-start budget (at most retrieval.max_items / 3 entries and retrieval.max_tokens / 3 estimated tokens, so two entries and 400 tokens by default), excludes entries already delivered and requires a relevance match. The cap is strict. When a matching entry is larger than the room left, it is sent as an excerpt instead of being skipped, provided it has a narrative and at least about 60 estimated tokens remain. The excerpt keeps the title and the start of the narrative, leaves out facts and files, and ends … [excerpt: memory_get #<id> for the rest]. Otherwise the entry is skipped. Unrelated prompts receive no memory block. Only what you typed is searched: pasted content, subagent hand-backs and task notifications are ignored, so a prompt that contains nothing else gets no memory block.
A prompt that is mostly a link, a ticket key or a screenshot gives recall almost nothing to match, because the words that matter are behind the link or inside the image. When a prompt has a link or a key such as OPP-498 and fewer than six words of its own besides it (a slash command’s name and the [Image #1] placeholder do not count), Eklavya adds one line telling Claude to search memory for the task’s key terms before reading code or querying other systems, with the ToolSearch query that loads memory_search (or the eklavya memory search command when memory.lookup_hint is bash). It names up to four identifiers to start with, taken from issue, pull request and ticket links and from keys in the text, for example Start with 57988. Names such as SHA-256 or ISO-8601 are not taken for ticket keys. The line is left out where a search could find nothing: in a project with no memory yet, and outside a git checkout unless retrieval.cross_project is on. Any other prompt of at least 25 characters of your own words (not one of Eklavya’s own slash commands) that recall found nothing for gets a shorter reminder: if it starts a task or changes the subject, search memory for its key terms first. A prompt that did get a recall block gets neither line, since the block already says what to open.
| Mode | Best use | Limit |
|---|---|---|
keyword | Exact names, identifiers and error strings. | SQLite full-text search needs word boundaries. |
semantic | Similar spellings, word forms and character sequences. | Local vectors do not understand synonyms or conceptual meaning. |
hybrid (default) | Combine keyword and local-vector results. | Its vector component has the same limits as semantic. |
Search uses the local embedder local-hash-v1 by default: 256-dimensional hashed vectors of words and character four-grams. Every entry also gets a local-hash-v2 vector (1,024 dimensions, common words dropped, identifiers split on case and underscores, and each query word weighed by how rare it is among your entries), which prompt recall uses when retrieval.prompt_gate is terms, the default. The background memory worker adds v2 vectors to older entries a few hundred at a time and keeps their v1 vectors, so switching the setting back changes nothing permanently; an entry without a v2 vector yet is compared on v1. Neither embedder understands meaning: they can relate “migration” to “migrations”, but cannot infer that “cookie” and “session token” refer to related ideas. When an observer model is configured, each observation also gets up to 12 keywords: other words you might use to ask about it later. They are searched like the rest of the entry and never shown in recall. The configured providers.embeddings field currently does not enable an external model: indexing and search remain local.
The vector search scans at most the newest 5,000 eligible entries; keyword search can reach older entries too. Hybrid keeps that keyword path. For Japanese, Chinese and other unspaced scripts, keep hybrid or use semantic, because character matching can find text the keyword tokenizer misses.
Search defaults to the current project. retrieval.cross_project widens search and session-start recall; an individual search can request all_projects.
Pinned facts
Some facts hold for every session in a project: bare pytest is not installed here and python -m pytest works; the code needs DATABASE_URL set; nothing can be fetched from one host. Agents rediscover them by failing, session after session. With economy.envfacts on (free, the default), the background fold learns them from your sessions’ shell and fetch calls, with no model call, in five shapes: a command form that fails with a missing-command or missing-module error followed by another form of the same task that works; a run that fails asking for an environment variable followed by one that sets it; every fetch to a host failing with a network error; a test label written a::b that does not load where a.b does; and a git remote or branch probe that finds nothing. Each fact is a fixed sentence filled with the form, variable or host it saw. With economy.envfacts: observer, the observer may also propose environment facts, decisions (“CSV exports use ;”) and conventions.
A fact is forming until three sessions confirm it, then active. Each session its score decays by 0.8 and a contradiction counts five times a confirmation; below zero it retires. A command that was not found and then runs retires its fact at once; a missing-module fact retires only when the failing form works in two sessions in a row, because a run can pass without the missing module. A fact about git refs retires at the first contradiction. An active fact is shown at the top of the session-start block, under Pinned facts, within memory.pinned_facts (8, environment facts at most 4) and about 300 estimated tokens of its own. Once four sessions have exercised a fact, it is shown only while it applied in at least 40% of them. Facts are evidence like the rest of the block and never change mastery. eklavya memory facts lists them with their evidence; eklavya memory facts retire <id> stops one.
Entries that may be outdated
With memory.stale_check on (the default), the background fold flags an entry when one of its files was deleted or renamed, its files have had three or more commits since it was written, a newer decision or bugfix covers the same files, or it was sent five times and never used. A flagged entry is sent after the others and labelled may be outdated (<reason>). Up to memory.stale_refresh_per_day flagged entries a day (5) are rewritten by the observer from the old entry and the commits since, as a new entry that supersedes the old one, which stays as history. The fold also records, per entry, how often it was sent, opened with memory_get and applied (the session later read or edited one of its files), and keeps a utility score that decays by 0.8 a session; among equally good matches, retrieval.seam_query puts the more useful entry first. Which session applied which entry is kept too, and shown on the session’s page in the dashboard. A session is counted once it has been quiet for ten minutes and another session starts, or when it ends. A session you come back to later, such as a Claude desktop session left open for days, is counted again the same way, adding only what is new: each entry counts as sent, opened and applied at most once per session.
Subagents
Recalled blocks reach the main conversation only. A subagent Claude delegates to starts without them, so when memory is on and the project has entries, it is told in one line to search memory with memory_search and read matches with memory_get if its task depends on earlier decisions, fixes or unfinished work. That line does not depend on whether questions are on or silenced for the session, and the tutor subagent receives it too.
What the savings percentage measures
Each recall records a receipt with two estimates, both using four characters per token (chars4-v1):
| Count | Meaning |
|---|---|
Base (B) | The raw evidence behind the recalled entries, deduplicated by event. This is an estimate of what reading that evidence would cost. |
Delivered (D) | The actual recalled block, its wrapper and any later detail fetch charged to it. |
Estimated context reduction is (B − D) / B, shown by the dashboard and eklavya memory status. The session banner shows the same figure for that start’s recall alone, before any later detail fetch is charged to it. Receipts from the observer’s own claude -p helper sessions are excluded. A negative saving is reported as overhead; unavailable delivery is not counted as a saving.
A receipt records how far its context got:
| Delivery | Meaning |
|---|---|
prepared | The block was built but the hook has not written it, or never did. Never counted as a saving. |
emitted | The hook wrote the block to Claude Code. Only emitted receipts contribute to the headline. |
confirmed | Written by earlier releases for every recall when it was prepared. Counted like emitted. |
Claude Code does not acknowledge hook context, so no receipt claims the model received or used it. A recall marks its entries as already handed to the session only once emitted, so a prepared block that was never written does not stop the next recall from offering them. Session-start, prompt and file recall each write a receipt; file recall shows titles only, so its receipt claims no saving of its own, but its size counts toward delivered (D) and lowers the headline percentage.
Each recall block names its receipt (receipt="123") and shows the call that uses it, for example memory_get({ids: [42], receipt_id: 123}). With memory.lookup_hint set to bash (an evaluation setting, mcp by default) the block says to run eklavya memory show <id> and eklavya memory search "<words>" in Bash instead; those reads are not linked to the receipt. That links the detail fetch to the recall. Every memory_search, memory_get, memory_timeline and memory_file_history call is also logged locally, with or without a receipt: the tool, project, session, returned entry IDs, outcome (ok, empty or error), latency and estimated result size. The log never stores the query or the content returned. memory_status, eklavya memory status and the dashboard’s Reuse page report these reads, including how many are not linked to a receipt. Only memory_get can be linked, so every search, timeline and file history call counts as unlinked, as does a memory_get whose receipt no longer exists. A read shows that memory was fetched, not that Claude applied it correctly.
This estimates context volume compared with raw evidence. It is not API billing, money saved or prompt-cache usage, and does not claim Claude would otherwise have read every event. Base includes whole-file snapshots stored with edits, so it overstates what reading the history would really cost; treat the percentage as an upper bound.
What the percentage is compared with. It compares the recall block with re-sending the raw evidence behind it. It does not compare memory with having no memory: without memory none of the recall block would be sent, so every recalled token is added to the session, and memory pays back only when the session needs an earlier decision, fix or unfinished work. The percentage also does not say the model read anything. Contributors can count injected tokens per scope, read results and recall blocks that were never followed by a read, and the share of sessions with a recall that opened a recalled entry with memory_get, from a copy of the database with node eval/memory-tokens.mjs --db <copy>; the repository’s eval/README.md describes it.
The memory tools
Claude uses these tools on your behalf. Search returns compact IDs and titles; memory_get then reads selected entries. All accept optional cwd to identify the project.
eklavya install, and every automatic update, keeps a short Eklavya project memory section at the end of your own ~/.claude/CLAUDE.md (or $CLAUDE_CONFIG_DIR/CLAUDE.md). It tells Claude, in every project, to open a recalled entry with memory_get before acting when its title is about the task (in any recall block, including those added to later prompts and before a file read), not to search when no title is about the task it started on, and, in a session with a recall block, to search memory once with memory_search when the work later turns to a different area, file, bug, ticket or PR. It gives the exact ToolSearch query that loads both tools, since Claude Code defers them. A session with no recall block, because memory is off for that project or Eklavya is not loaded, is told to make no memory calls; one whose recall is not about its first task, none until the work moves on. The section sits between <!-- eklavya:memory:start --> and <!-- eklavya:memory:end --> comments: updates replace only that part, eklavya uninstall removes it, and your own text around it is never changed. Each update check, automatic or eklavya update, also verifies the section and puts it back if it is missing or was edited, even when no new version is out; --skip-claude-md skips it for that one install. A file saved with Windows (CRLF) line endings keeps them.
| Tool | Arguments and result |
|---|---|
memory_search | query; optional mode, type, tag, since, until, limit, all_projects. Returns IDs, titles, dates and files. Defaults to retrieval.max_items, maximum 50. |
memory_get | ids (1–20), optional include_evidence, receipt_id, all_projects. Reads narratives, facts and evidence links. An ID that belongs to another project is listed under other_project instead of read, unless all_projects is true; each entry names its project. Raw evidence bodies are capped at 1,500 characters; the receipt charges this extra reading to the original recall. An unknown or expired receipt_id is ignored: the entries are still returned, with charged_to: null. |
memory_timeline | limit, offset, type, since, until, session_id. Returns the newest entries, including superseded ones. Default 20, maximum 100. |
memory_file_history | file, optional limit. Matches path fragments; default 20, maximum 100. |
memory_status | Capture, queue, provider and reuse health, plus explicit read counts (reads) and host_acknowledgement: "unavailable". |
memory_write | title, body, optional tags, files. Saves a redacted note. |
memory_correct | id and a corrected title, body, or both. Creates a replacement while preserving the original audit trail. The replacement and the supersession are one write: if either fails, the original stays the only live entry. A second correction of the same entry returns already_superseded. |
memory_flag_stale | id, reason (3–300 characters). Marks an entry as possibly outdated: it stays searchable, ranks below current entries and is labelled may be outdated (<reason>) when recalled, and memory_get returns the reason under stale. Nothing is deleted. |
memory_delete | id, optional hard. Soft deletion removes an entry from retrieval and from the keyword index, and repeating it keeps the first deletion time; hard: true erases it permanently, including an entry already soft-deleted. |
memory_correct, memory_flag_stale and memory_delete change only the current project’s entries. An ID from another project returns error: "other_project" with that project’s key and changes nothing; to change it, pass a cwd inside that project. A worktree counts as its main checkout’s project.
| memory_collections | Saves and rebuilds named views; details below. |
| code_outline | file, optional line. Lists declarations or expands around a line. |
| code_find_symbol | name, optional limit (default 20, maximum 50). Finds declarations by case-insensitive partial name. |
Collections
memory_collections supports list, create, show, rebuild and delete. Every action except list requires name.
A collection saves a filter: optional description, query, type, tag, since and all_projects. show returns titles and IDs, with limit defaulting to 50 and capped at 200. Fetch the entries you need with memory_get.
Every filter field applies the same way with or without a query. A collection with only tag: "auth" holds entries tagged auth and nothing else, newest first. Deleted and corrected entries are never members.
Membership is fixed at the last rebuild, and show hides any member deleted or corrected since. A correction’s replacement does not join automatically, because it may no longer match the filter; it joins at the next rebuild if the filter admits it.
rebuild reruns the saved filter. If it would empty a previously populated collection, the previous membership is preserved and marked failed; use force only when the empty result is intended. Deleting a collection leaves its entries untouched.
Code exploration
The code tools help Claude choose which source to read. They scan declarations line by line rather than parsing or resolving the program. They cannot follow re-exports, and declaration-like text in a string can match. An empty result does not prove a symbol is absent.
Supported languages are JavaScript/TypeScript, Python, Go, Rust, Java, Ruby and SQL. Outlines read up to 2 MB and return up to 400 symbols, marking truncation. Repository searches skip generated/dependency folders and dotted directories.
What memory does to the learning half
Memory can propose concept candidates when a session failed to log its work. At the end of each turn, if the session has logged no concepts, Eklavya logs up to five candidates taken from that session’s own observations. It never touches a session that logged concepts itself.
A candidate is resolved against the graph: an existing concept with the same or a close name is reused (for example, CSRF becomes csrf), and so is one whose name and description all but match the candidate’s. Unlike a concept Claude logs, nothing asks about a near match, so only a close one is reused and anything else is created, such as text_truncation → text-truncation. New concepts count against max_new_concepts_per_session; candidates over that budget stay pending. domains_enabled applies. The built-in summariser only proposes concepts the graph already has; new names come from an observer model.
With an observer model, observations are written in the background, so they can arrive after the first turn ends. The next turn’s end picks them up. Until then, a session that changed code and has still logged nothing is asked at the end of the turn to log its concepts and then answer one question, so a one-turn task is not left without one.
Memory does not record quiz attempts, grant mastery, clear review debt, promote a level or open a gate. Remembered work is not assessed knowledge.
Prompt feedback reads memory
Prompt feedback, when you turn it on with feedback.enabled, works from the prompts memory already recorded: it needs memory.enabled, and it sends nothing anywhere unless a model is set: providers.feedback, or providers.observer when that is null. Each review is stored in its own table, with the text of one prompt, and deleting memory entries or pruning evidence does not remove it; delete an item from the dashboard’s Feedback page. Like memory, it never changes mastery. See how it works.
When you move or rename a checkout
History is filed under the checkout’s folder path, so a moved folder would otherwise start empty. To prevent that, the first session start in a folder records the repository’s root commits, which stay the same when the folder moves. If exactly one other project has the same root commits and its folder no longer exists, that project is the same repository before the move. Its memory, answers, level, prompt feedback, project settings and pages are re-filed under the new folder, and the banner says so:
Memory · moved from ~/Workspace/QF · 64 entries re-filedNothing moves when the old folder still exists, because that is a second clone or a fork, a separate checkout. Nothing moves when more than one missing folder matches either; the banner says the history is under that many moved folders instead. A repository with no commits yet is checked again at each session start until it has one.
Root commits are recorded from this release on. For a folder moved earlier, or to choose between several matches, run eklavya memory move from the new checkout to list folders that have history but no longer exist, then eklavya memory move <old path>. Synced entries carry the new path to your other devices.
Where it lives, and turning it off
Memory and learning share ~/.eklavya/knowledge.db. Set memory.enabled: false to stop capture and recall, or memory.capture: off to stop only new capture. Set memory.retention_days to prune summarised evidence, finished jobs, receipts and the memory read log while keeping observations; the default keeps everything.
Local summarisation and retrieval make no network request about your code. Choosing an observer can send captured work to a model; optional notifications and sync can send selected data elsewhere. See Configuration and Your data for controls and backups.