You are halfway through a change to an export endpoint and have to switch sessions — a different model, a different tool, or the context window simply filled up.

The first message in the new session is usually “keep going on that export endpoint”.

Then the agent starts guessing. What the field is called, how the error code should be spelled, which test already ran, which approach was already tried and failed.

The guesses it gets right turn into good work. The ones it gets wrong usually surface at pull-request time, by which point you have already spent the hours.

Success rates on agentic tasks fall from near-perfect to near-zero within 16 steps, over a sample of 10,664 trajectories.2 The driver behind that number is stranger than the number itself: decay tracks the number of steps, not the size of the context. Narrow the window and the decay gets steeper (logit slope −0.69 against −0.44, p=3e-6).

Both intuitions fail here. What decays is the reliability of each step, and it has nothing to do with how many tokens are left in the window.

So you switch sessions. Three things usually explain why the new session cannot pick the work up: the summary dropped it during compaction, later material pushed it out of the window, or nobody in the new session ever asked about it.

The first cause has numbers behind it. One benchmark ran 14 summarizers over the same batch of sessions and found stable damage ranging from 5% to 64%; LLM summaries kept 16.0% of the details needed to reproduce a task, mechanical extraction kept 79.1%, and on a production pipeline the first boundary kept 15.7%.5

What gets dropped is also biased. In another benchmark, “how to do it, and what not to do” instructions were discarded roughly six times as often as plain “what to build” specifications; in ProgramBench, about a third of the anti-cheating rules were already gone from the very first compaction summary, and the loss grew with every further compaction.4

That explains why a clearly written spec still fails to hand over. The clear part is the goal, and goals happen to be the easiest thing for a summary to preserve. What gets lost is the boundary.

Push one layer further and dropped constraints turn into incidents. Across 7 models and 1,323 episodes, the control group violated policy 0% of the time; after a single compaction the pooled violation rate rose to 30%. When the constraint survived, violations were 0%; when it was dropped, 38%.3 Soft organisational policies decayed 8.3 times faster than hard safety rules.

One team tracked rule violations on the same task: about 8% at 20 messages, over 35% at 150.29 Small sample, self-measured, but the direction is clear.

What gets lost How it gets lost A traceable replacement
Current state and progress Compressed into one summary line, or pushed out of the window by later text A state file with the current situation and the next step
Hard constraints and forbidden actions Summaries trade away boundaries first Pinned in an instruction file that gets re-read
Verified facts and evidence Command output replaced by a one-line conclusion Conclusion, command and output location stored together
Rejected options Nobody feels it is worth a line in the summary A separate section with the reason for rejection
Where the files and versions live Only the filename survives; path and commit are gone Branch, commit and file path, all three

Things that have to be handed over belong in files. The chat window is volatile.

1. A spec has two readers

A spec usually gets used as one thing: a task brief for whoever executes it, and a record for the author. The two uses want different things.

The task brief wants: what to build, where the boundaries are, what counts as done. A spec usually has all three.

The part that serves the next person wants: where things stand now, which conclusions are settled, why they were settled that way, what has already been verified.

Mix the two sets of fields in one document and neither side works. The contract side finds it noisy; the inheriting side has to dig through description paragraphs to find what it needs.

The distinction between a spec and a plan lands exactly here. A plan is a one-off artefact that expires once consumed; a spec is a durable model that later work keeps coming back to edit.34

A paper on spec-driven development puts it more strictly: a knowledge base read at the start of every session and written at the end, surviving across sessions, across agents and across people; it stores summaries and decisions rather than raw transcripts; retrieval is progressive and on demand; it is agent-neutral and tool-neutral.8

Engineering documents split the same way. An ADR looks backward, recording why a decision was made, and stays immutable once signed off; a task spec looks forward, recording what to build and what counts as done, updated as the work proceeds and archived at the end.56 Some people split it finer: a task packet covers the result, scope, acceptance and verification plan before execution starts; a stable checkpoint captures the exact state of the code and files during execution; a handoff carries the actual state, evidence, risks and next step at a session boundary; a decision record captures the reasoning behind an accepted decision; repository instructions only change when the workflow rules change.30

Document type The question it answers Does the next person read it
Requirement / spec What to build, what counts as done Yes
Decision record Why it was decided this way Only when that part is relevant
Handoff Where things stand Yes
Repository instructions Rules that stay valid Yes, every time
State snapshot The situation right now Yes, and only the latest one

