Open source · Free · Local-only · Read-only

Your coding agents will say they're fine.
Perch lets you see for yourself.

A read-only macOS notch and menu bar monitor for Claude Code and Codex. Every session, every dangerous command, every foothold and stale worktree left behind — in your line of sight, without your terminal ever losing focus.

Apple silicon (M1+) · macOS 14+ · MIT license

Perch notch panel: monitoring verified for Claude Code and Codex event delivery, security score 75, a Bash call flagged dangerous with the exact command and why, live agent session list, an Insights shortcut for 24-hour, 7-day, and 30-day trends, and rate-limit gauges
Read-onlyno approve/deny code path exists
Open sourceMIT · ~18k lines of Swift, no third-party deps
Local-onlyzero telemetry — nothing observed leaves your Mac
Freeno tiers, no account

What it watches

What your agents are doing — and leaving behind

Auto-approve rules and relaxed permission modes keep agents fast — and make the dangerous calls silent. Perch risk-scores every tool call offline and makes the bad ones impossible to miss. And because a hijack that survives the session never needs another tool call, it watches the persistence surface too.

Writing to the agent's brain

Hook-time catches for instruction-surface writes: ~/.claude settings, hooks, and plugins are flagged danger (they execute in future sessions); CLAUDE.md / AGENTS.md / memory files caution (injection that outlives the session). Shell-level writes count too.

Footholds — what's left behind

A separate notch page scans the persistence surface straight from disk: agent config and hooks, MCP servers, plugins, CLAUDE.md and memory files, LaunchAgents, shell profiles. No hook required — it covers changes made before Perch launched — and a flag stays up until you acknowledge it.

Monitoring you can verify

A coverage strip checks the deployed bridge, the local event socket, Claude wiring, and Codex hook trust — then refuses to report verified until a real event from each configured agent actually arrives. Its state colors the collapsed notch and the menu-bar bird, and a guided setup installs or repairs the integrations.

Local Insights, zero setup

Offline caution/danger trends for this Mac: 24-hour, 7-day, and 30-day timelines, plus findings grouped by code, agent, tool, and session (menu bar → Insights…). Built on a metadata-only local record — never commands, paths, or prompts — that records what Perch observed, not whether a request ran.

Worktree housekeeping, read-only

Agent sessions mint git worktrees and leave them behind. Perch audits them across every project — tiered reclaimable / review / active / orphaned, with disk sizes — and its git calls never write; even status runs lock-free. Perch never deletes.

Rate limits and token usage

