What is the claude process on my Mac?
- It’s Claude Code. A process named
claudeis Anthropic’s coding agent, started from a terminal, an editor extension, the Claude desktop app, or as a background session. Each open session is its own process. - Why it’s heavy: Anthropic says it can use significant resources on large codebases, and warns when a session’s memory passes 2.5 GB. Restarting the session and resuming it with
claude --continuefrees the memory without losing the conversation. - Disk: its data lives in
~/.claude. Old transcripts are deleted after 30 days by default; debug logs, plans and shell snapshots are safe to clear; settings, skills, plugins and each project’s memory are yours to keep.
1. What the claude process is
Claude Code is Anthropic’s agentic coding tool. It reads your project, edits files and runs commands in a terminal session. Whatever launches it, the work happens in a process called claude:
- The native installer puts a launcher at
~/.local/bin/claude, a link into~/.local/share/claude/versions/, and updates it in the background. - Homebrew installs it with
brew install --cask claude-code. - npm installs
@anthropic-ai/claude-code. Anthropic says the package now pulls in the same native binary, which doesn’t use your Node.js when it runs, so it shows up asclauderather thannode. - The Claude desktop app runs its own copy from
~/Library/Application Support/Claude/claude-code/<version>/. - Background sessions, opened with
claude agentsor/bg, keep running under a separate supervisor process after you close the terminal.
To see every copy with its full path and memory in kilobytes:
ps -axo pid,rss,comm | grep -i '[c]laude'
The Claude desktop app’s own processes match too. Commands Claude Code runs for you, such as builds, tests and MCP servers, appear under their own names, so check those as well when the Mac is busy.
2. Why it uses CPU and memory
A session holds the whole conversation in memory: every file it read, every command output and every message. The longer and larger the session, the more it holds. Anthropic’s troubleshooting page lists the usual reasons it gets heavy:
- A long session on a large codebase, with lots of file contents in context.
- Large build or dependency folders it ends up reading.
- A plugin, MCP server or hook doing more than expected.
- Several sessions open at once in different terminal tabs, editors or background sessions, each a full process.
If a session’s heap memory passes 2.5 GB, Claude Code shows a critical memory warning. Activity Monitor’s Memory tab shows each session’s footprint, which makes the heavy one easy to spot.
3. What to do about it
- Compact or restart. Run
/compactto shrink the context, or quit with Ctrl+D twice and runclaude --continueto pick the conversation up in a fresh process. - Start fresh between big tasks instead of keeping one session going all day.
- Keep build output out of reach, for example by listing large build folders in
.gitignore, as Anthropic suggests. - Test without add-ons:
claude --safe-modeturns off plugins, MCP servers, hooks and other customisations. If usage drops, one of them is the cause. - Stop background sessions you’re done with from
claude agentswith Ctrl+X, or withclaude stop.
For disk, see what ~/.claude holds, biggest last:
du -sh ~/.claude/* 2>/dev/null | sort -h
- **
projects/**: session transcripts (.jsonl), subagent transcripts and large tool outputs, plus each project’smemoryfolder. Deleted automatically aftercleanupPeriodDays, 30 by default; set a lower number in~/.claude/settings.jsonto keep less.claude purge <path> --dry-runshows what removing one project’s history would delete. - **
file-history/: snapshots for checkpoint restore.plans/,debug/,session-env/,paste-cache/,tasks/**: per-session data, also swept by age. - **
shell-snapshots/**: removed when a session exits cleanly; leftovers after a crash are swept. - **
todos/,statsig/,logs/**: legacy folders that current versions no longer write; the sweep empties and removes them.
Old versions take space too. A native install keeps them in ~/.local/share/claude/versions; Homebrew keeps old ones until you run brew cleanup. If you ever ran /heapdump, delete the .heapsnapshot file it left on your Desktop: Anthropic warns it contains your full conversation and credentials, and nothing cleans it up.
4. Is it safe to quit or clear?
Quitting is safe. Exit a session with Ctrl+D twice, or Ctrl+C twice at an empty prompt; force-quitting it in Activity Monitor works too, though anything it was in the middle of stops. Transcripts are written as you go, so claude --continue or /resume brings the conversation back. For background sessions, use Ctrl+X in claude agents or claude stop; the supervisor restarts a session process that exits unexpectedly.
In ~/.claude, Anthropic’s documentation says caches and lock files are safe to delete. Keep settings.json, your global CLAUDE.md, skills, agents, plugins, .credentials.json, agent-memory, and the jobs and daemon folders that hold background session state. Deleting projects/ loses resume and rewind for past sessions and every project’s auto memory. Full details are on our page about the ~/.claude folder.
Deleting the whole folder resets Claude Code. Anthropic notes that the VS Code extension, the JetBrains plugin and the desktop app write to ~/.claude as well, so it comes back if any of them is still installed.
Questions
What is the claude process on my Mac?
Claude Code, Anthropic’s coding agent. It runs when you use it in a terminal, an editor extension or the Claude desktop app, and for any background sessions you’ve started.
Why is claude still running when no terminal is open?
Background sessions keep running under Claude Code’s supervisor process. Open claude agents to see them and stop the ones you don’t need. The supervisor also stops idle, unattached sessions after about an hour.
How do I reduce Claude Code’s memory use?
Run /compact, or restart and use claude --continue. Anthropic says the memory warning clears once usage drops back below 2.5 GB.
Is Claude Code a Node.js process?
Not any more. The npm package installs the same native binary as the standalone installer, and Anthropic says that binary doesn’t invoke Node when it runs.
How SiftMac handles it. Its AI files category lists Claude Code sessions in ~/.claude/projects you haven’t touched for the window you set, 30 days by default, never a project’s memory folder, and skips them while a claude process is running. It also lists old copies of Claude Code in ~/.local/share/claude/versions and the desktop app’s claude-code folder, keeping the newest and the one your claude command uses.
Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works