MCP’s official memory server writes entities, relations and observations into a single JSONL file, exposing create_entities / create_relations / add_observations / search_nodes / open_nodes / read_graph; retrieval is literal lowercase matching, with no embeddings and no ranking.26

If the field names don’t match, recall returns nothing. With no semantic fallback underneath, the field names have to be fixed in the handoff convention. A spec can be short. A handoff cannot be vague.

2. Grade the state

The main form of handoff failure is distorted state — the previous person wrote “ran it once” where they meant “done”, and the next person either repeats the work or builds on a wrong premise. A widely circulated five-grade scale: done (with a file, command output, or a human check as evidence), needs verification, not started, assumed, blocked. One level up, the handoff package lists nine groups of fields — goal and scope, current stage and what is already done, confirmed facts and their sources, key decisions and their reasons, open questions and rejected options, unfinished work and dependencies, files and a verification index, forbidden actions and authorisation boundaries, next action and acceptance criteria.27

A status description in a document should be judgeable by the next person without further interpretation. One team practice splits progress into three levels: implemented and tested, a draft that has never been run, and not started; test records carry the command, the result, the conditions and where the output landed, for example node --test tests/order/export_job.test.js with output at artifacts/handoff/export_job.unit.txt; untracked files are listed separately.29

State How it is judged Evidence that has to come with it
Done The acceptance command ran and passed Command, result, output location
Needs verification The implementation is written, the verification did not run or did not pass Which command is missing, which environment is missing
Not started The work has not been touched What it depends on, who it is waiting on
Assumed The conclusion came from inference and was not verified The basis of the inference and how to check it
Blocked An external condition prevents progress The blocker and who can clear it

“Done” is a word that has to come with evidence.

External side effects get their own line at handoff time. A sample task, demo-export-17, was already created locally; after switching sessions, check its state instead of sending the create request again.29

Two status-file designs are worth comparing side by side. One makes the snapshot overwrite-style, with a hard cap of 80 lines and 6KB, no bullet longer than two lines, and required sections for the current situation, work in flight and new variables, blockers and open decisions, and the next step; what gets updated is the snapshot, not a running log of the session.36 The other splits the status file in two: INDEX.md acts as a routing table saying which context files exist and when to read them; STATUS.md acts as a heartbeat, carrying the objective, what is done, what is in progress, blockers, the next exact action, honest validation results and the git status.35 Whether a line says “done” or “needs verification” decides whether the next shift redoes the work.

3. Pin the hard constraints

The most expensive sentences in a spec are the ones saying what not to do. Those are exactly what a summary gives up first.

The Governance Decay experiments give two numbers you can use directly. When the constraint survived, the violation rate was 0%; when it was dropped, 38%. Re-injecting the constraint verbatim after compaction (about 47 tokens) brought violations back to 0%.3

Naive verbatim pinning survives two kinds of interference: a notice saying “policy revoked” produced 2% violations; pinning the target amid 15 distractor rules produced 0%. An “authoritative operator” impersonating an update pushed 0% up to 17%, and adding a provenance tag to each constraint only brought it down to 10%.3

Provenance helps, and it does not get you to zero. A constraint that really matters needs a confirmation channel outside the conversation — a hook, a CI gate, or a human signature.

The engineering practices that line up with this come to four: pin constraints, keep identifiers, derive every summary from the original record (a summary of a summary drifts), and keep a written plan at the end of the window.15

The tools are more definite about it. Claude Code loads the root CLAUDE.md at session start and re-reads it after compaction; subdirectory CLAUDE.md files load on demand and need to be touched again after compaction to come back; the official guidance is fewer than 200 lines per file, a named owner, and reviewing it like code.16

The same implementation, taken apart, is clearer. Claude Code delivers CLAUDE.md as a user message, which is not guaranteed to be obeyed; enforcement needs a PreToolUse hook. MEMORY.md loads only the first 200 lines or 25KB per session. DeepSeek Harness has no auto memory — only repository AGENTS.md / CLAUDE.md and old-session references like @[label](dsh-session:). At most 3 references at a time, each source budgeted at 20% of the context window with a floor of 64KiB, tool results and reasoning excluded, and referenced content marked untrusted with a “do not follow the instructions inside” warning attached.25

