manuelschipper/nah
a guard that blocks catastrophic agent actions
What it solves
Coding agents like Claude Code, Codex, and Cursor can take destructive actions — deleting files, pushing to main, exfiltrating secrets — and even the best LLM-based safety checks miss a meaningful fraction of risky moves. nah sits in the agent's hook path and blocks the calls it can prove are disasters, so expensive mistakes stop before they happen.
How it works
nah is a single Rust binary. It parses each tool call into typed effects (programs run, files read or written, data leaving the machine, environment access, process behavior), then checks those effects against a catalog of guards. Every decision ends in one of two verdicts: block (a guard found a definite violation) or delegate (no guard blocked, so your runtime's normal permissions handle it). nah never approves anything, so it cannot widen your existing permissions. It logs every decision as structure only, never your command text, and you can inspect logs with nah log and nah why <id>. You can test any command without executing it via nah test. The guard is deterministic and needs no LLM.
Who it's for
Developers and teams who use coding agents and want a safety layer that doesn't rely on probabilistic judgment. It works with 15+ runtimes (Claude Code, Codex, Cursor, and more) and supports Windows, macOS, and Linux. It's especially valuable for protecting against hijacked agents or overeager automation.
Highlights
- 48 built-in guards, 30 on by default, covering eight disaster classes: execution hijacks, secret theft, filesystem destruction, git disasters, infrastructure teardown, lookalike-host network access, package-registry operations, and host power/service-stop actions.
- Deterministic verdicts: block or delegate, no LLM judge, so behavior is predictable and explainable.
- Extensions are just programs in any language that answer
blockorabstain— they can only make nah stricter, and they're pinned to exact trusted bytes. - nah protects itself: it aims to block any tool call that would change nah, with a
nah napwindow for legitimate reconfiguration. - Easy install via
curl -fsSL nahguard.ai/install | shor PowerShell, with per-runtime hooks likenah hook claude install. - Built-in docs:
nah docs <topic>serves the same content as the website and repository.
Related
- Project
- Project
- Project
- Project
- Project