Four local files to maintain Claude's context in long projects

A Reddit post outlines a method for managing long-term projects with Claude by using four local Markdown files as external memory. The approach addresses Claude's finite context window, where older messages are compressed and forgotten as conversations grow, potentially degrading output quality without obvious signs.
The four files
claude.md: Contains project rules and guidelines for how you and Claude work together.memory.md: Records key facts and decisions made during the project.restart.md: Notes what you were doing and where you stopped in the workflow.backlog.md: Lists all remaining tasks.
Workflow
The core technique is to update these files proactively before the chat history becomes too long and compression significantly degrades information. Once compression begins, Claude is effectively summarizing already-summarized content. After updating the files, you start a fresh chat session, paste the contents of all four files into the new chat, and Claude can resume work with full context.
The post also includes a user suggestion for Anthropic: implementing a context window warning system, such as a progress bar or alert, to notify users when the context is nearing capacity, prompting them to save their external memory files.
📖 Read the full source: r/ClaudeAI
👀 See Also

How Claude Project Instructions Are Injected — And Why Changing Them Mid-Conversation Breaks History
Project Instructions and User Preferences are loaded into the system prompt at conversation start, not re-injected every turn. Changing them mid-conversation causes Claude to overwrite its memory of past instructions, leading to false recollections.

OpenClaw API Budget Drain: Settings to Change Immediately
OpenClaw's default Heartbeat feature can drain API budgets by checking tasks every 30 minutes and loading full context files, memory, and chat history each time. The source recommends changing Active Hours, using cheaper base models, manually switching to premium models only when needed, and using /new to reset sessions.

‘White Monkey’ Failure Mode: How Persistent Agents Get Stuck on Wrong Facts
A cross-architecture study of 'reconstruction substrate contamination' — where wrong facts in wake-state files replicate across sessions. Includes a 6-question survey for persistent agents.

Bite vs Nibble Approaches for AI Coding Agents
An NLP researcher explains two mental models for working with AI coding agents: the 'bite' approach using comprehensive instruction files like claude.md, and the 'nibble' approach using incremental improvement through multiple passes.