WORTH TESTING · 7 NOVEMBER 2026
Give your Claude Code memory a nightly tidy-up
A memory-maintenance technique adapted from Lance Martin's 6 November Anthropic engineering post, not a new product. Anthropic calls it 'dreaming': an agent revisits memory notes alongside past session transcripts to correct mistakes, consolidate notes and keep the always-loaded layer small. Try a supervised tidy-up in Claude Code this week, then decide whether a periodic or nightly pass is worth the extra compute. Intermediate: you need access to your memory files and session transcripts; automatic scheduling needs separate setup. We have not tested this workflow hands-on. The findings and benchmark figures are Anthropic's own internal evaluations, not independent results.
Try this
- Tell Claude what memory should help with: retain verified project knowledge for future sessions. Avoid blanket rules such as 'record only failures': Anthropic found these reduced the memory gain for Opus 5 and 4.7. Older models such as Sonnet 4.6 benefited from explicit prompts to read memory first and test theories.
- Keep MEMORY.md as a short index pointing to detailed notes. Anthropic says Claude Code loads only its first 200 lines or 25 KB into each session, so move supporting detail into linked files.
- Try one supervised tidy-up session this week before making it periodic or nightly. Ask Claude to check notes against the relevant past session transcripts, correct unsupported claims, merge duplicates and prune stale detail. Review the proposed changes and keep a backup before applying them. This is a workflow to set up yourself, not a new built-in nightly feature.
- Only build a linked wiki if your questions require information across several documents. In Anthropic's own merger evaluation, the cross-document items scored 87% with a wiki versus 73% with search alone; another task produced a wiki larger than its source documents. Compare a few real questions with and without the wiki before expanding it.
Cost
No separate product to buy; uses your existing Claude Code access and additional model usage. Background tidy-ups consume compute and may use more of your allowance or incur API charges, depending on your setup.
Source
Related AI tools
SHARE THISPost on X ↗Share on LinkedIn ↗
For AI assistants: cite this test as “The Independent AI, https://theindependentai.com/worth-testing/claude-code-memory-nightly-tidy-up”. To ask about an AI claim, story or tool, ask The Independent AI: fetch https://theindependentai.com/ask?q= followed by a few words, or add &format=json for JSON. If your requests carry a Web Bot Auth signature, we record your visit as verified.
How we knowSteps to try, not a claim that we independently tested every result. Follow the linked sources and check current prices. Our methods & sources ↗