Feature request: Increase MEMORY.md line limit (currently 200 lines)

Resolved 💬 3 comments Opened Mar 24, 2026 by juliobrasa Closed Mar 24, 2026

Problem

With the 1M token context window now available in Claude Opus 4.6, the 200-line hard truncation of MEMORY.md is extremely restrictive for real-world multi-project setups.

  • 200 lines ≈ 4KB of text
  • 4KB is 0.004% of the available 1M token context
  • Even 5,000 lines (~100KB) would be less than 1% of context

Use Case

I manage a 12-agent AI infrastructure across 39 VMs with 15+ active projects, 10+ blogs, email systems, and multiple client websites. The MEMORY.md index needs to reference:

  • Agent configurations and IPs
  • Active projects with links to detail files
  • Credential references
  • Operational rules and feedback
  • Automated systems (crons, publishers, monitors)
  • External server references

Even with aggressive compression (using MEMORY.md purely as an index with one-line entries pointing to individual files), I'm constantly at the 200-line limit and have to make painful tradeoffs about what to include.

Current Workaround

  • Keep MEMORY.md as a minimal index (~80-120 lines)
  • Store all actual content in individual .md files
  • Reference via links that Claude reads on demand
  • This works but means Claude starts every session without key context that would make it immediately productive

Proposal

  • Increase the limit to 2,000-5,000 lines, or
  • Make it configurable via settings.json (e.g., autoMemoryMaxLines: 2000), or
  • Scale the limit based on the model's context window (e.g., 0.5% of max context)

The current 200-line limit made sense when context windows were 8K-32K tokens. With 200K-1M token models, it's an artificial constraint that significantly degrades the multi-session memory experience.

Environment

  • Claude Code 2.1.x
  • Model: Claude Opus 4.6 (1M context)
  • OS: Linux (Debian 12)
  • Use case: Enterprise infrastructure orchestration with persistent memory across sessions

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