Two Patterns for Preventing AI Agent Memory Rot: AutoDream and Skeptical Retrieval

OpenClaw's Approach to Memory Management
OpenClaw has released two MIT-licensed patterns to tackle the slow rot problem in file-based AI memory systems, where facts go stale without proper marking, causing agents to act on outdated context. While currently OpenClaw-specific, the concepts apply to any file-based memory system.
AutoDream: Nightly Memory Consolidation
AutoDream is a cron agent that runs at 3am to perform memory maintenance. It reads session transcripts, mines daily logs before they fade, updates structured memory files, and prunes stale entries. The key insight is that daily logs are the richest raw material but decay fastest, so the job extracts everything worth keeping before they go cold. Memory gets continuously rewritten rather than just appended.
Skeptical Retrieval: Decay-Weighted Memory Scoring
Skeptical Retrieval replaces standard semantic search's flat top-N retrieval with a composite score: semantic × recency_decay × recall_boost. Standard semantic search treats a 6-week-old fact the same as one from yesterday, while this approach applies different decay rates to different file types (stable facts at λ=0.02 vs operational todos at λ=0.08). Snippets recalled frequently get a logarithmic boost, and low-confidence results are suppressed rather than injected.
How They Work Together
The two patterns form a self-improving memory loop: AutoDream tracks which snippets were cited, recall counts feed into composite scoring, and AutoDream prunes snippets that never get recalled. Implementation starts with Phase 0 (reasoning discipline only) which costs nothing, followed by Phase 1 (recall tracking) which needs one cron update.
The developer notes that decay rate choices required iteration to get right and is open to discussion about them. Both patterns are available on GitHub:
- https://github.com/LeoStehlik/openclaw-skeptical-retrieval
- https://github.com/LeoStehlik/openclaw-autodream
📖 Read the full source: r/LocalLLaMA
👀 See Also

Lean Context: Claude Code Plugin Converts Verbose Docs to Agent-Optimized Files
A free, open-source Claude Code plugin called Lean Context scans project documentation and removes content AI agents can discover through grepping, keeping only essential non-obvious commands, gotchas, and environment quirks. In a .NET e-commerce project test, it reduced 8 documents totaling 1,263 lines to just 23 lines.

OpenClaw extension routes requests through Claude Code CLI instead of API
An OpenClaw extension spawns the Claude CLI binary as a subprocess, routing requests through Claude Code CLI instead of the Anthropic API. This provides the full Claude Code experience at the flat rate of a max plan.

Toothcomb: Open-Source Real-Time Speech Fact-Checker Built with Claude Opus and Sonnet APIs
Toothcomb is an open-source tool that takes a speech transcript, fact-checks claims, detects logical fallacies and manipulative language using Claude Opus API, and supports real-time microphone streaming.

Claude AI's UltraThink feature returns with practical usage guidance
Claude AI has reinstated the UltraThink feature after user feedback. Medium effort is now the default for Opus 4.6 (Max/Team), with High effort available permanently via /model, and UltraThink as a one-turn override to high effort.