If you have used Claude Code across multiple sessions on the same project, you have likely experienced it proposing architectures that contradict decisions from three sessions ago. A widely shared developer post published June 2, 2026, confirmed that Anthropic has internally named this failure mode: agentic technical debt.
What Happened
Anthropic's 2026 Agentic Coding Trends Report defines agentic technical debt as "a state where an agent proposes architectures inconsistent with previous decisions due to a lack of persistent specifications." The companion concept, architectural drift, describes the process: Claude re-derives foundational choices every session because those choices were never written down in a form it can consistently reference.
The issue is not a model quality failure. It is a documentation failure.
Why It Matters
Architectural drift compounds quickly at scale. Anthropic's own engineers now merge eight times more code per day than in 2024, with 80% of production code authored by Claude. At that velocity, a codebase without persistent architectural specifications devolves into what developers describe as a "Frankenstein" architecture: individual components work, but the global design has no coherence. Each session optimizes locally while ignoring constraints established in earlier sessions.
Memory tools such as ECC and memory MCPs help with data recall but do not enforce architectural direction. Telling Claude "we use hexagonal architecture" in a prompt is categorically different from specifying it in a living constraint document the model reads at session start.
The Three-Step Fix
The solution requires front-loading documentation most developers skip. Here is how to implement it:
- Write a CLAUDE.md at project root. Define the architecture pattern, tech stack, and explicitly list what is out of scope for the agent. Reference it at the start of every session. Without an out-of-scope list, Claude autonomously rebuilds existing features in ways that conflict with stable code.
- Create an ADRs/ directory. Architecture Decision Records are short documents capturing a decision, its context, and why alternatives were rejected. For every major architectural choice made with Claude Code, write a one-paragraph ADR. In your CLAUDE.md, add: "Architecture decisions are in /ADRs. Read before proposing structural changes." Claude will read these if pointed to them.
- Rebuild the constraint layer retroactively. For existing projects already showing drift, write ADRs from memory for decisions already made. One session of constraint documentation pays forward into all future sessions.
This approach keeps Claude working at scale without treating every session as a blank slate. The model has no architectural memory across sessions by design. Structured documentation is how you provide that memory externally.
What to Do Next
- Add a CLAUDE.md to any active Claude Code project where drift is already visible
- Read the Anthropic 2026 Agentic Coding Trends Report for enterprise-scale patterns and benchmarks
- Start with one ADR per session for new projects; retroactively document the three most consequential past decisions for existing ones
- Treat CLAUDE.md as a living document: update it every time a new architectural decision is locked in