Add privacy controls for conversation history storage in .claude.json
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
- Setting to disable history storage
- Add a
historyEnabled: falsesetting insettings.json - When disabled, don't populate the
historyarrays
- Auto-cleanup setting
- Add a
historyRetentionDayssetting (similar to existingcleanupPeriodDays) - Automatically prune old history entries
- Manual clearing command
- Add
/clear-historyslash command to clear current project's history - Add
claude history clearCLI 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.jsonunderprojects[path].history - Each entry contains the
displaytext and anypastedContents - 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.jsonunderprojects[path].history - Each entry contains the
displaytext and anypastedContents - 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!
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