Application data and privacy
Beyond config you author, ~/.claude holds data Claude Code writes during sessions — in plaintext. Anything that passes through a tool lands in a transcript on disk: file contents, command output, pasted text. If a tool reads a .env file, that value is in the transcript.
Transcripts, file snapshots, plans, and caches are cleaned up automatically after cleanupPeriodDays (default 30). history.jsonl (every prompt you've typed) and stats-cache.json persist until you delete them.
To reduce exposure: lower cleanupPeriodDays, set CLAUDE_CODE_SKIP_PROMPT_HISTORY, and use permission rules to deny reads of credential files. To wipe one project's state:
# preview the deletion planclaude project purge ~/work/my-repo --dry-run
# delete with confirmationclaude project purge ~/work/my-repo
# everything, non-interactiveclaude project purge --all --yesCheck your understanding
Section titled “Check your understanding”Question 1How are transcripts protected at rest?
Plaintext storage; hence the mitigation levers like cleanupPeriodDays and permission denies on credential files.
Question 2What does claude project purge --dry-run do?
It previews the full plan; the real run asks for confirmation.