Skip to content

[Bug] The .claude.json elephant in the room: Is this "vibe coding" in production? #7243

@kolkov

Description

@kolkov

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:

  • .bashrcconfiguration (static settings, aliases, environment)
  • .bash_historylogs/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

  1. Resource Allocation: With $2B+ funding, why can't you fix a config file issue that any mid-level engineer could resolve in a sprint?

  2. 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?
  3. 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 (I cannot start claude #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:

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions