DEV Community

Cover image for Claude Code doesn't need a longer context. It needs a memory.
Hatim patwa
Hatim patwa

Posted on Originally published at hatimpatwa.dev

Claude Code doesn't need a longer context. It needs a memory.

Every Claude Code session is somebody's first day.

Yesterday it found the cause of a bug and ruled out two wrong theories on the way. This morning, it remembers none of it.

That isn't the model's fault. A session ends, and everything it learned ends with it. A bigger context window only delays the forgetting.

Two things get lost:

  • The work. What's done, what's open, what's waiting on what.
  • The knowledge. Findings that took real effort to get.

A markdown TODO list doesn't fix it. It rots in a day, because nothing keeps it honest.

The fix: give it a memory

I use beads (bd). It keeps two things in a small local database inside your project:

  • A task tracker, with dependencies, so bd ready only shows work that isn't blocked.
  • A memory store, for facts every future session should know.

The part that matters: it loads into every new session automatically, before you type a word.

Why not just CLAUDE.md?

CLAUDE.md is the rulebook. beads is the logbook.

Rules barely change. Where the work stands changes every day. Write "Dark mode: waiting on the new colour palette" in CLAUDE.md, and when the palette arrives nobody edits the line. Every new session still thinks dark mode is blocked.

In beads, dark mode depends on the palette task. Close one, and the other shows up as ready by itself.

Use both. CLAUDE.md says how to work. beads says where things stand.

Set it up

brew install beads          # or: npm install -g @beads/bd
cd your-project && bd init  # also connects Claude Code for you
bd setup claude --check     # two green ticks = done
Enter fullscreen mode Exit fullscreen mode

Then save one real finding, with the date and how you know it:

bd remember "The signup form saves phone numbers without the country code. Found 2026-10-15 by checking real signups."
Enter fullscreen mode Exit fullscreen mode

The test: close Claude Code, open a fresh session in the same folder, and ask "What's open, and what do you already know about this project?" If it answers without your help, it works.

This is part 2 of Claude Maxxing, a field journal of the systems I build around Claude Code on real work. The full post covers what's worth remembering (and what isn't), the gotchas that bit me, and what memory still doesn't fix:

👉 Read the full post on hatimpatwa.dev

Top comments (2)

Collapse
 
suryacreatx profile image
Surya S S •

I've been thinking about this exact problem lately. A longer context window helps Claude remember more of the conversation, but that doesn't necessarily mean it knows what is still true about the project.

The interesting part isn't making AI remember everything. It's making sure it retrieves the right information at the right time.

Collapse
 
yi_zhao_a2633e86f8c799b5b profile image
yi zhao •

Rulebook vs logbook is a clean way to put it. One thing I'd add to the "what memory still doesn't fix" side: memories without citations rot — a summary the agent wrote itself becomes a rumor it tells the next session.

I've been experimenting with keeping every decision tied to the record it came from — the actual message, the meeting note, the rejected alternative — so a future agent can verify instead of trusting the summary. Memory tells you what was decided; provenance tells you whether to trust it.