# How to monitor Claude Code and other coding agents on a Mac

Each coding agent session runs as a process on your Mac. To see them, open Activity Monitor, type the agent's name, such as claude, into the search field, and each open session appears as a row with its CPU and memory. Sessions left open for days keep their memory until you close them.

Source: https://activityplusmac.com/guides/monitor-claude-code-mac

## See every session

1. Open Activity Monitor and click the Memory tab.
2. Type claude, codex or gemini in the search field.
3. Each row is one session. The Memory column shows what it is holding.

In Terminal, ps aux | grep claude lists the same processes with their process IDs.

## Find out which project a session belongs to

Run lsof -a -p followed by the process ID and -d cwd. It prints the folder the session was started in.

## Why it matters

- Idle sessions add up. A dozen forgotten sessions can hold several gigabytes.
- An agent that starts dev servers or builds leaves those running after it stops.
- When memory is full, the Mac swaps to disk and everything slows down.

## Usage limits are a different thing

How much of your plan you have used is a separate question from what the sessions cost your Mac. See the guide to checking Claude Code usage for that.

## With Activity+

The Agents tab in Activity+ lists every Claude Code, Codex, Gemini CLI and similar session with the project it is in, how long it has been open, and its CPU and memory.

It marks a session as working or idle from its CPU use, which is a guess: it cannot see whether an agent is waiting for you.

It counts Claude Code replies and tokens from the logs on your Mac: this 5-hour window and when it resets, today, the last 7 days, and the split by model. It is what you have used, not a percentage of your plan.

Activity+ has a built-in MCP server, so Claude Code itself can ask what is slowing the Mac or what holds a port. Its five tools only read. The setup command is in Settings.

## Questions

### How much memory does Claude Code use?

It varies with the session, but a few hundred megabytes each is common, and long sessions can grow beyond that. Several open at once add up quickly.

### How do I stop a coding agent that is stuck?

Press Control+C in its terminal window, or close the window. If that fails, find its process in Activity Monitor and quit it there.

### Do idle agent sessions slow down my Mac?

They use little CPU, but they keep their memory. On a Mac that is short of memory, closing sessions you are not using helps.
