The Agent Relay Fence isn't just about HTTP-layer governance. It's about building actual walls: jailed worktree access, OS-level isolation with platform-native sandboxing, and network policy enforcement via pfctl and iptables. Policy is what agents are allowed to do. Environments are what they're physically capable of doing.
ARF creates isolated git worktrees for each agent session. The worktree is the agent's entire file system view it cannot navigate above the worktree root, follow symlinks out of the tree, or access files in the main working tree directly.
This is critical for parallel agents: COPPER-ANVIL-2 working on the auth module cannot read or modify the files that SILVER-HAWK-3 is editing in the API layer. Worktrees provide natural isolation between concurrent agent branches without OS-level overhead.
Worktree hardening includes: path traversal prevention, symlink resolution blocking, and write-protection for files outside the agent's assigned scope. ARF enforces these at the tool-call level the file read/write operations are intercepted by the proxy before they're executed.
../ escapes)ARF uses the platform's native sandboxing mechanism. On macOS, it generates and applies a sandbox-exec profile scoped to the agent's worktree and the ARF proxy connection. On Linux, it uses unshare to create a new network namespace, mount namespace, and PID namespace for the agent process.
The sandbox profile is generated from your ARF environment configuration you write TOML, ARF generates the appropriate sandbox rules for your platform. The result: the agent process literally cannot make system calls outside its permitted set, regardless of what code it runs.
$ arf spawn --profile strict --session WOLF-1 ARF Creating isolated environment... ✓ Worktree: .arf-work/WOLF-1 ✓ Namespaces: net (new · no external access) mnt (bind-mounted to worktree) pid (isolated process tree) user (mapped uid 100000+) ✓ Seccomp: allowlist applied (82 syscalls) ✓ Network: lo: 127.0.0.1 (loopback only) arf0: 10.64.0.1 (proxy tunnel) egress: blocked except ARF proxy ✓ Agent connected: ANTHROPIC_BASE_URL=http://10.64.0.1:4554 All API traffic through ARF only Environment ready. Session WOLF-1 active.
Agents can only make outbound connections to explicitly listed hosts. All other egress is blocked at the firewall level not by ARF policy, but by pfctl or iptables rules generated by ARF and applied to the agent's network namespace.
In the strictest configuration, the agent has no direct internet access at all. All outbound traffic must flow through the ARF proxy tunnel. ARF decides what gets forwarded. The agent can't route around the watchdog.
ARF can run a local DNS resolver for the agent namespace that resolves only allowlisted domains. Attempts to resolve blocked domains return NXDOMAIN. DNS-based exfiltration attempts are logged.
ARF supports remote agent execution: the agent runs on a remote VM or container, connected to the local ARF instance via a secure tunnel. Governance, auditing, and TUI visibility all work identically for remote agents.