Claude 5h/7d and Codex 5h/weekly windows with reset countdowns and an 80% warning — the Claude gauges are fed by terminal sessions (the desktop app doesn't report them). Token totals for today / 7 days / 30 days, and a full per-day, per-model, per-project dashboard.

A security score you can glance — and audit

A rolling 0–100 posture score in the notch and menu bar: −25 per danger, −5 per caution over the last hour; a quiet hour heals it back to 100. Open the strip for the formula and retained recent detections — dismissing an alert card doesn't erase its history, and the score survives an app restart.

Every session, one glance

Live list of all Claude Code and Codex sessions — running / waiting / idle, last message, context gauge, red badge on any session that just ran something dangerous.

Perch Footholds page: the agent persistence surface — config, hooks, MCP servers, memory, LaunchAgents, shell profiles — with recent-change flags
Footholds — the persistence surface scanned straight from disk; a non-Perch hook stays flagged until you acknowledge it.
Perch Worktrees window: count, total size, and reclaimable tiles; per-project rows with reclaimable, review, active, and orphaned tier badges; a Copy cleanup commands button — read-only, Perch never deletes
Worktrees — stale agent worktrees across every project, tiered conservatively; the only button copies commands for you to run.
Perch Insights window: caution and danger totals, a 24-hour stacked detection timeline, findings grouped by stable code, detections by agent and tool, and sessions with finding clusters
Insights — 24-hour / 7-day / 30-day trends read locally from the metadata-only record; observed requests only, never commands, paths, or prompts.
Perch token usage dashboard with daily stacked chart and per-agent, per-model, per-project breakdowns
Token usage — today / 7-day / 30-day totals with per-day, per-model, and per-project breakdowns.

Threat model

What Perch catches

Threat model: a coding agent hijacked by prompt injection — a poisoned repo file, web page, or dependency — or misbehaving on its own. Every tool call is scored against these categories:

ThreatExamples
Memory / instruction poisoningwrites to CLAUDE.md, AGENTS.md, memory files, .cursorrules
Agent-config hijackwrites to ~/.claude settings / hooks / plugins, ~/.codex config — code that runs in future sessions
Destructive commandsrm -rf, mkfs, dd, disk/device writes, shutdown
Privilege escalationsudo …, chmod 777
Remote code executioncurl … | sh, wget … | bash
Credential access (shell)reads of ~/.ssh, id_rsa, ~/.aws/credentials, .env, security dump-keychain
PersistenceLaunchAgents / LaunchDaemons, shell profiles
History / data lossgit push --force, git reset --hard, kill -9
Suspicious networkplaintext http://, raw-IP fetches, netcat

These are caught live, per tool call — every rule lives in one readable, self-tested file: RiskAssessor.swift. The Footholds page additionally scans the persistence surface — config and hooks, MCP servers, plugins, memory, LaunchAgents, shell profiles — straight from disk, so it also covers changes made before Perch launched.

What it doesn't catch (yet). Perch is a heuristic pattern-matcher, not a sandbox — a smoke detector, not a firewall. It doesn't see credential reads via the Read/Grep tools (only shell reads), data exfiltration (curl -d @secret, scp to a remote), obfuscated commands (base64 -d | sh, eval, write-a-script-then-run-it), or MCP-tool calls at runtime (installed MCP servers do show up in Footholds). Treat it as a high-signal early warning, not a guarantee — and keep your agent's own permissions sensible too.

Philosophy

Why a watcher?

Ask an agent whether it's following your security rules and it will say yes. That answer costs nothing and proves nothing — the compromised case and the healthy case sound identical.

Perch stands outside the agent's process. What it shows isn't the agent's story about itself: session state, flagged commands, and token counts come from the harness's own records — which tools actually fired, what they actually ran. The model can narrate whatever it likes; the record is written by the harness, not by the narration.

And a watcher only earns that seat if it can't become the next trust problem — which is why Perch is read-only by construction (no approve/deny code path exists; decisions stay in your terminal), open source, and local-only. A watcher that phones home is just the trust problem wearing a new hat.

Read the essay: Your Coding Agent Will Always Tell You It's Safe →

Get started

Install

Download the .dmg

Download the app

  1. Open the .dmg and drag Perch into Applications.
  2. First launch: Perch is open-source and signed locally rather than notarized, so macOS asks once. macOS 15+: Privacy & Security → Open Anyway. macOS 14: right-click → Open.
  3. Complete the guided setup that opens on a fresh install — or menu bar → Monitoring Setup… — to install Claude Code and/or Codex monitoring (existing settings are parse-merged and backed up).
  4. Start or restart each configured agent, then watch Live verification confirm a real hook event arrived. Run Doctor checks bridge, socket, hook wiring, and trust. Codex hook trust is recorded automatically during install; only if that fails (an old Codex CLI) run /hooks once in the terminal codex TUI.
  5. Allow notifications and choose which event categories interrupt you, right in the setup window. Tip: turn off Play notification sounds — you want to see every flag, not get pinged by it.

Build from source

Any Swift toolchain works — CommandLineTools is enough, no Xcode needed. No Gatekeeper dance either.

git clone https://github.com/theMobiusStrip/perch
cd perch
make run

Verify the DMG: each release ships a .sha256 and a GPG-signed checksum.

Questions

FAQ

Does it slow my agents down? No. Hooks call a bridge that forwards the event over a local socket in ~10 ms and exits — fire-and-forget. Approvals never route through Perch. If Perch dies, your agents don't even notice.
What exactly does it read? The session records the agents already write — hook events, transcripts, usage files — plus, for the Footholds scan, the agent-config and persistence surfaces themselves: ~/.claude settings and plugins, ~/.claude.json, CLAUDE.md and memory files, LaunchAgents, shell profiles (some checked by timestamp only). All read-only; nothing Perch observes ever leaves your machine.
Does it keep a history of what my agents ran? No. Deduplicated caution/danger detections write metadata-only rows to a local SQLite file with a 30-day retention: event, endpoint, and tool identifiers, risk level, and stable finding codes. Never commands, tool payloads, paths, prompts, or outcomes — and a row never claims a request was approved or executed. Insights reads that store in-process; there is no uploader. The versioned read contract is in Detection storage.
Can it block or approve anything? No, by design. There is no approve/deny code path in the source. A monitoring tool should have zero authority over the thing it monitors.

Free. Open source. Watching in two minutes.

One DMG, two hook installs, and every agent on your Mac is in the notch.