cd /news/ai-agents/forget-freely-grep-later-lossless-in… · home › topics › ai-agents › article
[ARTICLE · art-173019] src=arxiv.org ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Forget Freely, Grep Later: Lossless, Index-Free Memory for Long-Horizon LLM Agents

A new arXiv paper (2611.25123v1) introduces GrepMem, a lossless, index-free memory mechanism for long-horizon LLM agents that combines an append-only plain-text log of the agent's full history with a regular-expression search tool for on-demand recall, requiring no embeddings, retrieval index, memory extraction, or additional models. Trained with reinforcement learning on Qwen3.5-9B across five context management strategies, GrepMem reached 95-97% accuracy on ContextBench versus at most 21% for lossy baselines and beat SUPO's summarization by 8.8 percentage points on BCP-Multi, remaining on the accuracy-token-cost Pareto frontier across all five evaluation tasks.

recommendation

Store the agent's full history in an append-only plain-text log and recall details with regex search instead of summarizing or embedding, which scored 95-97% on ContextBench versus at most 21% for lossy baselines.

more in playbook: Designing agent systems
by read1 min views10 publishedNov 20, 2026

arXiv:2611.25123v1 Announce Type: new Abstract: Long-horizon LLM agents often exceed their context windows, forcing them to discard information that may be needed later. Existing context management strategies rely on summarization, masking, or structured memory, requiring decisions about what to preserve or how to retrieve it before future needs are known. However, these methods can introduce lossy compression, potentially discarding details needed for future tasks. To address this limitation, we introduce GrepMem, a simple, lossless, and index-free memory mechanism built on two components: an append-only plain-text log of the agent's complete history and a regular-expression search tool for on-demand recall. Unlike structured memory systems, GrepMem requires no embeddings, retrieval index, memory extraction, or additional models. We train Qwen3.5-9B with reinforcement learning under five context management strategies and evaluate on multi-question research sessions, long-stream recall, and agent-trajectory question answering. GrepMem achieves 95-97% accuracy on ContextBench, versus at most 21% for lossy baselines, and outperforms SUPO's summarization by 8.8 percentage points on BCP-Multi. GrepMem scales effectively to increasingly long input streams while remaining on the accuracy-token-cost Pareto frontier across all five evaluation tasks. Our results show that a plain-text log and grep provide a simple but competitive approach to long-horizon agent memory, without requiring complex structured memory infrastructure.

── more in #ai-agents 4 stories · sorted by recency
── more on @grepmem 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/forget-freely-grep-l…] indexed:0 read:1min 2026-11-20 · —