Add privacy controls for conversation history storage in .claude.json

Resolved 💬 3 comments Opened Oct 10, 2025 by gitmor Closed Oct 14, 2025

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

## Feature Request: Privacy Controls for Conversation History

### Problem
Claude Code currently stores all user prompts in the history array within ~/.claude.json for each project. While this enables useful features like command history (Ctrl+R)
and context for resuming conversations, there's no way for users to:

  • Disable history storage
  • Automatically clear old history
  • Manually clear history without editing the JSON file

For users working with sensitive information or who value privacy, having all questions permanently stored locally without control is concerning.

Proposed Solution

### Proposed Solutions

  1. Setting to disable history storage
  • Add a historyEnabled: false setting in settings.json
  • When disabled, don't populate the history arrays
  1. Auto-cleanup setting
  • Add a historyRetentionDays setting (similar to existing cleanupPeriodDays)
  • Automatically prune old history entries
  1. Manual clearing command
  • Add /clear-history slash command to clear current project's history
  • Add claude history clear CLI command with options like:
  • --project (clear specific project)
  • --all (clear all projects)
  • --older-than <days>

Alternative Solutions

### Current Workaround
Manually edit ~/.claude.json and delete history arrays, but this is error-prone and not user-friendly.

### Additional Context

  • History is stored in ~/.claude.json under projects[path].history
  • Each entry contains the display text and any pastedContents
  • File location: ~/.claude.json (or /home/user/.claude.json)

Would appreciate any of these options to give users more control over their local data storage!

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Use Case Example

_No response_

Additional Context

### Additional Context

  • History is stored in ~/.claude.json under projects[path].history
  • Each entry contains the display text and any pastedContents
  • File location: ~/.claude.json (or /home/user/.claude.json)

Would appreciate any of these options to give users more control over their local data storage!

View original on GitHub ↗

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