← Mac guides

How to stop Claude Code background processes & subagents on Mac

Claude Code can run across multiple terminal tabs, tmux sessions, and IDE panes—and spawn background subagents and MCP server children. Here is how to make sure nothing is still running on your Mac.

Updated 2026-11-19 · macOS 13+ · Also see the Claude Code tool reference

1. Stop inside an active Claude Code terminal

  • Interrupt current turn: Press Escape or Control + C inside Claude Code.
  • Stop background tasks/subagents: Check running background tasks inside the session before exiting with Control + C twice or /exit.
  • Check every shell host: Remember macOS Terminal, iTerm2, Ghostty, Warp, Cursor/VS Code integrated terminals, and detached tmux sessions.

2. Find lingering Claude Code binaries & Node wrappers

Claude Code may run either as a Node CLI (@anthropic-ai/claude-code/cli.js) or as a native binary under ~/.local/share/claude/versions/. Inspect both safely with:

ps -eo pid,ppid,comm,args | grep -Ei "claude-code|[.]local/share/claude/versions|/claude($| )" | grep -v grep

Terminate only confirmed PIDs with kill PID (wait a couple seconds before escalating to kill -9 so files are not left half-written).

3. Check MCP servers and project overrides

Before opening an NDA repository, remember that user-level MCP servers in ~/.claude.json and ~/.claude/settings.json apply globally, while .mcp.json and .claude/settings.local.json live inside individual projects. Run:

claude mcp list

4. Pause Claude Code (processes + configs) in one click

AI Stopper detects all three Claude Code launch modes (CLI binary, Node entry point, and versioned local binary), terminates matching process trees without touching unrelated terminals, snapshots your Claude config files locally, and activates Restart Guard until you click Resume Tools.