Claude Code memory: how to survive a 200k context window filling up
Claude Code memory: how to survive a 200k context window filling up If you've used Claude Code for more than a few hours on a big project, you've hit this wall. You're in the middle of a refactor. ...

Source: DEV Community
Claude Code memory: how to survive a 200k context window filling up If you've used Claude Code for more than a few hours on a big project, you've hit this wall. You're in the middle of a refactor. Claude is tracking 15 files, your CLAUDE.md, the conversation history, tool call outputs. Then it slows down. Responses get shorter. It starts forgetting things you told it an hour ago. You're not imagining it. Claude Code's context window is filling up — and there's a specific way to handle it. What's actually consuming your context ClaudeCode tracks several layers of context simultaneously: ┌─────────────────────────────────────┐ │ System prompt (CLAUDE.md) ~2k │ │ Project context (settings) ~1k │ │ Conversation history fills │ │ Tool call results large │ │ File contents (read_file) large │ │ Available: 200k total │ └─────────────────────────────────────┘ The biggest culprits: Tool call results — every read_file, bash, grep appends its full output Long conversation threads — each message ad