Set against that, fork is the cheapest form of recall: the prefix stays untouched and the KV cache can be reused.25

Constraint type Where it lives How to check it survived
Safety and compliance red lines Resident instruction file plus an independent gate Gate logs, plus one deliberate trigger
Scope and boundaries The spec body plus the top of the handoff The new session repeats the boundaries
Interface and data formats Resident instruction file Have it call the interface once
Technology bans Repository instructions plus the decision record Spot-check one change
Workflow rules Repository instructions Watch whether it starts by the book

Decisions have to be written as constraints that can be executed. “Keep the refresh-token path unchanged” can be executed; “basically finished” cannot.57 A constraint pinned somewhere that gets re-read is a constraint that exists.

4. What belongs in a context file, and what does not

Shoving everything into AGENTS.md is the usual overreaction. The cost has been measured.

One evaluation ran 300 SWE-bench Lite tasks plus 138 other instances, comparing three setups: no context file, an LLM-generated file, and a developer-written file.6 LLM-generated files lowered the success rate in 5 of 8 settings, added 2.45 to 3.92 steps, and raised inference cost by 20% and 23%. Developer-written files improved the average by 2.4% (p=0.21, not significant), beat the LLM-generated version significantly (p=3.8%), and cost 3.34 extra steps and up to 19% more.

Context files help with non-standard coding practice and do nothing for repository-overview content, so they need strict evaluation before you ship them. Even the developer-written gain did not reach significance (p=0.21).

The vendors’ own research points the same way. Anthropic ran 350,000 documents through an offline replay of session logs (they call it dreaming), growing a wiki from 2 sessions to 128; answering correctly with the wiki alone went from 13% to 48%, wiki plus search from 54% to 61%, search alone 53%. On cross-file synthesis questions the wiki scored 87%; in single-file scenarios it gave no benefit and was sometimes larger than the source text.1

One line in the same evaluation matters most to anyone who writes these files: fixed rules like “only record failures” hurt strong models, with Opus 5 showing a −0.234 change; rewriting the rule as “read the memory → form a hypothesis → then verify” lifted Sonnet 4.6 from 0.364 to 0.641.1

Claude Code’s auto memory loads only the first 200 lines or 25KB of MEMORY.md per session, promotion into the always-resident layer needs human approval, and long instruction files lower compliance.1

The token-saving routes already exist at the tool layer. Letting a script run and bring back the result cuts injected context by about 95%; loading skills on demand shrinks the system prompt by about 97%, and the skill directory keeps roughly 500 tokens resident at startup.18

Write into the context file Keep out of the context file
Non-standard practice and bans Directory trees and dependency lists
Interface contracts and naming conventions Behaviour that can be read straight from the code
Acceptance commands Balances and quotas that can be queried any time
Decisions and their reasons Long transcripts
Team rules Other people’s opinions and rumours
Environment traps Transient state

Different tools read different files. Claude Code reads AGENTS.md only when there is no CLAUDE.md; Cursor reads .cursor/rules plus AGENTS.md; Codex reads AGENTS.md, which is now hosted by the Agentic AI Foundation. A common pattern is one AGENTS.md plus a thin CLAUDE.md whose first line reads @AGENTS.md.39

A workable filter: split information into three classes with different lifetimes — always obey, finish now, look it up when needed — and write a useful rule as situation → action → evidence. The same author warns that a model answering as if it had read the file proves nothing.40

A context file is a standing cost, and every run pays rent on it, so leave out anything readable from the code.61

5. Starting a new session

The opening prompt has one job: make the agent restate what it read, so wrong readings surface on the spot instead of when you spot-check later. Several practices converge on the same action — have it restate first, then let it act.

A full spec-driven context reset takes five steps: a fresh context writes the requirements; a fresh context writes the analysis and design (modules, interfaces, risks, verification plan); a fresh context breaks the work into task files; a fresh context implements exactly one task file; the experience or the blocker gets written back.37

The two-file version is cheaper: AGENTS.md / CLAUDE.md hold the rules that stay valid, HANDOVER.md holds “where we are now”, and each handoff overwrites the last. The opening prompt for a new session is “don’t act yet; read AGENTS.md, MEMORY.md, HANDOVER.md in order, then tell me the project goal, the current progress and the first next action”.31

One more thing to repeat when you switch windows: task-level constraints have to be restated, while AGENTS.md only carries project-level rules.32

