v0.1.0
First public release. Hook-based policy guardrails evaluate every coding-agent
tool call locally - before it runs - across Claude Code, Codex, and Cursor. One
install discovers and wires every supported agent on the machine, backed by a
local OPA/Rego policy daemon, an OS-native sandbox, and a styled terminal UI.
Added
- Multi-agent support -
internal/agentsregistry with per-agent hook wiring;
Claude Code path plus anagentjail-hook --agent=cursoradapter, with structured
fail-open markers - Agent auto-discovery - install detects and wires every supported agent on the
machine, including inside thecurl | shone-liner; an interactive multi-select
picker (over/dev/tty) chooses which agents to protect when several are present agentjail-hook- stdin/stdout bridge to the daemon; reads PreToolUse JSON,
dials the per-session Unix socket (30 ms timeout), translatesallow/deny/ask→
exit code; fails-open when the daemon is absentagentjail-daemon- long-running OPA evaluator on a Unix socket; SIGHUP
hot-reload; LRU cache with a static/dynamic split; p95 < 5 ms warm. Projects the
loadedpolicy.yamlinto OPA asdata.agentjail.config(merged over defaults),
canonicalizes request paths +cwd, and keeps the last-good policy on failureagentjail install/status/uninstall/version/help- install
copies binaries, writes the launchd plist, and merges the PreToolUse hook entry
idempotently;~/.agentjail/binis added to PATH automatically- Policy packs -
file_policy.rego(sensitive-path denies:~/.ssh,~/.aws,
~/.gnupg,.env,*.pem/*.key/*.p12, …; allow for the project CWD;
default-ask for unknown),command_policy.rego(dangerous-shell guards:
curl|bash,sudo,rm -rf,git push --force,dd if=/dev/, …), and
mcp_policy.rego(server allowlist + per-tool gating) agentjail policy list/enable/disableplus a user-tunable surface -
agentjail policy add/removecustom rules with an audit log of every change, and a
locked self-protection set the agent can't disable- 6 opt-in hardening library rules (
agentjail policy enable <name>):
no-shell-init-write,no-hook-self-disable,no-app-binary-write,
no-launchctl,no-history-read,no-shell-eval agentjail mcp allow/block/list+ trust-on-install - discovers the MCP
servers already configured in Claude (~/.claude.json), Codex
(~/.codex/config.toml), and Cursor (~/.cursor/mcp.json) and seeds the allowlist
so an existing setup keeps working instead of being denied on first run; each
mutation hot-reloads the daemonagentjail-shield- OS-native sandbox wrapping the agent insandbox-exec
(macOS) or Landlock (Linux) for kernel-level file-access enforcement; fails-open
whensandbox-execis absentagentjail-netproxy- localhost HTTPS forward proxy enforcing
network.allowed_hostsvia CONNECT; wildcard matching; SIGHUP reload; stdlib onlyagentjail try- hands-on, live policy-evaluation walkthroughagentjail logs- color-coded real-time decision stream; follow mode; filters
by action/tool/since; latency and impact display- Styled terminal UI -
internal/uiLip Gloss layer across install, status,
uninstall, version, help, andagentjail logs; palette matches the agentjail.io site - Resolver pattern -
resolver.regodefines the single completedecisionrule
and picks the most-restrictivecandidate(deny > ask > allow); default-ask when no
candidate fires, eliminating rule-conflict errors PolicyConfig-~/.agentjail/policy.yamlschema withmcp,file,
command, andnetworksections; validated on startup; SIGHUP hot-reload- Samples + harness - 5 example policies and 3 example configs (all
dogfood-tested), and a hook → daemon → policy e2e smoke harness with latency in CI - Anonymous telemetry - opt-out usage statistics (OS/arch, version, CLI command
counts, aggregated decision/perf rollups with enum rule IDs) to guide what we
improve. No paths, commands, repo names, or policy contents are ever sent; data is
tied to a random ID. Off in CI; disable withagentjail telemetry disableor
AGENTJAIL_SEND_ANONYMOUS_USAGE_STATS=false.agentjail telemetry viewshows
exactly what's queued. Full data contract indocs/TELEMETRY.md
Security
- Always-on
no-daemon-killandno-hook-self-disablecore rules - an agent
cannot kill the policy daemon or disable its own hook to escape enforcement - Credential-store read denies - reads of
~/.npmrc,~/.pypirc,
~/.git-credentials,~/.docker/config.json,~/.kube/config,
~/.cargo/credentials, and keychains are denied (home-anchored, so project-local
copies stay allowed); mirrored intoagentjail-shield confirm-publishguard -npm/yarn/pnpm publish,gem push,
poetry publish,docker push, andgh release createprompt before running- Identity bound in the parent process before the agent forks
(principal.id/agent/user/cwd_repo/enforce), preventing child-process
identity spoofing
Known limitations (planned for v0.2.0)
- Credential broker not yet integrated - ADR 0004 sketches the design
- MCP reverse proxy is design-only - ADR 0003
- Linux network-egress control requires eBPF / Landlock's network ABI (Linux 6.7+)
- microVM isolation - libkrun + Firecracker integration are spike-complete but not
yet wired into theagentjail-shielddispatch path
License
Apache-2.0.