← Reddit

Claude Code's memory index has an undocumented hard cap, truncates silently, and drops your NEWEST memories first. The governance fix was closed as "not planned."

Reddit · bobnolley · July 27, 2026
I've been running Claude Code with persistent file-based memory in daily production for months. It works genuinely well. It just hit a wall, and when I went to report the wall I found something more interesting than the wall. **Three things that aren't in the

Detailed Analysis

A detailed technical bug report on Claude Code's persistent memory system has surfaced a design flaw that Anthropic has explicitly declined to fix. The core issue: Claude Code's "always-loaded" memory index — the file that routes an agent to more detailed knowledge stored elsewhere — has an undocumented hard cap of roughly 24.4 KB or 200 lines. When that cap is exceeded, content is silently truncated, with no visible warning outside a system prompt users rarely inspect. Critically, the truncation logic preserves the oldest entries and discards the newest ones, meaning an agent using memory in production for months will progressively lose its most recent corrections and findings first, while stale information from early sessions persists indefinitely. The author, running the system in daily production, measured their own index at 73% of the byte cap despite using under half the line allowance, revealing that the byte limit — not the more visible line count — is the actual constraint most users would be blindsided by.

This matters because it inverts standard advice about memory hygiene. Conventional wisdom says to prune old, presumably less relevant entries; the actual failure mode punishes users who don't realize that old entries are consuming the budget that protects newer, more useful ones. The author traces this to a structural tension: index completeness must scale with everything an agent has learned, but the loading budget is fixed, so any agent used successfully for long enough will eventually collide with the cap. That means this isn't an edge case — it's the predictable endpoint of exactly the kind of sustained, high-trust usage Anthropic wants to encourage. When the author went to report this, they found a prior, more comprehensive governance proposal (GitHub issue #34776) covering the same failure modes — index bottlenecks, correction expiry, priority saturation — had already been closed as "not planned" and labeled stale, with a related silent-truncation report closed as duplicate. Two other issues addressing partial fixes remain open and unresolved.

The more interesting finding is social rather than technical: independent practitioners, without coordinating, converged on nearly identical workarounds. Multiple users with hundreds of hours of autonomous Claude Code usage arrived at the same architecture — treating the index as a pure pointer file rather than storage, splitting memory into "always loaded" rules versus "fetched on demand" knowledge, adding frontmatter for discoverability, and building periodic audit tooling. This convergence suggests the community has identified a real gap in Anthropic's memory architecture that the platform itself doesn't address, forcing every serious long-term user to independently reinvent memory governance as an unofficial, discipline-based layer bolted on top of an undocumented constraint.

Two conceptual points raised in the piece extend beyond this specific bug and speak to broader open problems in agent memory design. First, the distinction between "facts" (retrievable on demand without loss) and "priors" (behavioral tendencies that must fire unprompted, and therefore cannot be tiered into on-demand storage without ceasing to function as priors) challenges the retrieval-augmented-memory paradigm most agent frameworks, including Anthropic's own open proposals, implicitly assume. Second, the observation that silent pruning has no feedback loop — an agent that loses a memory doesn't know what it no longer knows, and neither does the user — describes a failure mode that is undetectable by construction, which is a much harder problem than simply raising a cap. As agentic coding tools move toward longer-running, more autonomous sessions with persistent memory as a selling point, this episode illustrates a recurring tension in the field: infrastructure marketed as enabling long-term agent-human collaboration is often shipped without the governance, observability, or degradation-detection mechanisms that long-term use actually requires, leaving power users to discover the limits — and build the fixes — themselves.

Read original article →