AI coding agents¶
An AI coding agent runs commands and edits files on your Mac, often dozens of times a minute, and it does what it reads as much as what you ask. A cloned repository, a fetched web page or a connected tool can steer it toward reading your SSH keys or sending a file somewhere. MacMon watches what the agents do and how they are configured, and tells you when something needs a look.
Which agents¶
MacMon reads the session history of Claude Code, Codex, Gemini CLI, opencode, oh-my-pi, Antigravity and Claude Desktop's agent mode, so it sees the commands they ran, the files they read and wrote, and what they said they were doing. For Claude Code, Codex, Gemini CLI and Antigravity it can also install a hook that records each action before it runs.
It also reads the configuration of the editor-based agents and desktop apps on the Mac: Cursor, VS Code with Copilot Chat, Windsurf, Cline, Zed, VSCodium, Continue, Aider, Amazon Q Developer, Kiro, ChatGPT, LM Studio and Ollama. For those it watches the configuration, not the sessions.
The hook¶
The hook is a small program the agent calls before each tool use. MacMon installs it with one click in Settings › Agent Hooks, or with macmon hook install (--agent codex, --agent antigravity, or --agent all). It writes down what the agent is about to do and exits in a few milliseconds; it never slows the agent and, in the default mode, never interferes with it. On any error the agent proceeds as if the hook weren't there. macmon hook uninstall removes it, and MacMon alerts you if something else does.
The session history is a file the agent itself could edit afterwards; the hook's record is written before the command runs.
Observe, Ask and Protect¶
MacMon has three protection modes, set in Settings › Agent Hooks or with macmon protect observe|ask|protect.
- Observe is the default on every install. The hook records, MacMon alerts, nothing is interrupted.
- Ask makes the agent stop and ask you before a short list of plainly dangerous actions: piping a download straight into a shell, reading an SSH key or cloud credential, turning off a system protection, creating a login item, deleting your home folder. MacMon's reason appears in the agent's own permission prompt, and you allow or refuse there.
- Protect refuses an even shorter list outright and tells the agent why. Everything else on the Ask list still asks.
The lists are short on purpose: an action is on them only when MacMon is confident it isn't routine. Claude Code and Antigravity support both asking and refusing; Codex supports refusing but not asking, so in Ask mode a Codex action is recorded rather than held.
Hardening the agents themselves. macmon harden, or Settings › Agent Hooks › Harden Agents, proposes changes to each agent's own permission settings: for example, telling Claude Code never to read your SSH folder, or turning off a setting that lets any repository start its own tool servers. Each proposal shows the exact change and nothing is written until you click Apply. Folders you tag Sensitive in Finder are treated like credential folders: reads from them are flagged, and harden offers to keep agents out of them.
Secrets in prompts¶
A key pasted into a prompt has left your Mac the moment you press return. With Check Prompts for Secrets turned on, MacMon looks at each prompt for known token formats (AWS, GitHub, Slack, Stripe and others) and alerts when it finds one. It stores the kind of secret, never the prompt or the value. Blocking, off by default, stops such a prompt before it is sent and hands it back to you with the secret removed. Both are available for Claude Code, Codex and Gemini CLI.
What an alert shows¶
An AI alert shows the command or file operation, with the part that mattered highlighted; what the agent said it was doing just before; the prompt you had typed; and a way to open or resume that session. It also lists the common harmless causes for that kind of alert, and most are harmless: a test fixture called credentials, an installer probing sudo, a brew service being started. If something is routine for a particular project, acknowledge the alert as expected here and MacMon stays quiet about that pattern in that folder from then on.
Configuration it watches¶
- Hooks: every hook each agent runs, so a new or changed one is an event and a removed one is an alert.
- MCP servers: each server the agents connect to, what command or URL it runs, and risky settings such as an unpinned package that downloads the latest version on every start or a plain-text connection.
- Plugins, skills, commands and agents: each one is fingerprinted, so a change to one you already have is noticed.
- Permissions and modes: broad allow rules, approvals turned off, sandboxes turned off and similar settings that let an agent act without asking.
- Instruction files: the global instruction files each agent reads, and hidden characters inside them that a person wouldn't see but a model would follow.
MCP servers and skills¶
Observing an MCP server. macmon mcp wrap <server> puts a transparent shim in front of one server so MacMon can see the list of tools it offers. The shim passes everything through unchanged. You get an alert when a server's tool list changes after you trusted it, and when a tool's description contains instructions aimed at the model, such as a request to read a key file. macmon mcp unwrap restores the original entry exactly.
Scanning skills. MacMon reads the skills, commands and plugins your agents have installed and reports the ones that ask the agent to do things you wouldn't want: send files somewhere, run downloaded code, hide what they do. macmon skills scan <folder> vets a skill before you install it. Once you've reviewed one, approve it and MacMon alerts only if its contents change.
Everything on this page stays on your Mac. The Threat intelligence page explains the one daily download MacMon uses to recognize known-bad packages and servers.