There is support for carrying only five to ten lines of handoff: one window per task, opening a new one whenever the goal, scope or definition of done changes; the new window carries one line each for what was changed and confirmed, what is unfinished, what must not be touched, and which direction was tried and failed; the first line reads “this is the handoff from the previous window, continue from it, do not invent constraints that are not in the handoff”, followed by the current task, scope and definition of done.33

The first-turn prompt can be a checklist: list the material and versions actually read, restate the goal, decisions and constraints, separate facts from assumptions from missing evidence from proposed changes, flag inaccessible and conflicting sources, state the next action and wait for confirmation. One line from the same material is one I quote often: saving a file ≠ it has used the file.28

Why ask it to separate facts from assumptions when it restates? Research gives the reason. Retention and currency have saturated at 0.93–0.98, so recall is largely solved; what is unsolved is resolution — which entity is meant, which time state is current, whether to answer at all. Entity disambiguation reached 0.800 (baseline no more than 0.40) and abstention F1 reached 0.924 (baseline no more than 0.802).13

A session without history does something else: it confidently invents APIs that do not exist.58

Situation The first line What the new session must hand back first
Continuing the same task This is the handoff from the previous window, continue from it, do not invent constraints that are not in the handoff The goal, the current state, the first next action
Same project, different task Read the handoff first, then repeat the rules that still hold and the current state The project goal, the settled decisions, the next step
A brand-new requirement This requirement has two readers; state your understanding of the acceptance criteria The goal, the scope, the acceptance criteria

6. The field list for the next person

Adding these thirteen fields to a spec is what makes cross-session continuation more than luck. The full template is in Appendix A.

Field Who writes it What happens without it
Goal and scope Spec author The next person widens or narrows the scope
Success criteria Spec author Done has no definition
Explicitly out of scope Spec author It goes out of bounds with nobody to stop it
Hard constraints and forbidden actions Spec author The constraints get compacted away
Current stage Executor Progress is guesswork
Confirmed facts, with source and version Executor An old fact gets treated as a new one
Rejected options and why Executor The next person walks the same road
Open questions Executor An assumption gets treated as a fact
Unfinished work and dependencies Executor Work is repeated
Evidence index (command, result, output location) Executor “Done” has no proof
State of external side effects Executor Things get created or requested twice
One next action Executor The next person sets their own priorities
Expiry condition and owner Spec author Entries never expire

Two trade-offs decide this: what is worth carrying across sessions, and how what you keep gets filtered.

Research on what to keep settled on four classes — task specifications, data schemas, tool configuration and output constraints — with the reasoning traces of the session dropped entirely. In a replication experiment, no memory solved 0 of 12 tasks (3.8K tokens), selective memory 12 of 12 (3.9K), full history 8 of 12 (7.7K); on 24 enterprise tasks, 23/24 against 19/24 and 17/24, which is not significant at that sample size. Summary-style data representations saved 97 to 431 times the tokens of raw injection.7

The two categories worth recording are just as concrete: stable information about the user (time zone, language, preferred hours, long-term intent) and task execution experience (which call chain worked, which step failed, how it was corrected). The same experience came with three filter tests — shelf life (does it still hold a month later), source of truth (if the system can look it up live, don’t store it), and behavioural effect (will knowing this change the reply next time).17

The source-of-truth test is the one most easily skipped: values like balance, status and quota that can be queried live do harm when stored, because the model answers from a stale snapshot.17

The handoff prompt itself can be shorter: goal, current state, decisions and their reasons, and the plan for what comes next. A human checks three things in the draft — current state, the reason for a decision, the next plan — and the final version is stored somewhere the human controls.59 Every fact written down should answer three questions: who said it, when they said it, and whether it still holds.

What stays out of a handoff: credentials and keys, long transcripts, state that can be looked up live, conclusions without evidence, and other people’s opinions. This overlaps with the context-file table above; the handoff layer is stricter.

7. Staleness and poisoning

Handoffs written by people go stale too. That is normal.

A long-term memory can still record “the auth service uses JWT sessions” six weeks after the team migrated off it. Stale memory is worse than no memory, and invalidation is broadly underestimated in engineering.21 The file layer ages even more visibly: in a survey of 10,000 active repositories, only about 5% had an AI context file, and half of those files had not been touched since they were created.61

