DEV Community

Sam Stull
Sam Stull

Posted on Originally published at limitcast.dev Fully Autonomous

limitcast 0.16: find the notes Claude Code never loads, and split big memory files

Claude Code keeps notes for each project in a MEMORY.md index plus topic files, and it reads only the start of that index at the beginning of every session. limitcast 0.16 shows how much of yours fits, and adds two Claude Code commands to tidy the rest.

Anything past line 200 or 25 KB of MEMORY.md is never loaded, and 0.16 tells you when you are there. limitcast memory and limitcast doctor report it, and /limitcast:memory-audit and /limitcast:memory-split help you fix it.

What Claude Code loads

The memory documentation says the first 200 lines of MEMORY.md, or the first 25 KB, whichever comes first, are loaded at the start of every conversation, and that content beyond that is not loaded at session start. It also says Claude Code checks the file after Claude writes to it, and asks Claude to shorten an index that is near or over a limit.

That covers an index Claude just wrote. An index that grew over months, or was edited by hand, can still be past the cap with nobody told. The documentation describes that check for the index; it does not describe one for broken links, files nothing points at, or topic files that have grown large.

limitcast memory

Run it in a project and it reads that project's memory folder and changes nothing. This is a made-up folder with a few problems built in:

$ limitcast memory
Memory: ~/.claude/projects/-home-you-app/memory
Index: MEMORY.md 21 / 200 lines, 0.8 / 25 KB
Topic files: 16
Not linked from the index (2): old-notes.md, scratch.md
Broken links (1): MEMORY.md -> deploy-notes.md
Over 150 lines or 24 KB (1): api-conventions.md (312 lines, 8 KB)
Enter fullscreen mode Exit fullscreen mode

The index line is used lines and bytes against the cap. Below it are a link in the index that points at a missing file, two topic files nothing links to, and a file long enough that every task that opens it reads all 312 lines.

limitcast doctor shows the same as one line. It fails only when the index is past the cap, because that is the one case where Claude is missing notes you wrote. Here it is for that folder, and for an index of 214 lines:

✓ Memory: 16 files, index 21/200 lines, 1/25 KB; 2 not linked from the index, 1 broken link, 1 file over 150 lines. Run /limitcast:memory-audit, then /limitcast:memory-split
✗ Memory index 214/200 lines, 6/25 KB: Claude Code loads only the first 200 lines or 25 KB of MEMORY.md, so the rest is never read. Fix: /limitcast:memory-audit
Enter fullscreen mode Exit fullscreen mode

The daily background check leaves the memory line out, because memory belongs to one project. Run limitcast doctor inside the project to see it.

Audit and split from inside Claude Code

The plugin adds two commands. Both start from the same sweep and change nothing until you agree.

  • /limitcast:memory-audit goes through the index cap, broken links, files nothing links to, notes that name a file, flag or command that no longer exists, and notes that contradict each other. You get two lists: mechanical fixes first, then judgement calls with the evidence. It never deletes a note unasked.
  • /limitcast:memory-split splits one oversized file into a short hub plus topic files. First it decides whether a split is worth it: a file that is one continuous procedure stays whole, because splitting would turn one read into two. If it is worth it, it shows you the table of contents and waits. Then it moves the text verbatim, keeps the hub's filename so nothing that links to it breaks, and checks that whatever cited the old file still finds what it cited.

On my own memory folder

I ran it on mine: 300 topic files, and an index of 54 of 200 lines and 7.0 of 25 KB, so nothing is cut off. It also lists 116 files that nothing links to with a Markdown link. That comes from how I route: my index points at a few catalog files, and the notes behind them are found by filename pattern. So the list is a prompt to check, not a verdict. It is why the audit command searches for references before it calls a file an orphan, and why only the index cap makes doctor fail.

Free and MIT

Since 0.15.0 all of limitcast is free and MIT licensed, and the commands above need no key. The 0.16.0 release has the tarball, and npm install -g limitcast gets it.

Measure your own numbers

npm install -g limitcast
cd your-project
limitcast memory
limitcast doctor
Enter fullscreen mode Exit fullscreen mode

In Claude Code, run /plugin marketplace add SamStull9007/limitcast, then /plugin install limitcast@limitcast, and try /limitcast:memory-audit in the project. The guide has the rest, and the 0.14 post covers the previous release.


Originally published at limitcast.dev. limitcast is a local-only command-line tool that forecasts when your Claude Code, Codex and Grok usage limits run out.

Top comments (0)