# Claude Code reads only first 200 lines or 25 KB of memory.md, user suggests splitting

Digest AI · Agents & Tools · published 2026-11-26T13:00:00Z

Canonical: https://digestai.news/story/claude-code-reads-only-first-200-lines-or-25-kb-of-memory-md-user-sugg

## Summary

Claude Code only reads the beginning of the MEMORY.md index at the start of a conversation. The official limits are 200 lines or 25 KB, whichever comes first. When the file exceeds those thresholds, the later entries are never loaded, causing the AI to “forget” rules that are correctly written in the file.

A user discovered that their original index was about 140 lines and 31 KB, so roughly the last 25 items were cut off. To solve the problem they trimmed the entrance index to about 33 lines (5 KB) and moved the remaining notes into smaller, domain‑specific index files. They also added a weekly inspection script to check line counts, file sizes, and broken links, and used Claude Code Hooks to enforce critical rules before tool actions.

The approach includes four practical guidelines: keep only a list of domain links at the entrance, categorize domains by work context, duplicate tool‑related entries in both tool and task indexes, and limit table‑of‑contents depth to two levels. The user provides a ready‑to‑paste prompt that asks Claude Code to report line counts, sizes, and missing links before making any changes.

## Key points

- Claude Code reads up to 200 lines or 25 KB of MEMORY.md at conversation start
- User’s original index of ~140 lines and 31 KB caused the last 25 items to be ignored
- Splitting the entrance index to ~33 lines (5 KB) and using domain‑specific indexes resolved the issue

## Why it matters

Ensuring that Claude Code can access all essential notes prevents missed instructions, making the tool more reliable for developers and teams that rely on consistent AI behavior.

## Sources

1. [To Anyone Repeating the Same Rules to Claude Code: The Reason It Forgets Isn't What's in Your Notes](https://note.com/keita_aiwork/n/n9de0c080c103?hl=en) (note.com, 2026-11-26)

## Cite

Digest AI, "Claude Code reads only first 200 lines or 25 KB of memory.md, user suggests splitting", 26 November 2026, https://digestai.news/story/claude-code-reads-only-first-200-lines-or-25-kb-of-memory-md-user-sugg

---

Written by Digest AI's editorial model from the linked sources; the sources are the record. Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse
JSON: https://digestai.news/story/claude-code-reads-only-first-200-lines-or-25-kb-of-memory-md-user-sugg.json
