How to pause Claude Code, Codex, and Cursor on Mac
Quit the app or end the terminal session to stop a single coding agent. If you run several agents plus MCP servers, verify leftover processes and configs before switching to sensitive work or closing your laptop.
1. Stop a single session manually
- Save open files first. Check whether an agent is mid-edit or running tests before interrupting it.
- End terminal agents (Claude Code, Codex CLI, Gemini CLI, Aider, OpenCode): Press Control + C to interrupt an active task, then exit the session. Check other terminal tabs, tmux panes, and VS Code integrated terminals for additional copies.
- Quit desktop apps fully (Cursor, Windsurf, ChatGPT/Codex, Claude Desktop): Press Command + Q. Closing the last window on macOS often leaves Electron helpers and MCP servers running in the background.
2. Check for leftover AI processes in Terminal or Activity Monitor
Even after closing windows, CLI wrappers, local models, or background subagents can remain alive. Run a read-only check in Terminal to inspect active processes:
ps -eo pid,ppid,comm,args | grep -Ei "claude|codex|cursor|windsurf|ollama|gemini|aider|opencode" | grep -v grep
You can also open Activity Monitor and search for each tool name. Apple’s Activity Monitor guide explains when to use Quit versus Force Quit.
3. Pause several AI tools together with AI Stopper
When you juggle multiple agents—plus background Ollama services or MCP servers—doing this manually every time gets error-prone.
Open AI Stopper and select Details to see every detected tool and config path across all 33 supported tools. Toggle individual tools for a partial pause, or click Pause All Tools in the macOS menu bar after saving your work.
- Stops exact matching process trees and Homebrew services without touching unrelated commands.
- Temporarily moves supported config, MCP, and auth files into a crash-safe local snapshot under
~/.aistopper/. - Activates Restart Guard so paused tools cannot quietly relaunch while you work.
- Click Resume Tools (or use AI Stopper Recovery) to restore your saved configs cleanly.
4. Check the network separately
If you also want to block outbound connections to known AI endpoints on your Mac, see our guide on temporarily blocking AI domains on Mac. Remember that browser tabs, remote server jobs, and cloud agents run outside your Mac and must be stopped in their own dashboards.