[Bug] The .claude.json elephant in the room: Is this "vibe coding" in production?
The .claude.json architectural failure: When "vibe coding" meets production reality
Dear Anthropic team,
After months of watching critical architectural issues go unresolved (#5024, #1449, #6394), while your competitors prepare to launch competing products, I feel compelled to address the elephant in the room with the technical rigor this problem deserves.
The Fundamental Architectural Failure
The .claude.json issue is not a "bug" - it's a textbook violation of basic software engineering principles that any CS undergraduate would recognize:
1. Violation of Single Responsibility Principle (SRP)
Even Bash - a tool from 1989 - understands separation of concerns:
.bashrc→ configuration (static settings, aliases, environment).bash_history→ logs/history (dynamic, growing data)
Claude Code violates this fundamental principle by mixing:
- Static configuration (MCP settings, model preferences)
- Dynamic unbounded data (conversation history growing to 100MB+)
This is not an "expected behavior" - it's an architectural antipattern.
2. Performance Degradation (O(n) Operations)
Current implementation:
// Every. Single. Operation.
const config = JSON.parse(fs.readFileSync(massiveFile)); // O(n)
config.history.push(newEntry);
fs.writeFileSync(massiveFile, JSON.stringify(config)); // O(n)
- Parsing/serializing growing JSON files is O(n) complexity
- Users report 65MB+ files causing startup delays
- 72+ duplicate MCP processes spawning (reported by @vincentortegajr)
- This is amateur hour, not enterprise software
3. Data Integrity & Concurrency Issues
Multiple reports of corruption (#3117, #2593, #6181) because:
- No proper locking mechanisms
- No atomic writes
- No transaction safety
- Concurrent sessions = corrupted JSON
Solution exists since 1970s: Use a database (SQLite would work perfectly).
4. Security & Privacy Nightmare
- Configuration files are commonly version-controlled
- Your implementation forces users to commit conversation history to Git
- Sensitive data, API keys, business logic - all exposed
- This is a compliance disaster waiting to happen
"Moving to cache" is NOT a Solution
Your proposed "fix" of moving to ~/.cache/ is cosmetic theater, not engineering:
- Still unbounded growth ❌
- Still O(n) operations ❌
- Still corruption-prone ❌
- Still no rotation/cleanup ❌
This is hiding garbage under the bed, not taking it out.
Your Own Article Describes This Problem
From ["Vibe coding is not the same as AI-Assisted engineering"](https://addyo.substack.com/p/vibe-coding-is-not-the-same-as-ai):
"It worked for a small dataset, but as soon as real-world traffic hit, the system slowed to a crawl"
This literally describes the .claude.json problem.
"No one could trace what was connected to what... There was no mental model, just vibes"
Is this how Claude Code was developed?
"This isn't engineering, it's hoping"
We're not hoping anymore. We're demanding proper engineering.
The Competition Isn't Waiting
DeepSeek is launching their AI coding agent by end of 2025 (Bloomberg, Sept 2025). They're not dealing with config files that corrupt themselves. Microsoft's Copilot Workspace doesn't mix settings with chat history. Even open-source alternatives understand basic data management.
While you're debating whether to move a broken implementation to a different folder, your competitors are building actual solutions.
The Professional Solution (Not Rocket Science)
# Proper Architecture (CS101):
~/.claude/
├── config.json # Static configuration (5KB)
├── mcp_servers.json # MCP settings (versioned)
└── data/
└── history.db # SQLite for chat history
Benefits:
- ✅ Proper separation of concerns
- ✅ O(1) operations with indexing
- ✅ ACID compliance (no corruption)
- ✅ Built-in rotation/cleanup
- ✅ Version control friendly
Questions for Leadership
- Resource Allocation: With $2B+ funding, why can't you fix a config file issue that any mid-level engineer could resolve in a sprint?
- Quality Assurance: Do you have:
- Engineers who understand SOLID principles?
- QA who uses the product beyond demos?
- Code reviews that would flag this obvious antipattern?
- Or just "prompt engineers" generating solutions?
- Accountability: Who approved shipping production code that:
- Violates basic CS principles
- Ignores 8+ months of user reports
- Damages your technical credibility
Call to Action
Option 1: Fix It Properly
- Implement proper data separation
- Use SQLite or similar for history
- Add rotation/cleanup mechanisms
- Ship it within 30 days
Option 2: Open Source It
- Let the community fix it in a weekend
- We've already built extraction tools (#15)
- We understand the problem better than you apparently do
Option 3: Continue Ignoring
- Watch users migrate to DeepSeek's agent
- Become a cautionary tale about "vibe coding in production"
- Lose technical credibility permanently
Final Technical Assessment
You're asking developers to trust you with AI-assisted coding while demonstrating inability to:
- Separate configuration from data
- Implement basic file management
- Respond to critical issues for 8+ months
- Follow your own published best practices
This is not just a bug. It's a competence crisis.
The community has been patient. We've provided workarounds. We've even quoted your own articles back at you.
What we need now is engineering, not excuses.
Respectfully but urgently,
[Anfrey Kolkov]
---
Technical References:
- #5024 - Unbounded growth (May 2025)
- #1449 - Config/history mixing (May 2025)
- #6394 - Community frustration consolidation (August 2025)
- #3117, #2593, #6181 - Data corruption reports
- [Single Responsibility Principle](https://en.wikipedia.org/wiki/Single-responsibility_principle) - Robert C. Martin, 2003
- [ACID Compliance](https://en.wikipedia.org/wiki/ACID) - Database fundamentals
- [DeepSeek Agent Launch](https://www.bloomberg.com/news/articles/2025-09-04/deepseek-targets-ai-agent-release-by-end-of-year) - Bloomberg, September 2025
Community Evidence:
- "This is nuts to do this in this manner" - @nonrev76
- "IT MAKES THE ENTIRE claude.json COMPLETELY UNUSABLE" - @cosier
- "Totally unacceptable to be storing mutable data in a config file" - @rebuyengine
- Files growing to 65MB+ - Multiple reports
- 72+ duplicate MCP processes - @vincentortegajr
P.S.
If you need help understanding why this is wrong, perhaps ask Claude to explain the Single Responsibility Principle. Or better yet, ask it to review your codebase - it might be horrified by what it finds.
P.P.S.
What is the choice of TS for writing Claude Code worth, when the TS compiler itself is already being rewritten in Go!
18 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
This is not a duplicate as it offers fresh ideas for a solution.
+100 on this
+1,000,000,000,000 on this
+10,000 on this
So I asked Claude Code to analyse its own
.claude.jsonarchitecture:and it said the following:
Share the code with me and I will do all of this!
I came here to write a similar message to yours. So thank you for sparing me of the ordeal.
Unfortunately, I see it's not a very popular issue, though I wish it was.
I can't believe a company like Anthropic put in a configuration file with MCP configurations and other user-level configs, the history junk, allowed tools per folder, and changelog(!?!?!?). What intern from hell designed this??
What's worse is that this wasn't like this from the beginning, unless my memory fails me. I remember when these were separated. I used to, from time to time, edit this file to add or remove an MCP or change some other configuration, and it wasn't a pile of junk.
Anyway, to also offer some solutions.
Please fix this steaming pile of crap in this otherwise pretty brilliant product 🙏
To also offer a solution to all the poor souls who want to clean up this mess. Run this:
jq 'walk(if type == "object" and has("display") and has("pastedContents") then empty else . end)' .claude.jsonNot an ideal solution since new junk will continue to accumulate and you will lose your history, but such is life.
Also, while we're at it, maybe we can also fix the two claude config files that don't really make any sense: the
~/.claude.jsonand~/.claude/settings.json@bcherny - Following up on v2.0.0 release and #8353
Hi Boris,
Congratulations on the v2.0.0 release! The native VS Code extension and new features look great. However, I wanted to respectfully bring your attention to this critical issue that remains unresolved.
Current Situation
.claude.jsonarchitectural issues documented hereThe Impact
This isn't just a minor inconvenience. Users are experiencing:
Constructive Request
I understand major releases involve complex prioritization decisions. Could you please help us understand:
Why This Matters
Your article on ["Claude Code Best Practices"](https://www.anthropic.com/engineering/claude-code-best-practices) emphasizes professional engineering approaches. This architectural issue contradicts those principles by violating SRP and basic data management patterns.
As Claude Code gains adoption in professional environments, stability and performance become critical for maintaining trust.
Moving Forward
Rather than just highlighting problems, here's a minimal fix proposal:
This separation would solve the immediate issues while maintaining backward compatibility through a migration script.
Would you be open to discussing this further? The community is eager to help make Claude Code the reliable tool we all want it to be.
Best regards,
Andrey Kolkov
P.S. - Appreciate all the work you and the team put into Claude Code. We're raising this because we care about the product's success.
---
cc: @anthropic-team
Related: #5024 #1449 #6394 #8353
Excellent comment. Agreed all points.
@anthropics please communicate with the community! Set up a bot if you have to! We are very keen to hear your thoughts. And are here to help.
@dimension-zero They don't want to listen to us at all, ok, let's create our own agent, open source, I guess... :)
Let's not be unkind. The market will fix this.
@dimension-zero Chinese, where there is a communist party, will fix it. ))
https://api-docs.deepseek.com/news/news250929#-api-update
https://www.leidenranking.com/ranking/2024/list - Mathematics and computer science 30 of 30!!!
With blackjack, and h**kers
This is a huge problem that most people probably don't know about. This regularly grinds my progress to a halt.
aargh this still happens all the time. It's December now. I guess i'll use another agent that won't forget about my mcp servers all the time.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This not fixed yet!
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.