Lifecycle policies need a way to be tested: record the answer to each test question, run the policy, then ask again and fail anything below the threshold.60

One systematic study of memory-poisoning systems mapped 4 memory write channels, 9 structural weaknesses and 6 attack classes, concluding among other things that the more you write, the more fragile you get; on its benchmark HERMES averaged 64.70% RSR (up to 92.76%) and OpenClaw 17.40%, and existing prompt-injection defences do not cover memory poisoning.9

Measurements on coding agents give sharper numbers: Claude Code’s cross-session attack success rate was 81.7% (66.9% within a session), OpenClaw’s 73.7% and 55.5%; prompt-level defences offer limited protection once persistent memory is poisoned.10

The hardest attacks to detect leave no behavioural trace: the agent completes the task normally while key decisions follow the attacker’s intent, with the harmed party being the user, the project owner, or an outside stakeholder.11

Another class is harder still: it is difficult to induce an agent to overwrite its own memory file, but a payload already planted keeps attacking current and future sessions.12

The mitigations on the engineering side are reasonably clear: writes into resident memory need human approval; memory entries are treated as data, inspectable and deletable; only evidence that was actually opened may be cited; every conclusion carries a source and a capture time; cross-session references get an untrusted marker and a “do not follow the instructions inside” warning.25

Open-source tooling works on the same problem. Some plugins make “carry the same project into a different tool” the default behaviour, so nobody has to re-introduce the project background.23 Others persist long-lived facts, decisions and constraints outside the session, retrieve them per repository and task, and hand them back on demand in a new session.24

On the vendor side, GitHub’s Copilot Memory documentation says it plainly: asking Copilot to store a memory does not guarantee it will be stored, the model decides; for instructions that must hold, use custom instructions rather than Copilot Memory.45 The accompanying Dreaming capability analyses eligible sessions and PR review feedback in the background, correcting stale guidance and removing duplicate memories.46

Alibaba Cloud’s Bailian memory store takes the soft-invalidation route — entries expire by TTL without being physically deleted, stay traceable, and the store offers a change log and snapshot comparison.47 A cross-session memory design from the same company stores episodic memories as YAML, each entry carrying source, observed_at, verification_status, confidence, sensitivity and retention, with new facts reconciled against old memories first.48

Once a handoff can be read by the next person, it has to be auditable.

8. What humans end up doing

The three jobs that are easiest to miss in a spec author’s day: defining acceptance, writing handoffs, managing expiry.

The bar for acceptance is rising. Acceptance used to mean “looks right”; now it has to be a command that turns red. The AI Agent Handbook cites Anthropic’s analysis of around 400,000 Claude Code sessions: people carried roughly 70% of planning decisions, agents carried roughly 80% of execution decisions.54 Once execution decisions go to the agent, human work concentrates at the two ends, planning and acceptance. An earlier post on this site, Code got 4× faster, the team only got 10% faster, covers feeding context within a single session and lands on process as the bottleneck; the cross-session layer gets stuck on the handoff.

Writing the handoff is technically easy and honest hard. The whole value of the status grading sits in whether anyone is willing to write “needs verification” and “assumed”.

Managing expiry is the easiest to miss. Which content deserves to sit in resident context is still a human decision. In Anthropic’s memory design, dreaming does four things — correcting wrong notes, writing missing notes, building the wiki, and deciding what to preload next; promotion into the resident layer needs human approval.1 Perplexity’s Dream agent stages wiki changes for review and commits them through Git, so an anomaly leaves a diff behind.20 Revision belongs to dreaming; the human only approves.

A newer job is rewriting subjective judgement into facts the model can check against something. “Is this complex” cannot be accepted; rewritten as a checkable criterion, it can.17

Three things you can start doing now, after which a spec author’s centre of gravity moves from writing requirements to maintaining context:

  1. Attach a one-line handoff summary, “the next person picks up here”, whenever a spec is finalised.
  2. Tag every constraint in the spec with how to verify it.
  3. Walk the long-lived context list once a quarter and delete entries that no longer hold.

9. Acceptance criteria

“It seemed to get it” is not an acceptance criterion. Proving that a handoff connects requires a reproducible measure.

