ClaudeFolio

Where Claude Code and Claude Desktop keep logs, settings, and history

Every file Claude Code and the Claude desktop app write to your computer: settings, CLAUDE.md, session transcripts, memory, checkpoints, desktop logs, and claude_desktop_config.json, on Windows, macOS, and Linux. Plus how long history is kept and how to clean it up safely.

·4 min read
Where Claude Code and Claude Desktop keep logs, settings, and history

Sooner or later you need to find a file Claude Code wrote: a log for a bug report, the settings file a guide told you to edit, or last week's session. This guide maps where everything lives on Windows, macOS, and Linux, using Anthropic's documentation on the .claude directory, and notes one place where Windows installs don't match the docs.

The ~/.claude folder

Almost everything Claude Code keeps is in a folder called .claude in your home directory. On macOS and Linux that's ~/.claude. On Windows it's %USERPROFILE%\.claude, which usually means C:\Users\yourname\.claude. If you've set the CLAUDE_CONFIG_DIR environment variable, everything moves there instead.

The files you'll actually touch:

  • settings.json: your personal settings for every project. Claude Code creates it the first time you change an option in /config that it stores there, like the theme.
  • CLAUDE.md: personal instructions that load in every project.
  • agents/, skills/, and commands/: your own subagents, skills, and older-style slash commands.
  • plugins/: installed plugins and cloned marketplaces.
  • projects/: one folder per project, holding that project's session transcripts and memory.
  • file-history/: snapshots of files before Claude edited them, used by checkpoints and /rewind.
  • history.jsonl: the prompts you've typed, with a timestamp and project path.

Next to the folder, not inside it, there's ~/.claude.json. The docs describe it as app state, OAuth, UI toggles, and personal MCP servers. Don't hand-edit it unless you know what you're changing.

Project files

Each project can have its own .claude folder at the repo root. .claude/settings.json is shared settings meant to be committed so your team gets them. .claude/settings.local.json is your personal override for that one project, and Claude Code keeps it out of git when it creates the file. A CLAUDE.md at the repo root holds the project's instructions. The settings, hooks, and permissions guide covers what goes in each.

To see which settings files a session actually loaded, run /status. Its Status tab has a Setting sources line listing each one.

Session transcripts and memory

Every session is saved as a JSONL file at ~/.claude/projects/<project>/<session-id>.jsonl, per the sessions docs. The project folder name is your working directory path with every non-alphanumeric character turned into a dash, so C:\ becomes C--. The format is internal and changes between versions, so don't build scripts that parse it.

Two warnings from the docs. These files are plain text, and anything that passes through a tool ends up in them: file contents, command output, and pasted text. And transcripts aren't encrypted at rest. If you paste a password into a session, it's on disk.

Auto memory sits in the same place, at ~/.claude/projects/<project>/memory/, with a MEMORY.md index and one file per memory. The CLAUDE.md and auto memory guide explains how it gets used.

How long history is kept

Claude Code deletes old transcripts automatically. The setting is cleanupPeriodDays, the default is 30 days, and the minimum is 1. Setting it to 0 fails validation, so the settings reference suggests a large value like 3650 if you want to keep roughly ten years. The sweep is silent: a session older than the limit just stops appearing in the /resume picker.

Two exceptions. Sessions you started or last continued in the Claude desktop app or Cowork are kept at any age, and memory files are never swept.

To get back into a recent session, claude --continue reopens the latest one in the current folder, and claude --resume opens a picker. Sessions run with claude -p don't show up in either.

Claude Desktop logs and config

The desktop app keeps its own files. The MCP documentation lists the config file as %APPDATA%\Claude\claude_desktop_config.json on Windows and ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, with logs in %APPDATA%\Claude\logs and ~/Library/Logs/Claude. mcp.log in that folder records MCP server connections and failures.

On Windows installs from the Microsoft Store or the packaged installer, those paths can be nearly empty. On a current packaged install, the config sits under %LOCALAPPDATA%\Claude-Data\ in a folder named after the app package, and the live logs are in %LOCALAPPDATA%\Claude\Logs, including main.log, mcp.log, and cowork_vm_node.log. Rather than hunting, use the app's menus: Help > Troubleshooting > Show Logs in File Explorer opens the right log folder, and Settings > Developer > Edit Config opens the right config file.

The Claude Code CLI doesn't read claude_desktop_config.json, per the desktop docs. MCP servers you add there show up in the desktop app's chat, not in a terminal session. The app also leaves a README in its data folder asking you not to delete or move anything there. Use Help > Troubleshooting > Reset App Data instead.

Checking, exporting, and cleaning up

  • /doctor checks your installation, settings, extensions, and context use, and offers fixes. If Claude Code won't start at all, run claude doctor from your shell, per the troubleshooting docs.
  • /export saves the current conversation as plain text.
  • claude purge deletes what Claude Code holds for one project, after showing you the full plan and asking you to confirm. Add --all for every project. Before version 2.1.288 the command was claude project purge.
  • Don't delete ~/.claude.json, ~/.claude/settings.json, or ~/.claude/plugins/ to "reset" things. Those hold your login, preferences, and plugins.

Sources

Steps

  1. Open your .claude folder

    Go to ~/.claude on macOS or Linux, or %USERPROFILE%\.claude on Windows, to find settings.json, CLAUDE.md, skills, plugins, and projects.

  2. Check which settings loaded

    Run /status in Claude Code and read the Setting sources line on the Status tab.

  3. Find a past session

    Use claude --resume to pick one, or open ~/.claude/projects and the folder named after your working directory.

  4. Find desktop app logs

    In the Claude desktop app, choose Help, Troubleshooting, Show Logs in File Explorer.

  5. Open the desktop config

    In the desktop app, open Settings, Developer, Edit Config to reach claude_desktop_config.json wherever it lives.

  6. Clean up safely

    Use claude purge for a project's data and set cleanupPeriodDays for retention, instead of deleting files by hand.

Frequently asked questions

Where are Claude Code's settings stored?
Personal settings are in settings.json inside the .claude folder in your home directory, which is %USERPROFILE%\.claude on Windows. Project settings are in .claude/settings.json at the repo root, with personal overrides in .claude/settings.local.json.
Where are Claude desktop logs on Windows?
The docs list %APPDATA%\Claude\logs, but Microsoft Store and packaged installs keep current logs in %LOCALAPPDATA%\Claude\Logs. The reliable way to find them is Help, then Troubleshooting, then Show Logs in File Explorer in the desktop app.
Where is claude_desktop_config.json?
On macOS it's in ~/Library/Application Support/Claude. On Windows the docs list %APPDATA%\Claude, but packaged installs keep it under %LOCALAPPDATA%\Claude-Data. Settings, then Developer, then Edit Config in the app opens the right file.
Where does Claude Code save my conversation history?
Each session is a JSONL file in ~/.claude/projects, in a folder named after your working directory. The files are plain text and not encrypted, and by default Claude Code deletes ones older than 30 days.
How do I keep Claude Code history longer than 30 days?
Set cleanupPeriodDays in your settings.json to a larger number, such as 3650 for about ten years. Setting it to 0 fails validation. Sessions from the desktop app or Cowork are kept at any age.
How do I delete Claude Code's data for a project?
Run claude purge with the project path. It shows the full deletion plan and asks you to confirm before removing anything. Use --all to clear every project. Older versions used claude project purge.

Built something with Claude Code?

ClaudeFolio is the directory of projects built with Claude Code. If this guide helped you ship something, the community would like to see it.

More guides