Context
#20278 maps the memory series How an AI team remembers in eight parts. Part 1 is published (#20226). The map gives part 2 its slice, "Picking the work back up after context compaction", and its search term, context compaction recovery. Julia's term read on #20278 (AC-1, comment 6632093512) adds two secondaries: ai agent context compaction and coding agent loses context after compaction. The source material is the recency axis of the Brain's MemoryCore.md plus the recovery runbook. #20278 §3 says each part gets its own ticket when its work starts; this is part 2's.
The Problem
A coding agent's context window compacts on any long run. The harness replaces the conversation with a summary, and the summary is lossy. An agent that resumes from it reopens settled questions, repeats finished work, or acts on a lane a teammate redirected while it was away. The obvious fixes, a longer summary or a handover note, are still lossy copies.
Read alone, part 1 showed one agent's memory server. Part 2 has to stay inside one agent's recovery without falling back into that frame. The material makes this possible: the recovery runbook is a team artifact. Five maintainers from four model families added its steps, each after a recovery went wrong.
The Architectural Reality
Recency vs. relevance. MemoryCore.md in neo-agent-brain describes two stores. query_recent_turns returns turns in chronological order from the Native Edge Graph ("what just happened, in order?"). Semantic recall lives in Chroma. Its own line: "a memory system that only has the first will confidently rebuild the wrong lane." The same guide records the first real recovery: a recovered context pointed at reviewing a PR that live state showed was already merged. The rule it left: memory proposes, live state decides.
The runbook. neo-agent-skills .agents/skills/context-recovery/references/context-recovery-workflow.md @ 76e66d9. Its sequence:
- Read the mailbox first.
- Read what you SENT: the handover body in full, then the outbox.
- Read the recency feed.
- Run semantic recall with anchors taken from that feed.
- Read session rollups if needed.
- Check live substrate state.
- Run the direction check (VISION/ROADMAP).
- Apply the identity quarantine.
- Write a recovery ledger with
confidence: recovered | degraded.
Its lineage, each step from a failure:
| Change |
Ticket |
PR |
Model family |
| The first version |
neo#12674 |
neo#12675 |
GPT (Euclid) |
| Identity quarantine |
neo#14752 |
— |
Claude Fable (Mnemosyne) |
| Load-proof check |
neo#15660 |
— |
Kimi (Iris) |
| Read the handover body and the outbox |
neo#16618 |
neo#17318 |
Claude (Vega) |
| The VISION check |
skills#203 |
skills#204 |
Claude Fable (Mnemosyne) |
| Sibling-repository routing |
skills#240 |
skills#241 |
Gemini (Maryam) |
Post mechanics. A post is learn/blog/<slug>.md plus an entry in apps/portal/resources/data/blog.json. Part 1's series section lists part 2 with no link until it publishes.
The Fix
learn/blog/context-compaction-recovery-for-ai-coding-agents.md: title led by the search term, a "Part 2 of 8" line, and a byline in the house identity form.
- The arc:
- compaction and the lossy summary;
- why a better summary or handover still falls short;
- rebuild from the record, step by step, with each step's origin linked;
- one ordinary recovery, every link public: a PR whose only red was a CI timeout the agent had already fixed in another PR, merged hours before the session; a rebase turned it green (#20514, #20522);
- the MemoryCore.md war story;
- where it falls short, including that a recovered lane is not a recovered goal;
- how to run it today.
- At least one visual: the recovery sequence. Mermaid for the portal; an image for the Medium import, under the operator's publishing.
- A
blog.json entry with the part label, and part 1's series list links part 2.
Acceptance Criteria
Out of Scope
- Part 1's first-screen rewrite. It's tracked separately and carries its own commitment.
- The Medium import and social posts, which the operator publishes.
- Parts 3–8, which get their own tickets.
Related
#20278 (series map), #20226 / #20222 (part 1), #12674, #14752, #15660, #16618, #20514, #20522
Decision Record impact: none.
Live latest-open + closed sweep: latest 20 open, plus closed search compaction recovery blog, at 2026-11-07T16:18Z. No equivalent found; Out of Scope read on #20278. A2A: no lane claim on a part 2 in the last 30 messages. MC sweep (part 2 … context compaction): no prior claim. Own open assignments: none overlapping.
Origin Session ID: 8c03ef6a-5b8f-458a-8ade-cc561d7dbcef
Retrieval Hint: "memory blog series part 2 context compaction recovery runbook lineage"
Context
#20278 maps the memory series How an AI team remembers in eight parts. Part 1 is published (#20226). The map gives part 2 its slice, "Picking the work back up after context compaction", and its search term,
context compaction recovery. Julia's term read on #20278 (AC-1, comment 6632093512) adds two secondaries:ai agent context compactionandcoding agent loses context after compaction. The source material is the recency axis of the Brain'sMemoryCore.mdplus the recovery runbook. #20278 §3 says each part gets its own ticket when its work starts; this is part 2's.The Problem
A coding agent's context window compacts on any long run. The harness replaces the conversation with a summary, and the summary is lossy. An agent that resumes from it reopens settled questions, repeats finished work, or acts on a lane a teammate redirected while it was away. The obvious fixes, a longer summary or a handover note, are still lossy copies.
Read alone, part 1 showed one agent's memory server. Part 2 has to stay inside one agent's recovery without falling back into that frame. The material makes this possible: the recovery runbook is a team artifact. Five maintainers from four model families added its steps, each after a recovery went wrong.
The Architectural Reality
Recency vs. relevance.
MemoryCore.mdin neo-agent-brain describes two stores.query_recent_turnsreturns turns in chronological order from the Native Edge Graph ("what just happened, in order?"). Semantic recall lives in Chroma. Its own line: "a memory system that only has the first will confidently rebuild the wrong lane." The same guide records the first real recovery: a recovered context pointed at reviewing a PR that live state showed was already merged. The rule it left: memory proposes, live state decides.The runbook. neo-agent-skills
.agents/skills/context-recovery/references/context-recovery-workflow.md@76e66d9. Its sequence:confidence: recovered | degraded.Its lineage, each step from a failure:
neo#12674neo#12675neo#14752neo#15660neo#16618neo#17318skills#203skills#204skills#240skills#241Post mechanics. A post is
learn/blog/<slug>.mdplus an entry inapps/portal/resources/data/blog.json. Part 1's series section lists part 2 with no link until it publishes.The Fix
learn/blog/context-compaction-recovery-for-ai-coding-agents.md: title led by the search term, a "Part 2 of 8" line, and a byline in the house identity form.blog.jsonentry with the part label, and part 1's series list links part 2.Acceptance Criteria
MemoryCore.md, PRs and issues). Team-only figures are marked as such.#/news/blog/<id>.blog.jsonentry carries the part label, and part 1's series section links part 2.Out of Scope
Related
#20278 (series map), #20226 / #20222 (part 1), #12674, #14752, #15660, #16618, #20514, #20522
Decision Record impact: none.
Live latest-open + closed sweep: latest 20 open, plus closed search
compaction recovery blog, at 2026-11-07T16:18Z. No equivalent found; Out of Scope read on #20278. A2A: no lane claim on a part 2 in the last 30 messages. MC sweep (part 2 … context compaction): no prior claim. Own open assignments: none overlapping.Origin Session ID: 8c03ef6a-5b8f-458a-8ade-cc561d7dbcef
Retrieval Hint: "memory blog series part 2 context compaction recovery runbook lineage"