v2.9.0
A feature release: one narrow way to reach a host loopback service without
--network, Devin launching pre-authenticated with its installation
protected, Codex starting under macOS Seatbelt again, and two correctness
fixes.
Backward compatible: every pre-2.9.0 .ai-jail keeps working.
Added
-
--forward-port PORTrelays one host loopback port into the sandbox
(#164, closes #158). Without--networkthe sandbox has its own
loopback, so a local MCP server, an editor's IDE socket, or a dev database
on the host's127.0.0.1was unreachable, and--network— the whole
host network back on — was the only way out.--forward-port(repeatable;
forward_portsin the global config) relays exactly that port through a
per-launch Unix socket onto the sandbox's own loopback: the private
network namespace stays up and every other host port stays unreachable.
It composes with filtered egress and--lockdown, is refused with
--network, for ports below 1024, and outside Linux; the agent starts
only once every forward bridge is listening, and a bridge that cannot
bind fails the launch. At most 256 relays run per forward. A forwarded
port is trusted in full — no allowlist, inspection, or audit record — and
only the CLI and global config can open one: a project.ai-jailcannot,
and auto-save and--initnever write one. The host side dials
127.0.0.1first and falls back to[::1]for IPv6-only services.
Thanks @lucascouts. -
Devin launches pre-authenticated with its managed installation protected
(#163).ai-jail devinnow shares the existingdevinstate roots
under$XDG_DATA_HOMEand$XDG_CONFIG_HOME(defaults~/.local/share
and~/.config) read-write — login, settings, and session history — while
the self-managed CLI installation underdevin/clistays pinned:cliis
a mountpoint so it cannot be renamed, andcli/_versionsis read-only on
both backends, with the mutablecurrentselector write-denied by node on
macOS. A present-but-invalid installation falls back conservatively
(read-only data); an absentcli(an external install) shares state
without installation rules. XDG overrides are resolved physically —
symlinked bases and..never collapse lexically — and Devin's API host
server.codeium.comjoins the default filtered-egress table, unioned with
explicit--allow-hostas for the other agents. Thanks @lhzapata. -
chatgpt.comjoins Codex's default filtered egress (#168). Workspace-
backed Codex needs it alongsideapi.openai.comfor ChatGPT OAuth
routing; API-key traffic alone needed only the API host.
Fixed
-
Codex starts again under macOS Seatbelt (#168). Codex 0.162.1 calls
the setuid/bin/psto validate its managed app-server, which Seatbelt
refuses to exec. Non-lockdown Codex launches now get a private,
unprivilegedpsshim (this binary, symlinked into the session temp dir)
that answers only that one PID/start-time query, reading no command lines
or other host process data. The shim also reaches the canonical executable
through symlinked launch paths, and Codex's app-server gets the macOS
services it needs (CFPreferences shared memory, cfprefsd/trustd lookups)
scoped to Codex with--no-agent-stateopting out. Thanks @andrelramos. -
--x11alone passes X11 through, as documented (#167). All X11
handling lived behind--display, so--x11without it gave the sandbox
noDISPLAYand no/tmp/.X11-unix— silently, not even under
--verbose— although every doc describes X11 as its own opt-in. Each
flag now gates its own protocol;--lockdownstill turns both off.
Thanks @diogochaves. -
Auto-save no longer writes opt-ins an untrusted project file would
refuse (#166). Oneai-jail --pictures --no-network truewas enough to
getproject .ai-jail pictures ignored because it weakens the baseline sandboxon every later run: auto-save wrote CLI capability opt-ins into
the project file that the untrusted merge then rejects. Auto-save now
writes exactly what the project layer's own load accepts (tightening
values kept; trusted projects unchanged), so a saved file never warns on
reload, and files polluted by earlier versions clean themselves up.
Thanks @diogochaves.
Documentation
- Host-side git and masks noted as residual risks (#165). The writable
project includes.git/, which host-side git trusts: a program named in
.git/config(for examplecore.fsmonitor) or dropped into.git/hooks/
runs outside the sandbox on the next matching host git operation. The note
says what closes it today (--lockdown,--map .git) and that
--mask/--deny-pathchange only what the sandbox sees — host-side
helpers acting for the agent still read the real files.
Checksums (SHA256)
9a6120a67c0e8d14dd57b06c4b003c28b0e565dd1c8632bf998b3c7f878872a9 ai-jail-linux-x86_64.tar.gz
62b3ece819a899760ef41fa04ab026729703cc388fde486e54b177a7eb253f37 ai-jail-macos-aarch64.tar.gz
Install
brew tap akitaonrails/tap && brew install ai-jail
yay -S ai-jail-bin
cargo install --locked ai-jail