Claude Code runtime data overwrites .claude.json configuration file

Resolved 💬 3 comments Opened Aug 7, 2025 by ConstTyrone Closed Aug 7, 2025

Here's an issue template you can use to report this problem:

Issue Title:

Claude Code runtime data overwrites .claude.json configuration file

Issue Body:

Description

Claude Code is writing runtime data (project history, chat logs, usage statistics) to the .claude.json configuration file, which should only contain MCP server configurations. This causes conflicts with Claude Desktop and makes the configuration file unusable for its intended purpose.

Expected Behavior

  • .claude.json should only contain MCP server configurations
  • Runtime data (project history, chat logs, tips history) should be stored in a separate file
  • Configuration file should remain clean and human-readable

Actual Behavior

The .claude.json file is being populated with runtime data including:

  • Project histories with chat logs
  • Usage statistics (numStartups, promptQueueUseCount)
  • Tips history
  • User IDs and timestamps
  • Complete conversation histories for each project

Steps to Reproduce

  1. Install Claude Code on Windows
  2. Use Claude Code for any project
  3. Check C:\Users\[username]\.claude.json
  4. Observe that the file contains runtime data instead of just configuration

Example of Current File Content

{
  "numStartups": 42,
  "installMethod": "unknown",
  "autoUpdates": true,
  "tipsHistory": {...},
  "promptQueueUseCount": 17,
  "firstStartTime": "2025-07-15T05:44:33.206Z",
  "userID": "cd85a8ff...",
  "projects": {
    "C:\\Users\\[USERNAME]\\Desktop\\[PROJECT]": {
      "history": [
        {
          "display": "conversation content here",
          "pastedContents": {}
        }
      ],
      // ... more runtime data
    }
  }
}

Expected File Content

{
  "mcpServers": {
    "example-server": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "@example/server"]
    }
  }
}

Environment

  • OS: Windows 11
  • Claude Code Version:1.0.70
  • File Location: C:\Users\[username]\.claude.json

Impact

  1. Cannot properly configure MCP servers
  2. Configuration file becomes extremely large (contains entire chat histories)
  3. Conflicts with Claude Desktop which expects clean configuration
  4. Privacy concern: chat histories stored in what should be a simple config file
  5. File is constantly being rewritten, making manual configuration impossible

Suggested Solution

  • Store runtime data in a separate file (e.g., .claude-runtime.json or in AppData\Roaming\Claude\)
  • Keep .claude.json exclusively for MCP configuration
  • Or use different filenames for different purposes:
  • .claude-config.json for configuration
  • .claude-data.json for runtime data

Additional Context

This issue makes it impossible to maintain proper MCP server configurations as they get overwritten every time Claude Code runs. The file can grow to several MB in size due to accumulated chat histories.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