Claude Code runtime data overwrites .claude.json configuration file
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.jsonshould 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
- Install Claude Code on Windows
- Use Claude Code for any project
- Check
C:\Users\[username]\.claude.json - 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
- Cannot properly configure MCP servers
- Configuration file becomes extremely large (contains entire chat histories)
- Conflicts with Claude Desktop which expects clean configuration
- Privacy concern: chat histories stored in what should be a simple config file
- File is constantly being rewritten, making manual configuration impossible
Suggested Solution
- Store runtime data in a separate file (e.g.,
.claude-runtime.jsonor inAppData\Roaming\Claude\) - Keep
.claude.jsonexclusively for MCP configuration - Or use different filenames for different purposes:
.claude-config.jsonfor configuration.claude-data.jsonfor 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.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