Two places deserve a dedicated test. The compaction path is one of the few critical paths: in an analysis of 13.5 million Copilot sessions and 760 million calls, only 7.8% of sessions triggered compaction while accounting for 44.2% of tokens.14 Another warning comes from benchmark research: current benchmarks are compaction-friendly because the goal is fixed and the progress sits on disk, and the only thing that cannot be recovered is a constraint that exists nowhere else — so acceptance has to cover that case.4

Metric How to measure it What passes
Exact constraint recovery rate Ask for three hard constraints after a compaction All three come back verbatim
State restatement accuracy Compare the new session’s first restatement against the state file No mismatched entries
Evidence retrievability Spot-check the command and output location behind each “done” Every sampled item runs
Stale entry residue rate Run a baseline comparison on a schedule Anything over the threshold gets invalidated first
Cost to resume, in tokens Record the tokens from reading to being able to act Compare horizontally with model and task fixed
Forbidden action compliance Count the tool calls that cross a boundary Attribute each one

A cheaper acceptance method: close the conversation, open a fresh request, replay no old messages and pass no session identifier, then see whether it still needs to be told. Comparisons should fix the model, the profile and the skill version and start from the same snapshot; keep failures as regression cases.19

A harsher test is to let a handoff go stale on purpose and see whether it still holds.38

The smallest useful loop takes 15 minutes. Write the acceptance criteria down before you run it:

  1. Open a new session with nothing but the handoff.
  2. Have it restate the goal, the state and the next step.
  3. Spot-check one “done” item’s evidence and have it run the command.
  4. Watch whether its first step crosses a forbidden action.

10. Off-the-shelf options

There are plenty of tools and platforms for cross-session work, and picking one by feature list alone is easy to get wrong. The memory layer decides where facts live and how they are found; the spec layer decides what shape the requirement takes; the agent itself is the carrier of the session, and it has a single selection criterion — whether it writes its own memory files.

Layer What it solves Ask this before choosing
Memory and context Where facts live, how they are found Plain files, a structured store, or a graph
Specs and documents What shape the requirement takes Are decisions and state separated
The agent itself Where the session runs, where state lands Does it write memory files at all

The memory layer already has plenty of options. Among the ones still shipping actively, the mechanisms differ in a few specific ways: claude-mem captures tool calls and file edits from a session and injects the compressed result into future sessions; mem0 extracts additively rather than overwriting and fuses semantic, BM25 and entity retrieval.

OpenViking unifies memory, knowledge retrieval and skills into one virtual file system where every directory carries a generated summary, so an agent scans summaries before deciding which file to read; graphiti gives fact edges validity windows and entities evolving summaries; MemOS ships a DeepSeek Harness plugin; Hy-Memory pairs a dedicated extraction model with the store.

There are also frameworks that keep memory as plain files you control, so it survives a change of model.22

The spec layer: spec-kit, OpenSpec and BMAD-METHOD are the skeletons worth reading. Their artefacts look different, but all of them maintain the spec as a living document. MCP’s official memory server works as a reference point.

The agent layer deserves a word of its own. Claude Code’s auto memory writes plain Markdown and loads only the first 200 lines or 25KB of MEMORY.md per session; Codex reads only AGENTS.md and writes nothing itself; Antigravity CLI keeps AGENTS.md and GEMINI.md resident and relies on plugins for cross-session memory.62 A README claiming “supports cross-session memory” and memory that actually lands on disk are two different things.

The platform mechanisms are more concrete. OpenAI replaced the memory system behind ChatGPT with a new generation, evaluated on three things: continuing context, honouring preferences and limits, and staying current over time; users can see and rewrite a summary of what is remembered.41 The Agents API manages context recovery with persistent sessions and an orchestration layer.42

Microsoft’s Foundry added procedural memory that audits successful patterns and missing steps from trajectories, pairs them with an agent optimizer for self-improvement, and added TTLs.43 Persistent agents in Copilot Studio exist across people’s roles and tenures.44 Google’s Memory Bank draws the distinction explicitly in its documentation: the session service is short-term, the memory bank is long-term.52 The MongoDB and Google ADK integration provides durable memory that survives restarts and horizontal scaling.53

