Skip to content

Instantly share code, notes, and snippets.

View Kevthetech143's full-sized avatar

Kevthetech143

View GitHub Profile
@Kevthetech143
Kevthetech143 / claude-code-secret-memory.md
Created November 2, 2025 16:33
Investigation: Claude Code's undocumented post-compact .md file auto-read behavior

Claude Code's Secret Memory System (And How to Use It)

Discovered what seems to be undocumented behavior using a clever testing trick. If I missed something in the docs, let me know!

What I Found

Put files in ~/.claude/ folder → Claude reads them after you compact → Your instructions survive!

But there are rules (or at least what I observed):

  • Only reads 5 files max (picks alphabetically if you have more)