Claude Code now forgets earlier. Your project memory should not live in the chat.
Anthropic's Claude Code team just changed when auto-compact kicks in for 1M-context models: from ~97% of the window (~967K tokens) down to 40% (400K). The reasoning is sound β every new message re-reads the whole convers
Anthropic's Claude Code team just changed when auto-compact kicks in for 1M-context models: from ~97% of the window (~967K tokens) down to 40% (400K). The reasoning is sound β every new message re-reads the whole conversation, so shorter histories burn far less usage.
But compaction has a cost nobody should gloss over, and the team said it themselves: compaction replaces the entire conversation with a summary. It does not keep your last million tokens intact. Fine details from early in a session β the exact error you chased for an hour, the file you read at the start, the decision you made and why β can quietly disappear, and the agent carries on from the summary as if nothing was lost.
This is the exact failure mode I built DevOS to remove.
DevOS (open source, Apache-2.0) keeps your project's memory on disk, outside the chat:
- A deterministic, zero-token scan builds a knowledge graph of your repo β files, symbols, imports, dependencies β with provenance and confidence for every fact.
-
remember/recallgive the agent persistent project memory that survives new sessions, new models, and yes, compaction. - An MCP server (5 tools) lets Claude Code, Cursor or OpenCode pull that memory back the moment a fresh or compacted session starts.
-
devos askcompiles the smallest secret-free context pack for a task, with a real token count, instead of re-dumping whole files into the window.
npx devos-os scan .
npx devos-os ask . "where is the auth middleware?"
The chat is a working surface. It was never a database. As context windows get bigger and compaction gets earlier, the tools that treat memory as a file on disk β not a scrollback β are the ones whose agents will still know your project next week.
Repo: https://github.com/fahmymohsen777-cmd/devos β feedback welcome, especially from anyone who has watched an agent lose the thread after a compact.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.