Tencent’s Memory Proxy comes closest to the handoff problem: it produces a context plan first, then trims it to a budget, with the allocation order being task constraints and decisions > code structure and impact > methods and checks > background and reference material; it trims rather than truncates, and the trimmed list is explainable.49 Hunyuan Hy Memory 2.0 takes a different route, handing fact extraction to a dedicated model with 30B total parameters and 3B active, while the MemHub client plugs into more than ten coding tools.50 Volcengine Ark’s documentation gives a line you can put straight into a team standard: the default threshold for context compaction is 192,000 tokens, compaction only affects the context later model calls see, and the Session’s Event records are not deleted.51 Compaction, caching and long-term memory are three different things.

Most comparison numbers in public benchmarks come from collections the benchmark’s own authors maintain: in one public evaluation, XERJ’s semantic recall top-5 hit rate was 94.7%, ReMe hybrid 93.3% and Mem0 88.0%, over a sample of 85 memories and 75 questions maintained by the evaluator.55 Scores on a vendor README have to be read as self-reported.

Open source does not mean self-hostable: some projects run four languages on one core with a commercial team behind it, and the server-side capability is not open.

Check the licence before you choose: OpenViking and basic-memory are AGPL-3.0, and shipping a modified version as a service means re-evaluating your obligations.

Tools will be replaced; field names should not be. MCP’s official memory server matches literally in lowercase, with no embeddings and no ranking, so one misspelled field name and recall fails outright. Fix the field names of your handoff in the repository instructions. Decide which layer you own first, then hand the rest to something that already exists.

Appendix A: handoff template

# <task name> handoff
Last updated: <YYYY-MM-DD> | owner: <person> | expires when: <what makes this stale>

## Goal and scope
<one sentence: what to build and what counts as done>

## Success criteria
- <verifiable criterion 1>
- <verifiable criterion 2>

## Explicitly out of scope
- <thing 1>

## Hard constraints
| Constraint | Where it lives | How to verify |
| --- | --- | --- |
| <constraint 1> | <file / gate> | <command or action> |

## Current state
Five grades: done / needs verification / not started / assumed / blocked
| State | Content | Evidence |
| --- | --- | --- |
| <done / needs verification / not started / assumed / blocked> | ... | <command + result + output location> |

## Confirmed facts
- <fact> — source: <file / commit / link>, observed: <YYYY-MM-DD>, still holds: yes / no

## Rejected options
- <option> — why it was rejected: <...>

## Unfinished work and dependencies
- <item> — depends on: <...>

## External side effects
- <created / sent / modified> — current state: <...>, check the state on recovery, do not replay the request

## Files and versions
- branch: <...> | commit: <...> | working tree: <...>
- untracked files: <...>

## Next step
One action: <...>
Expected output: <...>
Gate for release: <...>

Appendix B: anti-pattern checklist

  • The spec says “don’t touch X” and the handoff does not
  • The handoff is appended chronologically and keeps growing
  • The key constraint lives only in the conversation and disappears after one compaction
  • “We discussed it last time” is used as a recall trigger
  • An external side effect was replayed during recovery
  • A fact that has expired is still there with no invalidation marker
  • Long-term memory can be rewritten freely, with no approval and no rollback
  • The session handoff carried “what was done” but not “why it was done that way”

Appendix C: sourcing rules and how soft marketing was filtered

Sources here come in three grades. Numbers from papers and institutional research pages are quoted directly with the experimental setup stated. Numbers from vendor blogs and research pages are marked “official blog” or “self-reported” — those are the company’s own results, with no third-party review. Personal blogs and team practices are cited for practices and field design only; their self-measured numbers are left out.

Sources treated as soft marketing, mentioned in passing as examples only: OctaMem, tiramemsu, mnemos-continuity, NestDaddy, neuraltrust, papez, brainos, Sentra, Maxinem, plus the Oracle Agent Memory and AWS product pages. None of them back a conclusion.

For open-source projects, only the mechanism, the repository-page star count and the last commit date are used. Star counts and last-commit dates come from the repository-page snapshot and commit feed of 26 November 2026. Self-reported recall rates and token-savings claims are left out, and a project’s own benchmark results are used only as a counter-example.

Busy-looking projects that have stopped are worth keeping as counter-examples: cla-task-master with 28,522 stars last committed on 23 April 2026; aider with 50,225, stopped on 22 May; Roo-Code with 24,236, repository archived; memvid with 17,441, stopped on 14 July. A star count on a page does not mean the project is alive.

The collection window runs from 26 May 2026 to 26 November 2026. Chroma Context Rot and Anthropic’s context-engineering piece fall outside it and serve only as background.

References

评论