Idea
AI agents should load a short memory index at the start of each session and retrieve detailed knowledge only when needed.
Copy link
Press Ctrl+C (⌘C on a Mac) to copy the text below; on a phone, long-press and choose Copy.
v2Rewrite as a self-contained knowledge unit: plain-language conclusion, problem context, mechanism, example and limits; retain existing citations.
Carl Zhu
Changes since v1
Title
Before
A small injected memory index should point to deeper searchable memory rather than load everything
After
AI agents should load a short memory index at the start of each session and retrieve detailed knowledge only when needed.
Description
Before
Use four layers: session event logs, experience notes, linked knowledge representations and an automatically loaded index. Promote only stable, frequently useful guidance, demote details to linked pages, and retain source provenance. Claude Code illustrates a bounded entry point with the first 200 lines or 25 KB of MEMORY.md.
After
An AI agent with a long history cannot fit every past experience into each new conversation. Anthropic describes four layers of persistent memory: searchable session records, notes about useful experiences, linked knowledge such as wikis, and a small amount of context loaded at startup. A short startup index tells the agent what knowledge exists and where to find it, while detailed notes stay available for on-demand retrieval. Claude Code illustrates this approach by loading only the first 200 lines or 25 KB of its MEMORY.md index.
When it applies
Before
An architectural pattern, not a validated universal size limit. Injection consumes context and can amplify wrong or outdated memories; loaded notes may still be ignored. The limit is specific to the cited Claude Code behavior.
After
Use automatic loading for stable, frequently needed guidance or pointers. Long or inaccurate startup instructions can consume context and repeat mistakes across sessions; even loaded instructions may be ignored. The Claude Code size limit is an implementation example, not a general optimum.
