Bug: .claude.json automatically stores conversation history when it shouldn't

Resolved 💬 10 comments Opened May 30, 2025 by vincentortegajr Closed May 30, 2025

Bug Description

The .claude.json configuration file is automatically storing conversation history in a "history" array, which appears to be unintended behavior. This creates privacy concerns and file bloat.

Expected Behavior

The .claude.json file should only contain configuration settings like:

  • userID
  • claudeMaxTier
  • project settings (mcpServers, dontCrawlDirectory, etc.)

Actual Behavior

Claude Code automatically adds a "history" array that stores user messages:

"history": [
  {
    "display": "user message content here",
    "pastedContents": {}
  }
]

Steps to Reproduce

  1. Start a Claude Code session in any project
  2. Send any message
  3. Check .claude.json file - it will contain conversation history

Impact

  • Privacy concerns: sensitive conversations stored in config files
  • File bloat: config files grow with every interaction
  • Version control issues: history gets committed to repos

Environment

  • Claude Code version: Latest
  • Platform: macOS Darwin 24.5.0
  • Node version: v20.19.1

This appears to be a regression or unintended feature that should be removed.

View original on GitHub ↗

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