← Back to Library

Claude code's hidden /dream feature massively upgrades memory

Claude Code's Dream Feature Tackles the Memory Bloat Problem

Anthropic has quietly shipped a feature called Dream for Claude Code that addresses one of the tool's most persistent annoyances: memory rot. Over time, Claude Code's auto-memory system accumulates markdown files full of duplicates, contradictions, stale references, and relative dates that lose meaning as weeks pass. Dream consolidates all of that into something tighter and more useful. The catch is that Anthropic is slow-rolling access, leaving most users locked out for now.

Chase HAI walks through both the problem and the workaround, explaining how Claude Code's memory system works under the hood and offering a custom skill that replicates Dream's behavior for users who do not yet have official access.

Claude code's hidden /dream feature massively upgrades memory

How Auto-Memory Creates Its Own Mess

Claude Code's auto-memory system is designed to accumulate knowledge across sessions without requiring the user to manually write anything down. When a user mentions a preference or habit in conversation, Claude Code creates a markdown file in a hidden .claude folder and references it in a master index. The idea is elegant: a self-maintaining knowledge base that makes Claude Code smarter over time.

The reality is messier. As Chase explains, the system has no built-in mechanism for resolving conflicts or cleaning house:

What if one day I say, "Hey, I want to code using this convention. I want you to always use React." And then the next day I say, "Never use React again." There's going to be two memory files there, and they're both going to be referenced in our master memory file.

This is a familiar pattern in any append-only system. Without periodic compaction, entropy wins. The memory folder grows, the index bloats, and the very context that was supposed to make Claude Code more helpful starts degrading its performance by consuming precious context window space with outdated or contradictory information.

The Relative Date Trap

One of the more subtle problems Chase identifies is the handling of temporal references. When a user says something is due "next Friday," Claude Code dutifully records that phrase. But "next Friday" is a moving target:

Well, what does next Friday actually mean? As of now, it's just going to put that in its memory folder... Well, you can see next Friday means different things as time moves forward.

This is a deceptively important point. Relative dates in a persistent memory system are essentially corrupted data after a short window. They look meaningful but point nowhere useful. Dream's approach of converting these to absolute dates is the kind of mundane housekeeping that prevents real confusion down the line.

What Dream Actually Does

Dream's consolidation process runs in four steps: it reads existing memory files, compares them against recent session transcripts, merges and deduplicates files, and then prunes the index. The session transcript comparison is particularly interesting because it grounds the memory in actual usage rather than just recorded preferences. A user might have stated a preference months ago that no longer reflects how they actually work.

Chase demonstrates Dream on his own project and reports seven issues identified:

We have near duplicates. We have contradictions. We have stale data. Stale data again. We have a relative date and then we have something that's a code convention that says shouldn't be in memory as well as things just being too verbose.

The result was a net reduction: files consolidated, others pruned, and the index tightened. The master memory file has a 200-line cap, and Dream pushes toward using as little of that budget as possible.

The Public Prompt Workaround

Since Dream's prompt has been shared publicly by early-access users, Chase demonstrates how to turn it into a custom Claude Code skill that anyone can invoke manually. The skill adds flag options for running at the project level, the user level, or both, giving more granular control than the built-in feature currently offers.

This is a reasonable workaround, though it comes with caveats worth noting. A manually invoked skill requires the user to remember to run it, which defeats some of the purpose of automatic maintenance. The official Dream feature presumably runs on a schedule or trigger that keeps memory clean without user intervention. A skill that requires /dream to be typed is better than nothing, but it shifts the maintenance burden back to the user.

Counterpoints Worth Considering

Dream solves a real problem, but the underlying architecture raises questions that consolidation alone cannot answer. The auto-memory system stores preferences and facts as unstructured markdown, which means even after Dream cleans things up, Claude Code is still pattern-matching against prose rather than querying structured data. A database with typed fields for preferences, deadlines, and conventions would be more robust than any amount of markdown grooming.

There is also a question of trust. Dream edits Claude Code's own memory files, which means the AI is deciding what to keep, what to merge, and what to discard. For casual personal assistant use, this is probably fine. For development projects where specific conventions were recorded for a reason, an automated pruning pass that removes something it judges as "stale" could silently drop important context. The fact that Dream asks permission before editing is a reasonable safeguard, but users would need to carefully review the proposed changes rather than rubber-stamping them.

Finally, the 200-line cap on the master memory file is an interesting design constraint. It forces prioritization, which is good, but it also means that sufficiently complex projects will inevitably lose context. Dream optimizes within this constraint rather than questioning whether the constraint itself is too aggressive for power users managing large codebases.

Bottom Line

Dream is a sensible maintenance layer for Claude Code's auto-memory system, addressing the inevitable accumulation of stale, duplicate, and contradictory information. Chase's walkthrough is practical and his custom skill workaround is useful for users locked out of the official rollout. The feature sits in the category of "pure upside" improvements: it makes something that already exists work better without introducing new complexity. The deeper question of whether unstructured markdown is the right foundation for AI memory remains open, but within the current system, periodic consolidation is clearly better than letting entropy run unchecked.

Deep Dives

Explore these related deep dives:

  • Clean Code Amazon · Better World Books by Robert Martin

    A handbook of agile software craftsmanship — writing code that humans can read and maintain.

  • Cryptomnesia

    Explains how forgotten memories resurface as 'new' ideas, directly causing the contradictions Dream resolves

  • Memory inhibition

    Describes the cognitive mechanism for suppressing irrelevant memories, mirroring Dream's stale data cleanup

  • Transclusion

    Reveals the hypertext concept behind Claude's master memory file referencing individual markdown fragments

Sources

Claude code's hidden /dream feature massively upgrades memory

by Chase H · Chase H AI · Watch video

Enthropic just quietly released a new feature for Claude code that helps fix its memory problem. It's called Dream and it consolidates memories. It removes contradictions and it cleans up stale information so that Claude actually gets smarter the longer you use it. But there's a small problem.

Dream has only been released for a very small number of users. So chances are you don't even have access yet. But here's the thing. The prompt for Dream is completely public.

So today, I'm not only going to explain how Claude codes memory works and how Dream fits into the equation to help fix it. I'm going to give you a custom skill that does exactly what Dream does so you can start using it right away, whether anthropics giving you access or not. Now, in order for you to understand what Dream is actually doing, we first need to understand how memory works. So, let's do a quick overview.

Now, for memory, I'm talking about automemory. I'm not talking about claw.md although claw.md is kind of in this memory ecosystem. So, automemory lets Claude Code accumulate knowledge across sessions without you writing anything. Basically, imagine a scenario where you're talking to Claude Code and you're using it as a personal assistant and you say something just in the chat like, "Oh, I always go to the gym on Tuesdays." Right?

Claude Code's going to remember that. It's actually going to create its own markdown file on its own inside the project that says something like, "Oh yeah, Chase always goes to the gym on Tuesdays." And now you're probably wondering, "Where are these memory files stored? Can I actually take a look at them?" Well, they're in your.claude folder. It's not inside your actual project directory.

So, if I go to Claude, I head to projects and then I select the project that we're talking about. In this case, let's say I'm talking about my vault project, which is like my personal assistant project for Claude. If I scroll down, right, I will see a memory folder. If I click inside the memory folder, what do we see?

Well, we see a whole bunch of markdown files, including a markdown file titled memory. So there are a bunch of individual markdown files and then there's sort of a master memory file. The master memory file, if we take a look ...