🤖 AI Summary
Claude Code’s local history file (~/.claude.json) currently accumulates full conversation histories for every project indefinitely, including entire conversation context, pasted contents and metadata. Over weeks/months this leads to growing file sizes (observed 968KB and reported to reach hundreds of MB), slower Claude Code startup, potential system slowdowns, and no automatic cleanup. The only available fixes today are manual editing (risky—can corrupt MCP server config) or `claude history clear`, which wipes all history globally.
This is significant for AI/ML practitioners who run many experiments or projects: large local history files slow developer tools, waste disk space, and complicate management of model interaction logs. Key technical issues are lack of retention limits or rotation, history stored alongside configuration, and no per-project pruning commands. Recommended fixes include automatic rotation/size limits (e.g., last N conversations per project), configurable retention windows (e.g., --older-than 30d), separating config from history storage, a `claude history prune` CLI, and file-size warnings. Implementing these would preserve useful local context while preventing bloat, improving startup latency, and reducing the risk of accidental data loss during manual cleanup.
Loading comments...
login to comment
loading comments...
no comments yet