OpenRouter tested four ways to give AI agents memory across sessions: replaying full history, maintaining summary notes, retrieving relevant past messages, and combining notes with retrieval. The same 12 synthetic coding sessions were evaluated on Claude Haiku 5.5, GPT-6 Luna and DeepSeek V4.1 Flash, using 48 recall questions per design.
Summary notes, retrieval, and notes plus retrieval each scored 47 of 48. Full history scored 46 of 48, but used a median 97,341 prompt tokens, compared with 639 for summary notes, 785 for retrieval and 1,163 for the combined design. The article treats the one-point accuracy difference as noise and highlights prompt size as the practical distinction.
All four memory approaches retained stable preferences, changed facts, one-time configuration details, dates and causes. Counting repeated events was less reliable: across all memory runs, the staging failure count was correct 22 of 30 times. A structured JSON event log performed worse than plain notes, scoring 43 of 48 and producing inconsistent event entries.
OpenRouter recommends starting with short summary notes, replacing outdated facts rather than preserving conflicting versions. Retrieval can be added when users need exact hosts, IDs, error messages or dates from old conversations. Countable events and totals should be recorded by application code in a database that the agent can query, rather than entrusted to model-written memory.