{
  "video_id": "reddit_1vmpplr",
  "channel_slug": "ClaudeAI",
  "channel_handle": "r/ClaudeAI",
  "title": "PSA: your claude code sessions are on disk as plaintext json, including everything you ever pasted",
  "url": "https://www.reddit.com/r/ClaudeAI/comments/1vmpplr/psa_your_claude_code_sessions_are_on_disk_as/",
  "external_url": null,
  "upload_date": "20260812",
  "published_at": "2026-08-12T20:30:28+00:00",
  "transcript": "i went looking for something i'd done weeks ago & found out claude code keeps the whole thing locally. this seems to be news to a lot of people so here it is.\n\nthey live in `~/.claude/projects/<slugified-path>/<session-id>.jsonl`, one folder per project, one file per session. on windows that's `C:\\Users\\you\\.claude\\projects\\`.\n\neach line is a json object. user turns, assistant turns, and crucially the tool calls & their results, so it's not just the conversation, it's what actually got run and what came back.\n\nthree things that made it worth knowing:\n\ngrep works. `rg \"some command\" ~/.claude/projects` finds the thing you half remember from three weeks ago, in the session where you actually ran it.\n\nyou can audit what an agent really did rather than what it said it did. the tool_result entries are the ground truth.\n\nthey're bigger than you'd think. one project on my machine has 71 session files, and the largest single session is 35mb. if you've been using it daily since launch, that's real disk.\n\nworth knowing: they're plaintext json, so whatever you pasted into a session is sitting there unencrypted. if you've ever pasted a key into a prompt, it's in one of those files.\n\nanyone doing anything smarter with them? i've only got as far as grep.\n\n\n\n--- Top Comments ---\n\n\n[1 upvotes] **TL;DR of the discussion generated automatically after 50 comments.**\n\nThe thread is pretty split on this one. While OP's post is a helpful PSA for some, the top-voted sentiment is a mix of **\"Well, duh, that's a feature\"** and **\"You shouldn't be pasting keys into a prompt in the first place.\"**\n\nHere's the breakdown:\n\n*   **On Pasting Secrets:** The consensus is **don't do it.** However, many users admit they do, especially with `.env` files or other config. The recommended best practice is to **rotate any exposed keys immediately** after the session. One user even shared a story where Claude freaked out after they pasted a private key and told them how to delete the log file.\n\n*   **This is a Feature, Not a Bug:** Power users are all over this. They see the local logs as a massive advantage, not a liability. They're using them to:\n    *   Create a long-term memory system for their projects.\n    *   Have Claude read its own history to recall past decisions or generate runbooks.\n    *   Use `grep` to find old commands or snippets from weeks ago.\n    *   Build custom scripts to archive sessions and create human-readable markdown summaries (check the comments for GitHub links).\n\n* \n\n[102 upvotes] Who would paste a key into a prompt? Do you paste keys into your prompts? You should not paste keys into your prompts.\n\n[20 upvotes] I have Claude sweep them up and then process them into a memory system.\n\n[11 upvotes] Yes, but the format is undocumented and subject to change. You're best off having Claude pull the text out of the json at the end of the session and storing it in your own format that doesn't change.",
  "transcript_chars": 2933,
  "ingested_at": "2026-08-13T01:30:06.481214+00:00",
  "source": "reddit",
  "yt_meta": {
    "score": 212,
    "upvote_ratio": 0.9,
    "num_comments": 90,
    "author": "CoderLuii",
    "is_self": true
  }
}