[DOCS] ~/.claude/ directory is undocumented — community deep dive available for incorporation

Status Fixed / completed
Maintainer reply None cached
Activity 5 comments · opened Apr 4, 2026 · closed Apr 7, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://ramonactruta.substack.com/p/inside-claude-structure-is-not-security

Section/Topic

~/.claude/ directory — session storage, file formats, and security implications

Current Documentation

There is no documentation for the ~/.claude/ directory.

What's Wrong or Missing?

The ~/.claude/ directory is completely undocumented. Every Claude Code user
has this directory on their machine. It contains:

  • Complete conversation history in plaintext JSONL (projects/ folder)
  • Every prompt ever typed (history.jsonl)
  • Sub-agent task descriptions (.meta.json files)
  • Shell environment snapshots (shell-snapshots/)
  • Usage statistics and token counts (stats-cache.json)
  • A Statsig stable ID — persistent anonymous identifier across sessions
  • A plugin blocklist refreshed remotely during active sessions
  • Abandoned agent task lists (todos/)

Users have no way to know what is stored, that storage is unencrypted
plaintext, or that any secrets passing through tool results are written
to disk. This is both a documentation gap and a security/privacy gap.

Suggested Improvement

Add a ~/.claude/ reference page to the official docs covering:

  • Full directory structure with explanation of each folder/file
  • File formats (JSONL schema, meta.json, etc.)
  • What is stored and for how long
  • Security implications (plaintext storage, credential exposure risk)
  • How to read and interpret session files

A detailed community-written guide already exists and is available as
a starting point:
Inside ~/.claude/: Structure is Not Security

Impact

High - Prevents users from using a feature

Additional Context

The linked community article was written by reading actual files from a real installation and verified against the actual directory structure. Multiple community members have noted it should be incorporated into official documentation.

View original on GitHub ↗

5 Comments

github-actions[bot] · 4 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/41263

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

rctruta · 4 months ago

This issue (#43675) is related but not a duplicate.

#41263 is scoped specifically to history.jsonl and its absence from
two doc pages. The suggested fix there is a short note and a table entry.

This issue covers the entire ~/.claude/ directory — session transcripts,
sub-agent files, shell snapshots, statsig identifiers, remotely-refreshed
plugin blocklists, and the security implications of everything being stored
in unencrypted plaintext. The scope and the concern are different.

A fix to #41263 would not close issue #43675.

MJMcGuffin · 4 months ago

Anthropic should document this and indicate how to wipe the different kinds of data inside ~/.claude/

jeff-skoldberg-gmds · 4 months ago

How is this not documented?

github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.