Moat runs AI coding agents in isolated containers with credential injection, network policy enforcement, operation-level policy on tool calls and API traffic, and full observability. The core loop — declare what your agent needs in moat.yaml, run it in an isolated container, and audit everything it did — has stayed the same since v0.1. The runtime layer has broadened from Docker-only to Apple containers and Rancher Desktop, the proxy runs as a shared daemon that scopes credentials per run, and gatekeeper ships the credential-injecting proxy as a standalone binary for use outside the moat runtime.
Moat is pre-1.0. The CLI interface and moat.yaml schema may change between minor versions. Breaking changes are listed under Breaking headings below.
Adds saved-conversation continuation for Pi and Codex, and fixes endpoint routes disappearing during long-running sessions. Active runs now recover lost routes and routing listeners automatically.
- Pi and Codex continuation —
moat pi --continueandmoat codex --continue(-c) resume saved conversations, including non-interactive-pprompts. Pi requires a previous run with transcript persistence enabled; Codex continuation uses workspace-isolated histories and rejects shared sessions. (#497)
- Fix silently losing Codex transcripts when the session directory cannot be created — runs with transcript persistence enabled now fail with an error instead of starting without saved history. This also applies when persistence is enabled by default through an OpenAI grant. Check the reported directory's permissions and available disk space. (#497)
- Fix endpoint routes disappearing until a run was restarted — loading historical runs no longer deletes newer routes with the same name, and cleanup checks container ownership even when ports are reused. Active runs restore lost routes and routing listeners every 30 seconds; proxy takeover is serialized across processes. Legacy routes without ownership records remain until name reuse or reconciliation confirms that they are unreachable. (#498)
Fixes a strict-policy bug on Docker on Linux that blocked all outbound traffic on the host, and adds commands to inspect, reset, and remove credential profiles. Strict runs on Linux now reach host services through moat-host instead of localhost.
- Profile management commands —
moat profile listshows configured and implicit profiles, active selection, inheritance, and errors per profile.moat profile show [name]shows lookup order and environment variable names without exposing values.reset <name>clears local grants, SSH mappings, and exclusions while preserving settings;remove <name>also deletes settings and refuses profiles with dependent children. Inspection supports JSON; reset and removal support confirmation,--force, and validated--dry-run, and coordinate with credential refreshes. (#492)
- Strict-policy runs on Docker on Linux now get their own network namespace, so
localhostand127.0.0.1inside the container refer to the container rather than the host. To reach a host service allowed bynetwork.host, usemoat-host($MOAT_HOST_GATEWAY). (#495)
- Fix strict-policy firewall rules landing on the host — previously,
network.policy: strictruns on Docker on Linux without gVisor (for example--no-sandboxon WSL2) shared the host network namespace, so the container'sNET_ADMINiptables setup flushed the host'sOUTPUTchain and appended aDROPrule, cutting every new outbound connection on the machine, including the proxy daemon's upstream requests. Strict runs no longer use host networking, and firewall setup refuses host-network containers. If you ran a strict run this way, reboot (the rules do not persist) or reload your firewall (sudo ufw reload,sudo firewall-cmd --reload) to restore the host's ownOUTPUTrules, which the flush removed. To check for leftovers, runsudo iptables -S OUTPUTandsudo ip6tables -S OUTPUT, plusiptables-legacy/ip6tables-legacyif installed. (#495)
Accepts security-patch pins within maintained dependency lines and tracks upstream end-of-life dates with a daily catalog refresh. Fixes Linux bind-mode init-file staging and restores E2E CI failure reporting.
- Daily dependency support refresh opens a PR with upstream lifecycle dates and maintained release lines. Defaults advance only when their current line reaches EOL; the initial refresh advances Go from 1.25 to 1.27. (#491)
- Known upstream end-of-life runtime and service lines are rejected, including Node.js 20 and older. Replace retired pins in
moat.yamlwith a maintained line frommoat deps info <name>. Conflicting explicit pins now produce an error; keep one explicit version per dependency. (#491)
- Fix explicit dependency versions being rejected before image building — previously, static lists blocked newer Node.js, Python, PostgreSQL, MySQL, Redis, and Ollama releases and patch pins. Patch pins within maintained lines and unknown newer releases now pass through to upstream resolution. Projects without an EOL policy do not receive an inferred age cutoff. (#491)
- Fix explicit versions being silently replaced by installer defaults — requested apt, npm, uv-tool, and custom CLI pins now reach their installers, exact Node pins use official archives, and mixed-runtime or custom-base Python builds preserve the requested interpreter. Existing image caches rebuild for these installation changes. (#491)
- Fix staging init files under an image-owned directory in Linux bind mode — previously, startup failed when the workspace UID tried to chmod a parent owned by moatuser. Foreign directory modes now stay unchanged while staged files remain private at 0600. (#491)
- Fix E2E CI reporting success after failed tests — previously,
wait … || truediscarded the test exit status; the workflow now preserves it. Entrypoint privilege-drop scenarios now exercise root startup in volume mode, bind-mode identity has a separate check, and the Pi session test supplies a writable Moat home on Linux. (#491) - Fix a timing-sensitive audit collector test in CI — previously, it checked the entry count after a fixed 100 ms sleep; it now waits for asynchronous ingestion with a timeout. (#490)
Adds GitHub workspace access restrictions and the Supabase CLI grant, and fixes Datadog OAuth discovery, Vercel authentication, and interactive Codex joins. The proxy moves to gatekeeper v0.37; building from source now requires Go 1.27.3, and existing installations should run moat proxy restart after upgrading.
- GitHub workspace scope —
github.scope: workspaceinmoat.yamllimits pushes and other GitHub writes made with the github grant to the repositories checked out in the workspace (nested clones, worktrees, and submodules included; dependency directories such asnode_modulesandvendorskipped). The proxy enforces it with a Keep policy coveringgit push, LFS uploads, the REST API, and GraphQL mutations (only comments and similar discussion are allowed without naming an approved repository);github.other_repos: nonealso blocks reads of other repositories over git and REST. The first run approves what it finds. A repository that appears later — a new clone, or a re-pointed remote — stays read-only until you approve it at a prompt or withmoat github allow. Approvals live in~/.moat/github-repos.json, outside the workspace, and a scoped project stays scoped aftermoat.yamldrops the setting untilmoat github forget --all. Runs that also have anssh:grant, a github-granted MCP server, or Copilot fail before starting. See Scoping GitHub access to the workspace. (#488) moat githubcommands —repos,allow,forget, andpolicyshow and change the current project's approved repositories and print the Keep policy its runs use. (#488)params.queryinnetwork.keep_policyrules — the raw query string of each HTTPS request. (#488)- Supabase CLI grant —
moat grant supabasecan import an existing host Supabase CLI login with confirmation, useSUPABASE_ACCESS_TOKEN, or prompt for a personal access token. Runs with this grant install the Supabase CLI automatically. The container receives a CLI-compatible placeholder while the proxy injects the real token for the Management API. (#487)
- Registered Keep policies now persist across proxy restarts. After upgrading and running
moat proxy restart, recreate legacy GitHub runs that have no saved policy snapshot; they are not restored with unrestricted credentials. (#488) - The proxy daemon is built on gatekeeper v0.37 (previously v0.23.2), and moat now requires Go 1.27.3 to build. Run
moat proxy restartafter upgrading so the daemon runs the new binary. Blocked responses keep moat's wording, and new installs keep the "Moat CA" certificate name. (#488) - A
network.keep_policybody rule (one that readsparams.body) with anoperationnow makes only matching requests JSON-only. Previously any body rule made every request in thehttpscope fail closed on a non-JSON body. Body rules without anoperationbehave as before. (#488) - The Vercel grant now installs the Vercel CLI automatically and injects credentials only for
api.vercel.com, removing the previous*.vercel.commatch. If you need injection for another Vercel host, open an issue with the hostname. (#487)
- The proxy no longer sends a credential over plain HTTP to a remote host. Previously, a
claude.base_urlsuch ashttp://gateway.example.comreceived the key unencrypted; the request is now refused with403.localhostendpoints and host-localhttp://localhostMCP servers are unaffected because their traffic stays on the machine. If you use a remotehttp://endpoint, switch it tohttps://. (#488)
- Fix OAuth discovery for authorization servers with issuer paths — previously,
moat grant oauth datadog --url https://mcp.us5.datadoghq.com/v1/mcpfailed with a metadata 404 because discovery appended the well-known path after/v1/mcp. Discovery now uses the RFC 8414 location first and retains legacy OAuth and OIDC fallbacks. Discovered metadata must declare the requested issuer exactly. Servers that omitissueror differ from the protected resourceauthorization_serversvalue (including trailing slashes, host casing, or port spelling) must correct their metadata before discovery can succeed. (#489) - Fix interactive Codex joins being rejected by background-server feature mismatches — joined sessions now use an embedded server when the installed Codex supports it, without restarting the primary session's daemon. (#486)
- Fix
network.keep_policyfiles that usedefsfailing to load — previously, validation compiled eachwhenexpression without substituting defs and reported "undeclared reference". (#488) - Fix Vercel CLI token rejection — previously, the CLI rejected Moat's placeholder before making an API request; the grant now supplies a CLI-compatible value. (#487)
Adds credential profile inheritance and opt-in Pi transcript forwarding, and fixes Linux/WSL startup, Pi backend and model selection, credential revocation, and host clipboard syncing. Cached run images rebuild once.
- Pi transcript forwarding — enable
pi.sync_logs: trueormoat pi --sync-logsto retain conversation history under~/.moat/pi/sessions/<workspace-slug>/after container removal. Syncing defaults off and keeps each workspace separate. (#484) - Credential profile inheritance — create a profile with
moat profile create NAME --inherit PARENTor--inherit-default, then override individual grants locally. Credentials, SSH host mappings, environment variables, and implicit agent grants follow the parent chain; revocations exclude grants without changing the parent, and OAuth refreshes update the owning profile. (#479)
- Fix copies from Codex and Pi reaching only the container clipboard — new text selections now update the host clipboard while attached, with image pasting preserved. Pi defaults to regular terminal mode so mouse selection also works on Moat's footer. (#483)
- Fix Pi startup without an explicit model — previously, selecting or inferring a backend without
pi.modelpassed--provideralone, which Pi rejects. Moat now lists models inside the container and selects the first model ordered by ID for the chosen backend; an empty or failed listing stops startup. Pinpi.modelfor a consistent choice. (#482) - Fix revoking unreadable credentials — previously,
moat revoketried to decrypt credentials before deleting them, so credentials encrypted with an old key or damaged on disk could not be revoked. Revocation now checks their source without decrypting them and preserves profile inheritance exclusions. (#481) - Fix Pi startup with an explicitly selected backend when another backend's credential is unreadable — previously, preflight decrypted every backend's credential before applying
--providerorpi.provider. Explicit selection now reads only the selected backend's credential; automatic inference still checks all backends. (#480) - Fix agent staging on Linux when the workspace owner's UID has no account in the image — previously,
HOME=/caused permission errors, and files owned bymoatusercould not be overwritten or chmodded. The entrypoint now falls back to/home/moatuser, replaces foreign-owned staged files, and preserves an existing account's home. Images pre-create~/.codexand make home directories writable without changing file permissions, including SSH config and private keys. (#478) - Fix gVisor runs hanging without network access when no ports are published — previously, Docker host networking left a default
runscsandbox with no network interfaces. gVisor runs now use bridge networking and reach the proxy through the host gateway. (#478)
Restores Codex 0.160.1 subscription startup and inference by supporting workspace routing discovery with Moat's synthetic account identity. Adds process-inspection tools to run images and rejects development builds that still embed the placeholder container entrypoint; cached run images rebuild once, and an already-running proxy needs moat proxy restart after upgrading.
- Fix
moat codexfailing during workspace routing discovery — previously, the discovery endpoint received placeholder credentials, and allowing that endpoint alone still left the real response account ID inconsistent with the synthetic identity in the container. Moat now injects the credential pair on the ChatGPT discovery endpoint and maps the selected response identity back to its placeholder, preserving the server's routing constraints and error responses. (#477) - Fix agent process inspection failing with
ps: command not found— previously, base run images and generated install scripts omittedprocps. Both now install it, and base package changes invalidate cached run images. (#477) - Fix development builds attempting to start containers with the embedded
moat-initstub — previously, building without generating the Linux entrypoint binaries could fail only after container startup. Moat now rejects the stub before building or reusing an image and directs developers tomake build. (#477)
Fixes moat grant codex and Codex subscription runs failing on any Codex CLI newer than 0.154. Codex releases newer than the verified range now produce a warning instead of an error, and the default codex-cli image version moves to 0.160.1, so cached Codex images rebuild once.
- Fix
moat grant codexfailing on any Codex CLI newer than 0.154 — previously, the subscription-auth version check was a hard ceiling, so updating Codex (0.155.1 is whatnpm i -g @openai/codexinstalled days after v0.8.0) mademoat grant codexfail withunsupported Codex CLI version, and runs failed the same check in the container. Moat has now verified 0.146 through 0.160, and a newer 0.x release is allowed with a warning instead of an error, because an incompatible Codex fails visibly (it reports it is not logged in) rather than exposing the credential. A version older than 0.146 or a 1.x release is still rejected. The defaultcodex-cliimage version moves from 0.154.0 to 0.160.1. (#476)
Adds serial device access (devices:), multi-agent containers (agents:), Codex on a ChatGPT subscription (moat grant codex), Anthropic-compatible gateway keys (moat grant anthropic --base-url), and LunaRoute as a Pi backend.
It also realigns the Codex integration with Codex CLI 0.146–0.154 and fixes claude.base_url, moat join, the routing proxy dropping running agents, and terminal handling under Codex. The container entrypoint is now a Go binary, so cached run images rebuild once.
Breaking: moat grant codex now runs a ChatGPT login (use moat grant openai for an API key), and agents: [codex] no longer implies the openai grant. See Breaking below for the full list and migration steps.
- Go container entrypoint — the
moat-initcontainer entrypoint has been rewritten from a 668-line shell script to a Go binary (internal/moatinit, embedded and shipped as/usr/local/bin/moat-init), with the shell behavior as the contract: same phase ordering, same fail-closed vs best-effort classification, verbatim error wording. The rewrite lifts the entrypoint's logic (env parsing, branch/mode selection, ordering, error classification, exclude computation, privilege-drop selection) into unit-testable Go while still delegating the mechanical, security-sensitive steps to the audited tools already in the image (gosufor the privilege drop,socatfor the SSH bridge,tarfor the workspace copy). It adds--plan, a side-effect-free dry-run that prints the ordered actions the entrypoint would take for the current environment (moat exec <run> -- /usr/local/bin/moat-init --plan). One user-visible addition to the shell's behavior: when an injected/etc/hostsentry resolves to an IPv6 or loopback address, the entrypoint warns on stderr that the moat proxy may be unreachable through it (the entry is still written). Image cache keys are re-salted, so cached run images rebuild once; workflows pinning a concretemoat/run:<hash>tag must re-tag/rebuild. See Sandboxing. (#441) - LunaRoute for Pi —
moat grant lunaroutestores a LunaRoute key (lr_...), validated againstgw.lunaroute.com, andpi.provider: lunaroute(ormoat pi --provider lunaroute) selects it; with only that grant configured the backend is inferred. The proxy injects the key asAuthorization: Bearerongw.lunaroute.comand asLUNAROUTE-API-KEYonmcp.lunaroute.com, and on no other host; the container gets a placeholder login in~/.pi/agent/auth.json.moat piaddsnpm:@lunaroute/pi-extensionto the image's Pi packages, omitsPI_OFFLINE, and loads LunaRoute's model list before Pi starts — Pi picks its model before fetching any model list, so a new container would otherwise fail withUnknown provider "lunaroute".moat rundoes neither, and warns when a Pi run holds thelunaroutegrant without the extension. See Running Pi. (#469) - Serial devices —
devices:inmoat.yamlgives an agent access to an approved USB serial device, such as an ESP32 dev board. A host-side broker owns the device and serves it over RFC2217, so nothing is passed into the container: no privileged mode, and the gVisor sandbox stays on. Approval is trust-on-first-use —matchselects a device by USB vendor/product ID, and the first run pins that specific unit's serial number, so swapping in a different board of the same model fails before the container is created rather than flashing the wrong device; that first run prints a consent notice stating what is being pinned and what the run can do to the hardware.moat device listshows attached devices and their pin state, and lists non-serial USB hardware in a separate "Other USB devices" section so a plugged-in device that cannot go throughdevices:is visibly detected rather than appearing to be missed;moat device forget <name>clears a pin after a deliberate swap, andmoat device rename <old> <new>moves a pin when aname:changes in moat.yaml. Devices are addressed by anrfc2217://URL rather than a device path because DTR/RTS — and therefore ESP32 auto-reset — cannot be carried by a pseudo-terminal. RFC2217 has no authentication, so each listener binds only an address the run's container can reach, chosen per runtime — the default bridge gateway on Docker Linux, host loopback (reached viahost.docker.internal) on Docker Desktop, the default network gateway on Apple containers — rather than every interface. That narrows reach but is not an off-host boundary: on Linux the kernel accepts packets for a local address arriving on any interface, so the guide tells operators to add a hostINPUTrule on untrusted networks. The broker serves one connection at a time, and drops a connection that holds the port for 30 seconds without negotiating, commanding, or writing. A device is claimed exclusively per run, and the claim survives re-registration but is released by the daemon's liveness reaper if the run dies without unregistering. Works undernetwork.policy: strict— the listener ports join the proxy port in the container's firewall allowlist. A bridge that exposes several UARTs over one USB device (FT2232H, CP2105) is split into independently-pinned devices withmatch.interface, whose numbermoat device listshows in an IFACE column, and an optionalbaudseeds the initial line rate. See Serial devices. (#463) - Codex ChatGPT subscription auth —
moat grant codexnow runs a Codex login of Moat's own in a private, temporaryCODEX_HOME, rather than prompting for an API key. It never reads or modifies your ordinary~/.codex/auth.json, so the host's Codex and Moat hold separate refresh credentials and neither invalidates the other. The resulting token is stored encrypted and never reaches the container: Codex is given a syntheticauth.json, and the proxy daemon swaps the synthetic bearer and account headers for the real pair as a single atomic replacement, only over TLS, only for the exacthttps://chatgpt.comorigin, and only on the Codex backend paths. A mismatch on any of those injects nothing. The daemon owns refresh, so rotations reach running containers without a restart and a registration request never carries a token. The login uses Codex's device-code flow — a link and a one-time code rather than a localhost callback — so one command covers a laptop, an SSH session, and a headless host with no flag to choose between them. Supported on Codex CLI 0.146.x–0.154.x and the default ChatGPT origin only. See Codex. (#462) - Profile environment variables — a credential profile can now carry environment variables that apply to every run using it, configured under
profilesin~/.moat/config.yaml. A profile is an identity — credentials plus the configuration that goes with them — so settings that belong to the identity rather than to a project no longer have to be repeated in everymoat.yaml. The motivating case is an LLM gateway: the models it serves go with its key, not with the checkout.moat.yamlenvand-eboth override profile env, and proxy variables moat owns are ignored with a warning exactly as they are elsewhere. Runs with no--profileare unaffected. See Profile environment variables. (#458) - Anthropic-compatible gateways —
moat grant anthropic --base-url https://gateway.example.comstores a key that belongs to a gateway rather than to Anthropic. Thesk-ant-prefix check is skipped (gateways issue keys in their own format), the key is validated against the gateway instead ofapi.anthropic.com, and the endpoint is recorded on the credential, so every run using it is pointed there —ANTHROPIC_BASE_URLis set from the credential and the key is injected for the gateway's host. The key never enters the container and is redacted in the run's network log. It is deliberately not injected forapi.anthropic.com, which Claude Code contacts regardless ofANTHROPIC_BASE_URL, so a third-party key is never handed to Anthropic. Pair with--profileto keep it separate from a real Anthropic key, andmoat grant listmarks itapi-key (gateway). See An Anthropic-compatible gateway. (#457) MOAT_TTY_TRACE— an environment-variable equivalent of--tty-trace, recording a session's terminal I/O to a file for debugging TUI and input problems. The sessions worth tracing are the broken ones, where the in-sessionctrl+/ ddump may itself be unreachable, and exporting a variable captures every subsequent run without editing each command line. See Environment variables. (#450)- Remote MCP servers for Codex — top-level
mcp:entries are now wired into Codex, not just Claude Code. They are written to the[mcp_servers]table of the generated~/.codex/config.tomlas streamable HTTP servers whoseurlpoints at the proxy relay, so the proxy injects the real credential exactly as it does for Claude Code. Previouslymcp:was silently ignored for Codex runs. See MCP servers. (#449) - Multi-agent containers —
agents: [claude, codex]inmoat.yamlprovisions several agents into one container, each with its dependencies, credential grant, and network rules.moat join <run> codexthen works in a container started bymoat claude. See Multi-agent sessions. (#454) moat join <agent>infers the run from the current workspace, offering a picker when several qualify. (#454)
codexandopenaiare now separate grants.moat grant codexacquires a ChatGPT subscription login;moat grant openaistores an API key, as it always did. They are stored separately and can coexist:moat codexprefers the subscription and falls back to the API key. When both are granted, the API-key placeholder is exported to shell commands viaBASH_ENVrather than container-wide, so Codex is not silently moved onto API billing — the same treatmentclaude+anthropicalready gets.agent: openaiandagents: [openai]continue to mean the Codex agent. (#462)- The pinned
codex-cliversion moves to 0.154.0 — 0.146.0 was pinned in #449 and is two minors behind whatnpm i -g @openai/codexinstalls today. That gap matters now thatmoat grant codexdrives the host Codex CLI to perform a login whose result the container's Codex has to read: leaving the default at 0.146.0 put the two halves of subscription auth on different versions of an auth schema that moves. Both versions were checked before the bump —codex --strict-config doctorloads Moat's generatedconfig.tomlon 0.154.0, andcodex login statusreports "Logged in using ChatGPT" from Moat's synthetic auth file on 0.146.0 and 0.154.0 alike, so the supported 0.146.x–0.154.x range is verified at both ends rather than assumed. Override per project withcodex-cli@<version>independencies. (#462) codex-cliis version-pinned (originally 0.146.0) instead of installing whatever npm resolves as latest at image-build time. Codex ships breaking CLI and config changes on a fast cadence, and Moat generates~/.codex/config.tomlagainst a known schema, so the version now moves deliberately. Override per project withcodex-cli@<version>independencies. Registry npm dependencies now honor an explicit@versionat all — previously the version was parsed and silently dropped for registry entries (dynamicnpm:pkg@versiondeps were unaffected). (#449)
- Fix run metadata being silently lost to a truncated write —
SaveMetadatausedos.WriteFile, which truncatesmetadata.jsonbefore writing it, so a process interrupted mid-save (Ctrl-C, crash) could leave the file empty or partial.LoadMetadatathen failed withunexpected end of JSON input, and the run was dropped frommoat listwith only a debug-level log. Metadata is now written to a unique temp file, fsync'd, and renamed into place, so a reader sees either the old or the new file, never a partial write. (#472) - Fix
moat pion an Anthropic gateway key — previously, amoat grant anthropic --base-urlcredential resolved to Pi'santhropicbackend and every request failed authentication, because the gateway key is never sent toapi.anthropic.com.moat pinow refuses to start on it and names the grant to use instead —moat grant lunaroutefor a LunaRoute key. A gateway key held alongside another backend's grant no longer makes the backend choice ambiguous. (#469) - Fix a personal
~/.moat/config.yamltypo crashing every moat command —config.LoadGlobal()returned a nil config alongside its error on a validation failure, and three callers ignore that error and read a field immediately (the root command's debug settings, the routing proxy port, theMOAT_HOSTport). One invalid global mount was enough to panic with a nil-pointer dereference before any command ran.LoadGlobalnow always returns a usable config — defaults plus the error — and still reports the problem, so an unrelated project's run degrades to defaults with a warning naming the file and the offending key instead of a stack trace. (#458) - Fix
claude.base_urlnever working — previously any run that set it failed withAPI Error: 407 Proxy authentication required, so no host-side LLM proxy or Anthropic-compatible gateway could be used at all. Three separate faults:ANTHROPIC_BASE_URLpointed at a/relay/anthropicendpoint on the proxy that nothing ever registered (the registering call lived on the in-process proxy and was dropped when the shared daemon landed in #193); the credential for the endpoint's host was registered after the run had already been registered with the daemon, so it never reached the proxy; and the whole block was skipped unless the run had a grant, a strict policy, or other proxy-requiring config. Moat now pointsANTHROPIC_BASE_URLat the endpoint itself, rewriting alocalhostURL to the container's host-gateway address and allowing that port (a container cannot reach a host service at its own loopback). The endpoint is configured before registration, and settingbase_urlstarts the proxy on its own. With no grant the endpoint still applies — nothing is injected, so supply the key viaenvorsecrets. See Using a custom LLM endpoint. (#456) - Fix the
anthropicgrant silently taking Claude Code off its subscription — previously, grantinganthropicalongsideclaudeexportedANTHROPIC_API_KEYinto the container environment, where Claude Code prefers it over the OAuth login Moat had just staged. The session then billed API credits instead of the subscription and lost OAuth-only capabilities such as the 1M context window, reporting only a passing notice that "ANTHROPIC_API_KEY or another auth source is set and takes precedence over your claude.ai login". When both grants are active the key is now staged into aBASH_ENVfile instead, so shell commands still receive it while Claude Code — a native binary, which ignoresBASH_ENV— does not. Nestedclaudeinvocations are kept on OAuth by a guard function. Grantinganthropicon its own is unchanged. (#453) - Fix long-lived agents vanishing from the routing proxy — previously a running, port-exposing agent could disappear from the discovery index at
localhost:8080, from*.localhost:8080hostname routing, and frommoat open, with no warning and no way back for the life of its container, even though its published port stayed reachable. Two causes:~/.moat/proxy/routes.jsonwas deleted outright whenever the last route was removed, discarding the entries of every still-running agent along with it; and concurrent registrations from separate moat processes could lose each other's writes, because the read-modify-write cycle was serialized only within a process. The file is now kept as an empty table rather than deleted, every mutation holds a cross-process file lock, and a process that starts the routing proxy first rebuilds the table from the containers that are actually running — so an agent orphaned by an earlier version reappears the next time the proxy starts. Entries no endpoint answers on are pruned during that rebuild. (#452) - Fix
ctrl+/doing nothing under Codex — Moat's escape prefix matched a single byte,0x1f, the legacy encoding of a chord that is ambiguous withctrl+_. Codex enables the kitty keyboard protocol at startup (Claude Code does not), which asks the terminal to disambiguate, so the terminal reportsctrl+/asCSI 47;5uand Moat never saw it. Every command behind the prefix was unreachable under Codex, including thectrl+/ dTUI dump that exists to debug this class of problem. Moat now recognizes the CSI-u encoding alongside the raw byte, ignores the key-up and autorepeat events that accompany a real chord, and leaves every other kitty-encoded key — includingctrl+c— untouched for the agent. (#450) - Fix Codex's prompt area smearing, the cursor landing in unexpected places, and content shifting wholesale on every update — Moat replaced every scroll region the child requested with its own, so the footer row could not be scrolled away (#349). That assumes the child never needs a region of its own. Codex renders inline, never entering the alternate screen, and uses scroll regions as a drawing primitive: restrict to a band, reverse-index to open space inside it, reset, redraw. With the band replaced by the full content area, those reverse-indexes scrolled the entire screen. Moat now clamps the child's region instead of discarding it — the requested band is forwarded with its bottom margin held above the footer row, so Moat still owns that row while the agent keeps its band. (#450)
- Fix the terminal being left in a broken state after an agent that enables the kitty keyboard protocol exits without restoring it — killing a run (
ctrl+/ k), interrupting it, or a crash left the terminal encoding keys as CSI-u sequences, so typing at the shell afterwards produced fragments likes5;1:3uandcommand not founderrors. Moat already undid the mouse modes it mirrored onto the host for the same reason; it now also pops any keyboard-protocol flags the child pushed and never popped. Only the child's own unbalanced pushes are undone, so a protocol enabled by your terminal or multiplexer outside Moat is untouched. (#450) - Fix the status footer disappearing until the agent stopped rendering — "erase from the cursor to the end of the display" (
CSI J) reaches past the child's content area into the footer row, and Moat only repaired the footer on a redraw debounced behind 50ms of quiet. Under continuous rendering that quiet never came. The footer is now repainted immediately after the erase, with the cursor preserved. (#450) - Fix commands run by Codex having no network access — previously the generated
~/.codex/config.tomlsetshell_environment_policy.inherit = "core", and Codex'scoreset is a fixed allowlist (PATH,SHELL,TMPDIR,TEMP,TMP,HOME,LANG,LC_ALL,LC_CTYPE,LOGNAME,USER). Every command Codex ran therefore lostHTTP_PROXY,HTTPS_PROXY,NO_PROXY,SSL_CERT_FILE, andNODE_EXTRA_CA_CERTS— the variables that route a container command through the Moat proxy — sonpm install,pip,git push, andghall failed inside a Codex session. The policy is nowinherit = "all"; Moat curates the container environment already. (#449) - Fix Codex nesting its own sandbox inside the container — previously Moat passed no approval or sandbox settings, so Codex applied its defaults: approval on every action, plus a sandbox that blocks the network and confines writes to the workspace. Inside a Moat container that adds prompts without adding protection, and its network block defeats the proxy. The generated config now sets
approval_policy = "never"andsandbox_mode = "danger-full-access". Usemoat codex --noyoloto keep Codex's own approvals and sandbox. (#449) - Fix
codex.mcpsandbox-local servers never loading — previously they were written to/workspace/.mcp.json, which Codex does not read (verified against Codex CLI 0.146: a server declared there is not registered). They are now written to the[mcp_servers]table of~/.codex/config.toml. (#449) - Fix
moat codex -pemitting a deprecation warning — it passedcodex exec --full-auto, which the Codex CLI now reports as deprecated (and which no longer exists at all on the interactive command). Approval policy and sandbox mode are configured inconfig.tomlinstead, so no such flag is passed. (#449) - Fix
codex.sync_logsnever syncing anything — the setting was documented as writing session logs to the host, and defaulted on whenever theopenaigrant was configured, but no mount was ever created: the flag only influenced whether the Codex staging directory was built. Codex session transcripts now appear on the host at~/.moat/codex/sessions/<workspace>-<id>/YYYY/MM/DD/rollout-*.jsonl, in Codex's own format. (#449) - Fix Codex prompting to trust
/workspaceon first run — the generated config now marks the workspace trusted. (#449) codex.mcpandgemini.mcpmay now both declare local MCP servers in onemoat.yaml. They previously collided on/workspace/.mcp.jsonand were rejected at config load; Codex no longer uses that file. (#449)- Fix
moat joinrefusing to attach to containers that were running the agent — previously, join comparedmoat.yaml'sagent:field against a fixed list, so any other value (including the project-shaped names the reference docs andmoat initboth produced) made every join fail. Join now uses the set of agents moat actually provisioned into the container. Runs created before this change must be recreated. (#454) - Fix
moat join <name>failing when several runs share a name — previously, any project settingname:inmoat.yamlgave every run the same name, and a second concurrent run made join error instead of offering a choice. (#454) - Fix
moat join's extra positional arguments being silently ignored —moat join <run> <agent> <extra>used to accept and discard<extra>; it is now a usage error.moat joinnow takes one or two positional arguments ([run] agent), not a minimum of two. (#454) - Fix the
agent:reference documentation, which described the field as a free-form identifier defaulting toname. It is a fixed set of agent names and defaults to the command you ran. (#454) - Fix
agent: openaiandagent: googlebeing accepted and then ignored — the provider aliases passed validation but were never normalized tocodex/gemini, so the agent-specific defaults (container memory, implied dependencies, language-server support) all silently switched off.agent:is now normalized to the provider name, including when it is backfilled from the first entry ofagents:. (#454) - Fix
--dry-runskippingagent:validation — amoat.yamlwith an unrecognizedagent:previewed cleanly and only warned once you started a real run, which is backwards for the flag people use to check their config. (#454)
moat grant codexnow performs a ChatGPT login instead of storing an API key. It previously resolved to the same provider asmoat grant openaiand readOPENAI_API_KEYfrom the environment or a prompt. It now launchescodex login --device-authon the host, which needs a Codex CLI in 0.146.x–0.154.x installed and a browser somewhere to complete the device-code flow (device-code login is in beta and can be disabled by a workspace administrator). Scripts and CI that ranmoat grant codexto store a key must change tomoat grant openai, which is unchanged and keeps readingOPENAI_API_KEY. Existing stored keys are untouched and keep working: they live underopenai, and acodexgrant with no subscription still falls back to them. (#462)agents: [codex]now derives thecodexgrant, notopenai. A local MCP server undercodex.mcpthat declaresgrant: openaiand relied onagents: [codex]to provide it must now declare theopenaigrant explicitly inmoat.yaml's top-levelgrants:list. The Codex subscription is deliberately not usable as an MCP credential — it is scoped to ChatGPT's Codex backend and nothing else — sogrant: codexon any MCP server is rejected with an error pointing atopenai. (#462)moat codex --full-autois deprecated — use--noyoloto require manual approval.--full-auto=falseis still accepted and maps to--noyolo;--full-auto=trueis a no-op, since auto-approval is the default. The flag is hidden from help and will be removed in a future release. The Codex CLI itself removed--full-autofrom its interactive command and deprecated it oncodex exec. (#449)codex.sync_logswrites to a new location — the setting previously did nothing at all, so nothing moves for existing users, but the documented destination has changed. Codex session transcripts now sync to~/.moat/codex/sessions/<workspace>-<id>/, a per-workspace directory, rather than the host's own~/.codex/sessions. Codex partitions sessions by date rather than by workspace and offers no config key to relocate the directory, so mounting its real directory would expose this host user's transcripts from every project — including any carrying regulated or confidential data — to whatever agent is running. Setcodex: { shared_sessions: true }to mount the host's directory anyway and keep one combined history. (#449)
Adds two agents: moat pi runs the Pi coding agent against your existing anthropic or openai grant, and moat copilot runs GitHub Copilot CLI on the github grant. Keep policies gain HTTP request-body inspection — file- and pack-based network.keep_policy rules can match on the parsed JSON request body, so policies can enforce content-based rules (e.g. block requests whose body carries a secret) instead of host/method/path alone. Workspaces and volumes can now be backed by Docker named volumes (workspace.mode: volume, type: volume) to bypass the host↔VM filesystem-sharing layer a bind mount crosses, and the routing proxy serves a discovery index at its bare hosts so you can browse an agent's endpoints with moat open instead of memorizing hostnames.
- Copilot CLI settings passthrough —
moat copilotnow carries over user preferences from the host's Copilot settings file ($COPILOT_HOME/settings.jsonwhen set, otherwise~/.copilot/settings.json; contextTier, effortLevel, footer, includeCoAuthoredBy, model, mouse, subagents, tabs, theme). LegacycolorModevalues are written as the currentthemesetting. An optional~/.moat/copilot/settings.jsonprovides moat-specific overrides that win over host settings. Settings that execute commands (statusLine) are only allowed from the moat override file. CLI flags andmoat.yamlfields take precedence over settings.json values. (#438) - GitHub Copilot CLI agent — run GitHub Copilot CLI with
moat copilot. Copilot uses the existinggithubgrant: Moat injects that GitHub token for GitHub/Copilot API hosts plus HTTPS git, while the container receives only placeholders.moat copilotinstalls@github/copilot, stages Copilot config/context, passes--allow-allby default, and supportscopilot.model,copilot.context,copilot.reasoning_effort,copilot.experimental, andcopilot.autopilotinmoat.yaml. See Running GitHub Copilot CLI. (#436) - Pi packages & safe defaults — declare Pi extensions/skills/themes in
pi.packages(remotenpm:/git:/https:/ssh:sources) and Moat installs them into the image at build time viapi install, baked into a reproducible cached layer. Everymoat piimage also bakes a safe~/.pi/agent/settings.json—defaultProjectTrust: never(a checked-out repo's own.pi/extensions, which are arbitrary code, do not auto-load), telemetry off, quiet startup — that a workspace cannot override. Because Pi config can redirect model traffic to any host,moat pinow warns under a permissive network policy (onlynetwork.policy: stricttruly constrains egress). See Running Pi. (#434) - Pi coding agent — run the Pi coding agent with
moat pi. Pi has no credential of its own; it runs against your existinganthropicoropenaigrant. When exactly one is configured it is used automatically; when both are, choose one with--providerorpi.providerinmoat.yaml. Only theanthropicandopenaibackends are supported today — any other backend, or a missing/ambiguous grant, fails before a container is created. Configure with thepi:block (provider,model). See Running Pi andexamples/agent-pi. (#433) opentofuandterragruntdependencies — two new managed cloud tools.opentofuinstalls the OpenTofu CLI as thetofucommand;terragruntinstalls the Terragrunt orchestration wrapper. Both install as prebuilt release binaries with no image rebuild cost beyond their own layer. Terragrunt delegates to a Terraform or OpenTofu binary onPATH, so pair it with an engine —dependencies: [terraform, terragrunt], ordependencies: [opentofu, terragrunt]withenv.TERRAGRUNT_TFPATH: tofu. See Dependencies. (#430)- Routing discovery index — the routing proxy now serves a browsable index at its bare hosts:
http://localhost:<port>lists every running agent and its endpoints, andhttp://<agent>.localhost:<port>lists that agent's endpoints when it exposes more than one. Browsers get an HTML page; clients sendingAccept: application/jsonget JSON. Previously the bare proxy root returned anot a .localhost host400, and a bare multi-endpoint agent host routed to a nondeterministic first endpoint. Single-endpoint agents and fully-qualified endpoint hosts (web.demo.localhost) are unaffected. Seeexamples/multi-endpoint. (#407) moat open— open a running agent's endpoint in your browser:moat openfor the discovery index,moat open <agent>for an agent,moat open <agent> <endpoint>for a specific endpoint. The agent defaults from the current directory'smoat.yaml(or the sole running agent), and the URL is always printed so--print/ headless / SSH use still works.moat run,moat list, andmoat proxy statusnow advertise the endpoint index URL, andmoat runprints the proxy's actual bound port (previously it always printed the configured default, which was wrong whenever the proxy fell back to another port). (#407)- Native volume backing for
volumes:— a volume entry can settype: volumeto use a Docker named volume (moat_<agent>_<name>) on the container engine's native filesystem instead of a host bind mount. This bypasses the host↔VM filesystem-sharing layer that bind mounts cross on VM-based runtimes (Docker Desktop, Rancher Desktop), which is faster for I/O- and metadata-heavy directories and avoids that layer's differing file-locking and memory-mapping semantics. The default is unchanged (bind), so existing configs are unaffected. Docker runtime only; the Apple container runtime rejectstype: volume. See Volumes. (#402) - Volume-mode workspaces — opt into an isolated copy of the workspace in an ephemeral Docker named volume (
workspace.mode: volumeor--workspace-mode volume) for host protection and faster macOS I/O. Extract changes withmoat snapshot/moat snapshot restore --to. Docker-only; git worktree and submodule checkouts are rejected with a clear error (useworkspace.mode: bindfor those). (#404) - HTTP request-body policies — file/pack
network.keep_policyrules can match on the parsed JSON request body viaparams.body(e.g.hasSecrets(params.body)for a whole-body secret scan, orparams.body.field == 'x'for an exact match). The proxy buffers and inspects the body only when a rule references it. Inspection applies toapplication/jsonover HTTPS; once any body rule exists, thehttpscope fail-closes on non-JSON, compressed, malformed, duplicate-key, or oversized bodies. A newkeep-body-policydaemon capability gates the feature — an older proxy daemon fails fast with amoat proxy restartupgrade message rather than silently under-enforcing. Requireskeep≥ v0.6.0 andgatekeeper≥ v0.13.0. See HTTP request-body rules andexamples/policy-body. (#395) MOAT_KEYRING_BACKENDenvironment variable — set tofileto skip the system keychain entirely and use file-based credential sources instead. This covers both the credential-store encryption key and the macOS Keychain lookup for Claude Code OAuth credentials. Useful on headless or locked-down macOS where touching the keychain pops a blocking GUI authorization prompt (including the "allow this app to modify the keychain item" dialog an unsigned binary triggers). The default (keychain-first, file fallback) is unchanged. See Environment variables. (#406)
- Fix
moat grant providerslisting grants that do not exist — previously the table showedanthropictwice (theclaudeOAuth provider was displayed under ananthropicalias while the realanthropicAPI-key provider registered under the same name), listedpieven though Pi has no credential of its own andmoat grant pialways errors, and left the description column blank formeta,oauth, andpi. Every listed name is now a namemoat grant <name>accepts,claudeandanthropicappear as the separate grants they are, and every row carries a description. (#447) - Fix
pip:dependencies failing the image build withexternally-managed-environment— previously, when Python was not the sole runtime (e.g.pythonalongsidenode, where the base image isdebian:bookworm-slimrather thanpython:X-slim), Python came from Debian'spython3package, which ships the PEP 668EXTERNALLY-MANAGEDmarker. Everypip installthen failed, so a config withpip:numpycould not build. That marker is now removed when Moat installs Python via apt, which also unblockspip installanduv pip install --systemin build hooks and in the running container. (#445) - Fix all Claude sessions inside moat freezing at once on macOS during a package install — previously, the shared credential-injecting proxy daemon inherited the host's default
RLIMIT_NOFILEsoft limit (typically 256 on macOS), so a burst of concurrent connections through the single proxy (bun installopens up to 64 parallel connections) could exhaust its file descriptors and stall every run'sclaude.aitraffic until the burst cleared, then recover. The daemon now raises its file-descriptor soft limit toward 65536 (capped at the hard limit) at startup, before the proxy accepts connections. (#439) - Fix the injected agent context misrepresenting network access — previously, the "Moat Environment" instructions file (CLAUDE.md/AGENTS.md) listed grant/rule hosts under "Allowed hosts" regardless of policy, so under the default
permissivepolicy (where all outbound traffic is allowed) it read as an egress allowlist restricting the agent to those few hosts. The Network Policy section is now policy-aware:permissivestates that all outbound access is allowed (surfacing only explicit per-path rules, which still apply), andstrictis described as the allowlist it actually is. The context also now reflects Docker/DIND availability, the resolved workspace mode (bind vs. ephemeralvolume), and installed tool dependencies — all previously omitted, which could lead an agent to assume capabilities were absent. (#431) - Fix
moat logs -fsilently doing nothing — previously, follow mode printed a debug-log line ("not yet implemented", only visible with--verbose) and exited 0 as if it had streamed, so-flooked like it worked. moat now prints a visible notice that follow mode isn't supported yet and shows the current logs. (#413) - Fix non-deterministic Dockerfile generation causing spurious image rebuilds — previously, dependency
ENVlines were emitted in random map order, so the generated Dockerfile changed between runs and missed Docker's layer cache.ENVkeys are now sorted. (#413) - Fix a malformed
~/.moat/config.yamlbeing silently ignored — previously, a YAML typo in the global config was swallowed and moat ran on built-in defaults with no signal, so settings likeproxy.portappeared not to take effect for no visible reason. moat now warns and falls back to defaults instead of failing silently. (#412) - Fix potential
routes.jsoncorruption on a crash — previously, the hostname-routing table was written non-atomically (truncate-then-write), so a crash mid-write could leave a truncated file that every routing proxy then failed to parse. It is now written atomically via a temp file and rename. (#412) - Fix a data race on a run's provider metadata — previously, provider stopped-hooks wrote
ProviderMetawhile metadata-save read it concurrently (from the container-exit monitor andmoat stop) without synchronization, which could corrupt the saved metadata or crash under the race detector. Both paths now hold the run's state lock. (#412) - Fix an unhelpful error when the routing proxy's port is in use — previously, starting an agent that exposes
ports:while something already held the routing port (default 8080) failed with a rawlisten tcp 127.0.0.1:8080: bind: address already in use. The routing port is deterministic by design (it is not auto-reassigned, so advertised endpoint URLs stay stable), so moat now reports which port is taken and how to change it:MOAT_PROXY_PORT=<port>orproxy.portin~/.moat/config.yaml. (#409) - Fix Apple container runs failing under the
containerCLI 1.0.0 — previously, moat parsedcontainer inspect/container listoutput expectingstatusto be a string ("running") and network details in a top-levelnetworksarray. The 1.0.0 CLI nests these in astatusobject (status.state,status.networks), so every Apple container run failed withparsing container info: json: cannot unmarshal object into Go struct field .status of type string, and container IP lookup (host-traffic routing) found no address. moat now parses both the legacy and 1.0.0 schemas. Affects anyone on the Apple container runtime withcontainer≥ 1.0.0. (#406) - Fix
moat system containers,moat clean, andmoat statuslisting no Moat containers — the run-container filter expected an 8-character hex name, but run IDs have beenrun_<12 hex>(e.g.run_d2d975055e71) for some time, so the filter matched nothing and the commands reported "No moat containers found" even with containers present. The filter now matches the real run-ID format on both Docker and Apple runtimes. (#406) - Fix intermittent broken mouse-wheel scrolling in interactive sessions — previously, when a child agent (e.g. Claude Code) opened a fullscreen view (the alternate screen) and then closed it, moat's compositor swallowed the agent's mouse-disable sequence into its VT emulator instead of forwarding it to the terminal (the disable arrives just before the alt-screen-exit, while moat is still in compositor mode). The terminal was left reporting mouse events after the agent returned to its inline UI, so the scroll wheel sent mouse reports to the agent instead of scrolling the terminal's scrollback. moat now forwards mouse-tracking mode set/reset to the host while in compositor mode, and disables any it enabled on compositor exit, reset, or cleanup. The leak only triggered once a session opened a fullscreen view, which is why it was intermittent. (#394)
- Fix bypass-permissions mode silently turning off in
moat claudesessions — previously, moat enabled bypass mode only via the--dangerously-skip-permissionsCLI flag. When Claude Code's "Try the new fullscreen renderer?" upsell appeared and was accepted (or when Claude silently auto-graduated a session to the fullscreen renderer), Claude re-exec'd its own process without the original CLI flags, so bypass mode reverted to default and tool calls started prompting again (e.g. a plaincat) mid-session. moat now (1) pins the renderer in the generatedsettings.jsonviatui— mirroring the host's choice and defaulting to the classic renderer — so the upsell and the flag-dropping re-exec never fire, and (2) persistspermissions.defaultMode: "bypassPermissions"insettings.jsonwhen bypass is requested, so bypass survives any re-exec that does occur (e.g. a manual/tuiswitch). Use--noyoloto opt out of bypass as before. (#400)
- Upgrade dependencies to clear 15 vulnerabilities that
govulncheckreports moat actually calls —containerd/v2(→2.2.5),golang.org/x/crypto(→0.53.0),in-toto-golang(→0.11.0),go-git/v5(→5.17.1),moby/buildkit(→0.28.1), andulikunitz/xz(→0.5.15). No user action required. Remaininggovulncheckfindings are indocker/docker(no upstream fix available yet) and the Go standard library (cleared by building with a newer Go toolchain). (#416) - Build with the Go 1.25.11 toolchain to clear ~16 Go standard-library vulnerabilities
govulncheckreports moat calls (crypto/x509,crypto/tls,html/template,net/*,archive/tar, …), pinned via atoolchaindirective. No user action required. With this and the dependency upgrades above,govulncheck's reachable count drops from 36 to 5 — the rest beingdocker/docker, which has no upstream fix yet. (#417)
Security and ergonomics patch. Fixes a cross-profile credential leak in the shared proxy daemon — token refresh and the daemon-restart restore path now scope to the run's own credential profile instead of the daemon process's. Also adds inline grant prompting so moat run/moat claude/moat codex can grant missing credentials in place rather than failing and requiring a separate moat grant plus a re-run.
- Inline grant prompting — on an interactive terminal,
moat run/moat claude/moat codexnow detect missing credential grants before starting the container and offer to grant each one inline, instead of failing and requiring a separatemoat grantplus a re-run. Non-interactive runs are unchanged; use--no-prompt(orMOAT_NO_PROMPT=1) to force the fail-fast behavior. (#389)
- Fix cross-profile credential leak in the shared proxy daemon — previously, background OAuth token refresh opened the credential store via the daemon process's global active profile, which the daemon freezes at spawn (usually the default) and which does not reflect the profile a served run was created under. A run started with
--profile <name>could therefore pick up the default profile's credential for the same grant on the first refresh tick — the refresh replaced the run's live OAuth token and overwrote the stored one — e.g. a--profile vibrantrun suddenly using the default profile's Linear auth. The CLI now sends the run's profile to the daemon, and token refresh (plus the daemon-restart restore path, which had the same flaw) scopes the credential store to it. Affects anyone using--profile/MOAT_PROFILEwith refreshable OAuth grants. User action: upgrade the CLI, then runmoat proxy restartso the running daemon picks up the fix (an older daemon ignores the new profile field and keeps leaking). (#392)
Feature release centered on MCP ergonomics: well-known servers can be listed in moat.yaml by name alone, resolving URL, auth, and grant from a built-in catalog (with Langfuse regional and PostHog OAuth shortcuts), and MCP API-key grants adopt the mcp:<name> naming convention. Also adds moat join to launch a second agent in a running container, moat proxy restart for version-aware daemon replacement, and the ministack local-cloud service, plus fixes for GitHub HTTPS git auth, Apple async container teardown, and a remote-MCP relay 404 regression.
moat proxy restart— stop the running proxy daemon and start a fresh one from the current binary, holding the daemon spawn lock across the entire stop and start so an active run's health monitor can't resurrect the old daemon in the gap.EnsureRunningnow also adopts the caller's version automatically: when a healthy daemon's recorded commit and the caller's build commit are both known and differ, it restarts to the caller's version (dev builds reportingnone/empty are left alone to avoid thrashing). This lets a newer CLI replace a stale daemon — e.g. one with an outdated MCP relay — without waiting for the idle timeout. (#385)- Langfuse MCP shortcuts —
langfuse-eu,langfuse-us,langfuse-jp, andlangfuse-hipaaare now recognized shorthand names inmcp:. Each resolves to the regional Langfuse MCP endpoint (/api/public/mcp) with Basic auth via a sharedmcp:langfusegrant. Grant once withmoat grant mcp langfuse(credential:Basic <base64(pk:sk)>), then list the regional name inmoat.yaml. Self-hosted instances still use the fullurl+authform. (#384) - Declarative MCP shorthand — list a well-known MCP server in
moat.yamlby name alone (a bare- linearundermcp:), and Moat resolves the URL, auth header, and required grant from its built-in catalog. The map form (- name: linear) still works for attaching a policy or overriding fields, and unknown servers still take an expliciturl+auth.moat grant oauthnow prints this shorthand. (#383) moat join— launch a second agent inside an already-running container, reusing its workspace, grants, and credentials without a new container. v1 supports same-agent joins (e.g. joining claude into amoat clauderun). The status footer shows the session role and joined-agent count. (#379)- PostHog OAuth shortcut —
moat grant oauth posthognow auto-discovers OAuth endpoints from PostHog's MCP server (https://mcp.posthog.com/mcp) without needing--urlor a config file, matching the other well-known services (asana, cloudflare, hubspot, linear, notion, stripe). (#382) - Ministack service —
ministackis now available as aservicedependency, running the LocalStack-compatible Ministack local cloud emulator as a sidecar container. Declareministackunderdependenciesand configure it underservices.ministack(e.g.env,wait). Readiness is probed against the container's/_ministack/healthendpoint. (#366)
- MCP API-key grants now use the
mcp:<name>(colon) naming convention, mirroringoauth:<name>.moat grant mcp <name>stores the credential asmcp:<name>and printsgrant: mcp:<name>in its moat.yaml snippet, and the well-knowncontext7catalog entry resolves tomcp:context7. The previousmcp-<name>(hyphen) form is still accepted everywhere — existing stored credentials andmoat.yamlfiles keep working — but it is deprecated; prefermcp:<name>. No migration is required. (#386)
- Fix remote MCP servers failing to connect with
MOAT: MCP server '<token>' not configured(HTTP 404) — previously, the relay URL written into the container's.claude.jsonaddressed the proxy by the raw host-gateway IP (GetHostAddress), which is not inNO_PROXY. The MCP client's request was therefore routed through the proxy's CONNECT tunnel, so the proxy saw a proxied request and dispatched it to the relay handler that expects/mcp/{name}rather than the one that strips the per-run token from/mcp/{token}/{name}— parsing the auth token as the server name and returning 404. The relay URL now uses the syntheticmoat-proxyhost (the only host inNO_PROXY), so the client connects directly and the token is stripped correctly. This regressed in #321 (v0.5.1), which moved the proxy to synthetic hostnames but left the MCP relay URL onGetHostAddress; theANTHROPIC_BASE_URLrelay was updated at the time but the MCP relay was missed. Affects all remotemcp:servers. (#387) - Fix the
moat.yamlsnippet printed bymoat grant oauthbeing invalid — previously, the suggestedmcp:block emittedauth.grantbut omittedauth.header, so copying it verbatim intomoat.yamlfailed config validation with'auth.header' is required when auth is specified. The snippet now includesheader: Authorization. (#382) - Surface an actionable hint when an injected GitHub credential is rejected — previously, a stale/expired stored token failed HTTPS git with only git's opaque
could not read Username for 'https://github.com'(the proxy's401was hidden in the network log). After a failed run, moat now scans the network log and, when agithub-granted request togithub.com/api.github.comwas rejected (401/403) and did not recover, printsRun 'moat grant github' to refresh it.(#380) - Fix
moat grant githubnot taking effect on a running proxy daemon for env-sourced tokens — previously, the daemon's background token-refresh re-derived the GitHub token from its own process environment (GITHUB_TOKEN/GH_TOKEN), which is frozen when the daemon starts. After re-granting a fresh token, the daemon kept injecting (and wrote back to the credential store) the stale env value untilmoat proxy stop. Env-sourced GitHub tokens are now treated as static and no longer proactively refreshed, so a re-grant takes effect on the next run; a stale token surfaces as a 401 with a re-grant hint instead.gh-CLI-sourced tokens (gh auth token) still refresh, since that keyring is shared withmoat grantand never diverges from it. (#381) - Fix HTTPS git fetch/push to
github.comfailing with only thegithubgrant — previously, the proxy injectedAuthorization: Bearer <token>forgithub.com, but GitHub's git smart-HTTP endpoints reject Bearer with a 401 and require Basic auth, and git also aborted on the proxy's 407 CONNECT challenge because it doesn't send proxy credentials preemptively. The provider now injectsBasic x-access-token:<token>forgithub.com(Bearer is still used forapi.github.com), and containers setgit http.proxyAuthMethod=basic, sogit clone/fetch/pushover HTTPS work with just--grant github— no SSH grant required. When bothgithubandssh:github.comare granted, git still routes over SSH as before. (#376) - Fix Claude Code reporting
Failed with non-blocking status code: /bin/sh: 1: python3: not found— previously, the generated image for the Claude agent had no Python interpreter, so Claude Code's security-guidance feature (which shells out topython3) failed. Running the Claude agent now implicitly addspythonto the container dependencies. Specify an explicitpython@<version>independenciesto override the version. (#369) - Fix service dependencies declared without an explicit version failing to start with
invalid reference format— previously, a service listed asnamerather thanname@version(e.g.ministackinstead ofministack@latest) left the image tag empty, so the reference was built asrepo:and the container runtime rejected it. The service version now falls back to the registry default, matching the runtime and Dockerfile resolution paths. (#366) - Fix orphaned Apple container networks exhausting the IP pool — previously, because Apple's container CLI removes containers asynchronously, the
container network deleteissued during run teardown often ran before the run's containers had detached and failed with "active containers" / "network has a pending operation".RemoveNetworkmade a single attempt andForceRemoveNetworkre-issued the same command, so the network leaked; accumulatedmoat-run_*networks eventually exhausted Apple's/24IP pool and blocked new runs. Network deletion now retries with exponential backoff until the async detach completes. (#367) - Fix Apple service runs failing to start with "no network address found for container" on
containerCLI 0.12.x — previously, moat read the service container's ID from the combined stdout+stderr ofcontainer run --detach, but newercontainerversions write startup progress ([1/6] Fetching image, …) to stderr, so the captured "ID" was polluted with progress text and the follow-upinspectmatched no container. moat now reads the ID from stdout only, and additionally polls for the address in case it is assigned shortly after start. (#367) - Fix a failing
pre_runhook looking like the container failed to start — previously, a non-zero exit from thehooks.pre_runcommand aborted the entrypoint (underset -e) with a bare exit code and no indication the hook was the cause, so the real error was easy to miss in the container output. moat now reportspre_run hook failed (exit code N)with the offending command and how to fix it, and exits with the hook's status. (#377)
Patch release with three Claude Code fixes: an Ink-based TUI freeze on first paint, host/container session-directory divergence on workspaces with . or _ in the path, and marketplace plugin hook scripts losing the executable bit.
- Fix Claude Code (and other Ink-based TUIs) freezing on the first paint inside the moat container — previously, when the child emitted any terminal-capability query that required a reply (CSI c Primary Device Attributes, CSI 6n cursor position, in-band resize, color queries), moat's VT compositor blocked forever on the emulator's internal reply pipe with no drain, holding
tui.Writer.muand starving the render goroutine. Input still reached the child, but no further output reached the host terminal, so the session appeared frozen and Ctrl+C wasn't visibly acknowledged even though it terminated the child. Surfaced 100% of the time with Claude Code 2.1.150+, which queries Device Attributes at startup. Moat now drains the emulator's reply pipe and routes replies back into the child's input stream via the existing injectable-reader chain. (#362) - Fix Claude Code sessions inside the container writing to a different
~/.claude/projects/directory than host sessions — previously, moat slugified the workspace path by replacing only/with-, while Claude Code replaces every non-alphanumeric character. For any workspace path containing a.,_, or space (e.g. a macOS username likeuser.name), moat and the host CLI computed different project-directory names, so container and host sessions silently forked the project's session history and memory store. The slug now matches Claude Code's rule exactly (verified against the claude binary). Note: already-forked directories are not migrated automatically. (#364) - Fix marketplace plugin hook scripts failing with
Permission deniedinside the container — previously,CollectMarketplaceTarwrote every tar header with a hardcoded mode of0644, so executable scripts shipped by marketplace plugins (e.g.bin/aw-hook,scripts/on-prompt-submit.sh) extracted as non-executable and Claude Code'sUserPromptSubmithook failed at runtime. The tar header now derivesModefrom the source file's permissions, preserving the executable bit. (#363)
Patch release centered on Claude Code authentication inside containers — subscription detection, setup-token capture, and version pinning — plus a non-root tmpfs permissions fix.
- Fix
claude-code@<version>pinning being ignored — previously, specifying a version such as[email protected]independenciesstill installed the latest release, because the install command dropped the version argument. The version is now passed to the official installer. (#357) - Fix Claude Code showing "not logged in" / "API Usage Billing" inside containers — previously, the generated
~/.claude/.credentials.jsonhadnullscopes and nosubscriptionType, which Claude Code treats as an unauthenticated session. Moat now writes the standard OAuth scopes and asubscriptionType(defaultmax, overridable viaclaude.subscription_type; the newclaude.rate_limit_tieris also supported). Grants created by importing existing credentials use the real plan. The real plan is still enforced server-side via the proxy-injected token. Surfaced by v0.5.2 dropping theCLAUDE_CODE_OAUTH_TOKENplaceholder env var that had masked the incomplete file. (#358) - Fix
moat grant claudefailing to capture asetup-token— recent Claude CLI versions rendersetup-tokenas a TUI, so moat's output scraping always failed ("could not find OAuth token") and fell back to a manual paste anyway. Moat now runssetup-tokenattached to the terminal (no scraping) and reads the pasted token, reassembling it when a narrow terminal soft-wrapped it across lines. (#353) - Fix
EACCESwriting to tmpfs mounts as the non-root container user — tmpfs (used bymounts.excludepaths) was created mode755owned by root, somoatusercould not write to it, andnoexecblocked native binaries in excludednode_modules. tmpfs is now mounted mode1777withexecon Docker, and with an explicitmode=1777on Apple containers. (#355)
Patch release with Claude Code credential fixes (OAuth placeholder shape and credential expiry) plus marketplace and TUI rendering fixes.
- Fix Claude Code skipping OAuth-only code paths in containers — the container credentials placeholder did not look like an OAuth token and was also set in
CLAUDE_CODE_OAUTH_TOKEN, so Claude Code could skip paths that determine account capabilities (e.g. 1M-context access). Moat now writes ansk-ant-oat01-*-shaped placeholder to.credentials.jsonand no longer sets the env var; the real token is still injected by the proxy. (#351) - Fix Claude Code treating injected container credentials as expired —
setup-tokengrants carry no expiry, so the zero-value timestamp serialized to year 0001 and showed the session as logged out. A far-future expiry is now written when the grant has none. (#352) - Fix
claude.marketplacesentries written as{source: github, repo: ...}being normalized to agit/urlshape that broke plugin allowlist matching in the container. The original source shape is now preserved end to end. (#345) - Fix the moat footer scrolling into scrollback with Ink-based TUIs (Claude Code) — the child emits
ESC[ron startup, resetting moat's scroll region, so newlines on the bottom row pushed the footer into scrollback and left a trail of copies. Moat is now the sole authority over the scroll region and reserves the footer row at the TTY level. (#349)
Patch release with one security fix (IPv6 egress firewall) and a batch of run-lifecycle and proxy fixes. Adds MOAT_HOME for relocating moat state, a multi-runtime manager so Docker and Apple containers can coexist in one install, TUI debug shortcuts, and Python 3.13/3.14 support. Gatekeeper is extracted to its own repository.
- TUI debug shortcuts —
Ctrl-/ ddumps a snapshot of recent terminal I/O to~/.moat/runs/<id>/tui-debug-<unix-ts>.jsonfor offline analysis or feeding into a Claude session;Ctrl-/ rissues a soft terminal reset and nudges the child to redraw, recovering wedged sessions. The dump uses the same JSON format as--tty-traceand works withmoat tty-trace analyze. Ring buffer size is 8 MB by default, tunable viaMOAT_TTY_RING_BYTES. (#343) MOAT_HOME— single env var to relocate the moat configuration directory (default~/.moat); when set, it replaces~/.moatas the root for runs, credentials, daemon socket/lock, keyring key file, per-run SSH sockets, and routing proxy state. Third-party state (~/.claude,~/.config/gh, etc.) still resolves against$HOME. (#323)- Multi-runtime manager — Docker and Apple containers can now coexist in a single install. New runs use the default runtime; operations on existing runs (
status,clean,list,system images,system containers) resolve the correct runtime automatically. Adds aRUNTIMEcolumn to the relevant tables and aruntimefield to--jsonoutput. (#311) - Python 3.13 and 3.14 added to supported versions; bundled
uvupdated from 0.5.14 to 0.11.6 to support modernpyproject.tomlfeatures (#316)
- Gatekeeper extracted to standalone module —
internal/proxy/andcmd/gatekeeper/have moved to github.com/majorcontext/gatekeeper. Theghcr.io/majorcontext/moat-gatekeeperimage is no longer published from this repository. (#333)
- IPv6 egress firewall — containers on dual-stack hosts could bypass
network.policy: strictby using IPv6 addresses (e.g. AAAA DNS records). The firewall now installs ip6tables rules mirroring the existing iptables rules. No user action required; the fix applies automatically on upgrade. If ip6tables is unavailable in the container image, a diagnostic warning is logged. (#324)
- Fix
network.hostbypass via raw loopback addresses — previously, containers running under Docker host-network mode could bypassnetwork.hostenforcement by connecting tolocalhostor127.0.0.1directly, since those addresses were inNO_PROXYand skipped the proxy entirely. Loopback addresses are no longer excluded from proxy routing. (#327) - Fix ip6tables hanging indefinitely on hosts without the
ip6_tableskernel module — previously,ip6tables -w(wait forever) blocked the firewall setup, hanging the container start and E2E tests on CI. Now uses a 5-second timeout and treats ip6tables failure as non-fatal with partial-rule cleanup. (#325) - Fix
moat statusandmoat listcorrupting persisted run state — previously, reconciliation could overwrite metadata for active runs (e.g. mark them stopped) when a status check ran with the wrong runtime, causing active runs to disappear frommoat status. Read-only commands no longer write metadata, and reconciliation skips cross-runtime container checks. (#309) - Fix host unreachable from custom networks on Docker Desktop — previously, runs on user-defined Docker networks could not reach the host, breaking proxy access and producing
Unable to connect to API (ConnectionRefused)errors. (#337) - Fix MCP servers with
auth.grantfailing to load credentials — previously, grant names listed undermcp[].auth.grantwere validated but never appended to the credential-loading list, so auth headers were never injected. The grant list is now merged before credential processing, andFileStore.Get()is hardened against path traversal via crafted provider names. (#338) - Fix multi-line YAML block scalars in
post_buildandpost_build_roothooks producing invalid Dockerfiles — previously, raw newlines from|block scalars were interpolated directly intoRUNcommands. Lines are now joined with&&, with trailing shell operators (&&,;,\) stripped before joining. (#339) - Fix E2E service tests intermittently hanging due to orphan
moat-*Docker networks accumulating without cleanup.Close()is now bounded so a stuck monitor goroutine can't deadlock teardown, and orphan networks are reaped on startup. (#342) - Fix capability-mismatch error message pointing at a nonexistent command — error paths suggested
moat proxy restart, but the proxy command only registersstart,stop, andstatus. Messages now point atmoat proxy stopfollowed by re-runningmoat run. (#336)
v0.5 hardens network isolation and introduces operation-level policy enforcement on MCP tool calls and HTTP traffic. Host traffic is now blocked by default in every network policy mode — including permissive — and must be opted into per-port with network.host. Keep policy integration adds allow/deny/redact rules for MCP tool calls and REST API requests, with starter packs for common services and an LLM response policy that evaluates tool_use blocks before forwarding to the container. The credential-injecting proxy is now also available as a standalone gatekeeper binary that runs without the moat runtime. Other additions include multi-credential per host, custom base images, OAuth grants for MCP servers, sandbox-local MCP servers, and global mounts in ~/.moat/config.yaml.
-
Host traffic blocked by default — containers can no longer reach services on the host machine without explicit configuration. This affects all network policy modes, including
permissive(#303). Add anetwork.hostlist to restore access:network: host: - 11434 # Ollama - 5432 # local Postgres
- Keep policy integration — enforce operation-level allow/deny/redact on MCP tool calls and REST API requests via
mcp[].policyandnetwork.keep_policy; includes an LLM response policy that evaluatestool_useblocks in Anthropic API responses throughclaude.llm-gatewaybefore forwarding to the container, plus starter packs likelinear-readonlyfor quick MCP server lockdown (#288) gatekeeperstandalone proxy — the credential-injecting proxy is now packaged as a standalone binary that runs without the moat runtime (#299)network.host— list TCP ports on the host machine that the container may access; all host traffic is blocked by default even in permissive mode (#303)MOAT_HOST_GATEWAYenv var — set automatically in every container; resolves to the host gateway address across all runtimes (Docker, Apple containers, Rancher Desktop). Always use$MOAT_HOST_GATEWAYrather than hardcoding addresses (#303)- Multi-credential per host — multiple grants (e.g.,
claudeandanthropic) can now target the same host with different headers; clients that send placeholder headers choose which credential to use, otherwise the proxy auto-injects withanthropicpreferred overclaude(#295) moat grant show— inspect stored grants and the credentials they hold (#297)- Custom base image — declare a prebuilt image as the base for the generated Dockerfile instead of inferring one from
dependencies(#292) - OAuth grant provider for MCP servers — authenticate to remote MCP servers via OAuth flows handled on the host (#278)
- Sandbox-local MCP servers — run MCP servers as processes inside the container under
claude.mcp/codex.mcp(#184) - Settings passthrough —
~/.moat/claude/settings.jsonon the host is forwarded into the container's Claude configuration (#281) - Global mounts in
~/.moat/config.yaml— declare mounts that apply to every run without editing per-projectmoat.yaml(#282) - Host-side marketplace cloning — clone private Claude plugin repos on the host (with SSH fallback) before injecting them into the container (#240)
- Protobuf compiler and plugin dependencies —
protocand language plugins are declarable independencies(#276) - Managed settings cache for Claude — copy
~/.claude/remote-settings.jsoninto the container so Claude Code does not prompt for managed settings approval on every startup (#306) - AWS_PROFILE propagation — the AWS profile selected at grant time is forwarded to the proxy daemon and used for credential resolution (#296)
- Default Node.js version updated from 20 to 22 (current LTS) for all providers (Claude, Codex, Gemini) and the TypeScript language server (#304)
- Homebrew tap moved to its new location (#279)
- Fix
network.hostbypass — previously,MOAT_HOST_GATEWAYwas included inNO_PROXY, causing host traffic to bypass the proxy entirely and skip network policy enforcement. Host traffic now flows through the proxy using synthetic hostnames (moat-hostfor host services,moat-proxyfor proxy access).MOAT_HOST_GATEWAYnow contains the synthetic hostnamemoat-hostinstead of a runtime-specific IP; update any container scripts that passed it toping,nslookup, oriptablesexpecting an address literal. HTTP(S) clients continue to work without changes. Runmoat proxy restartafter upgrading to pick up this fix. User-suppliedHTTP_PROXY/HTTPS_PROXY/NO_PROXY/ALL_PROXY/CURL_ALL_PROXY/MOAT_HOST_GATEWAY/MOAT_EXTRA_HOSTSvalues inmoat.yaml env:or-eflags are now filtered with a warning so they cannot re-open the bypass. On Apple containers with strict policy, moat-init.sh fails closed if it cannot write synthetic hostnames to/etc/hosts— rebuild non-root custom base images so moat-init runs as root, or grantCAP_DAC_OVERRIDE. - Install the Rust toolchain to a shared location (
/usr/local/cargo) so non-root container users can usecargoandrustc— previously, rustup installed under/rootand was unreadable to the default container user (#305) - Add Anthropic and Gemini token placeholders so clients sending placeholder
Authorizationheaders select the correct credential (#293) - Skip plugin install when the
claudeCLI is absent — previously, image builds failed in containers that didn't include Claude Code (#291) - Surface actionable errors from the AWS provider and rename legacy
agentopsreferences (#290) - Use
ConfigureProxyfor token refresh propagation in the daemon — previously, refreshed tokens weren't always picked up by in-flight requests (#289) - SSH fallback for Claude marketplace clones with clearer error output — previously, HTTPS-only clones failed silently for private repos (#285)
- Correct SSH
known_hostsordering and surface clone fallback visibility — previously, marketplace clones fell back to alternate transports without logging it, making failures hard to diagnose, andknown_hostsentries were written in an order that could cause SSH host key verification to fail (#283) - Disable interactive git credential prompts during host-side marketplace clones — previously, missing credentials caused the host clone step to hang (#280)
v0.4 introduces HTTP-level request rules for the network firewall, an env:// resolver for forwarding host environment variables into containers, and moat exec for running commands in existing containers. New credential providers cover Meta Graph API and Graphite CLI, and Ollama is now a declarable service dependency. Rancher Desktop is now a supported runtime alongside Docker and Apple containers. The proxy daemon fixes a credential scoping race and now separates credential traffic from routing traffic on distinct ports.
- HTTP request rules for the network firewall — enforce path-level policies on outbound HTTP traffic (#230)
moat execcommand — run commands in an existing container (#232)env://secret resolver — forward host environment variables into containers as secrets (#236)- Host clipboard bridging — copy/paste between host and container during interactive sessions (#219)
- Rancher Desktop container runtime support (#239)
- Ollama service dependency — declare Ollama as a service in
moat.yamlwith provisioning and cache support (#238) - Meta Graph API credential provider (#226)
- Graphite CLI credential provider (#218)
- Host-local MCP servers — run MCP servers as processes on the host and relay them into the container (#183)
moat initcommand — scaffold amoat.yamland inject runtime context into the container (#207)- Expose per-path network rules to agents via the
MOAT_CONTEXTruntime context (#266) - Include documentation URLs in the
MOAT_CONTEXTruntime context (#228) ulimitsfield inmoat.yamlfor container resource limits (#211)tmpfs-backed excludable directories for filesystem mounts (#233)- Node 24 runtime support (#269)
- Separate credential proxy port from routing proxy — previously, credential injection and general traffic routing shared a port, which widened the proxy's attack surface. No action required; upgrading resolves this (#213)
- Complete run setup before registry insertion — previously, a race window during run startup could cause the proxy to serve requests before credentials were fully configured, resulting in failed or unauthenticated requests. No action required; upgrading resolves this (#250)
- Auto-clean stale routes on agent name collision — previously, reusing a run name while a stale route existed caused traffic to route to the wrong container (#237)
- Configure git to use SSH for GitHub when the SSH grant is active — previously, git defaulted to HTTPS even with an SSH grant (#252)
- Generate legacy-compatible Dockerfiles when BuildKit is unavailable — previously, image builds failed on Docker installations without BuildKit (#235)
- Rewrite proxy host for custom network gateways — previously, non-default Docker network configurations caused the container to fail to reach the proxy (#217)
- Resolve default runtime versions to prevent broken tarball URLs — previously, omitting a version in
dependenciescould produce a 404 during image build (#227) - Suppress interactive prompts for corepack and Playwright — previously, these tools blocked image builds waiting for TTY input (#223)
- Fail the Docker build on plugin and marketplace install errors — previously, install failures were silently ignored (#260)
- Add Claude CLI path so plugins can be pre-installed into container images — previously, the missing path caused plugin installs to fail silently (#261)
v0.3 replaces the per-run proxy with a shared daemon process that outlives the CLI and scopes credentials by run. The configuration file is renamed from agent.yaml to moat.yaml, and the attach/detach execution model is removed in favor of a single run lifecycle.
- Rename
agent.yamltomoat.yaml— rename the file in your project root; the old filename is no longer recognized (#204) - Remove attach/detach execution model — runs now have a single lifecycle;
moat attachandmoat detachno longer exist (#196)
- Shared proxy daemon with per-run credential scoping — a single daemon serves all active runs (#193)
- Credential profiles via
--profileandMOAT_PROFILE(#181) - Config-driven credential providers via YAML (#168)
claude --resume— resume a previous Claude Code run by ID (#187)- Prepackaged language servers in
moat.yaml(#185) - Initial prompt passthrough via
--args (#156) - Manual snapshots during interactive sessions via Ctrl+/ then s (#198)
- Import host git identity (name and email) into containers (#173)
- Resolve runs by name or ID prefix (#162)
claude.base_urlfield for host-side LLM proxies (#191)cleanandlistcommands are now worktree-aware (#182)
- Increase Apple container memory default to 8 GB (#203)
- Decouple Anthropic OAuth tokens from API keys per updated Anthropic ToS — run
moat grant claudeagain to re-authenticate (#190)
- Make proxy liveness checks resilient to transient failures — previously, a brief network hiccup during startup caused the CLI to report the proxy as down and abort the run (#199)
- Add timeouts to container operations and parallelize run loading — previously, a hung container blocked all CLI commands (#192)
- Improve Apple container runtime detection — previously, detection failed silently on some macOS configurations (#176)
- Clean up stale routes for stopped containers on startup (#172)
- Fail early when declared grants are unavailable — previously, runs started and failed mid-execution (#160)
- Mount main
.gitdirectory for worktree workspaces — previously, git operations inside the container failed for worktree-based projects (#157)
v0.2 removes the sessions abstraction in favor of runs as the single organizational unit, and adds worktree and npm registry support.
- Remove sessions feature — runs are the single source of truth; use
moat listto see runs (#151)
- Git worktree utilities for managing runs inside worktrees (#153)
- npm registry credential provider (#152)
- Connect to Docker Desktop's embedded BuildKit — previously, builds failed on Docker Desktop when BuildKit was only available via DialHijack (#150)
- Prevent Docker network leaks during cleanup — previously, orphaned Docker networks accumulated after failed runs (#149)
First public release. Supports Claude Code and Gemini agents on Docker (Linux, macOS) and Apple containers (macOS 26+ with Apple Silicon).
- Container isolation — each run executes in its own container with workspace mounting
- Credential injection via TLS-intercepting proxy — tokens are injected at the network layer, never exposed in the container environment (#128)
- GitHub device flow authentication and encrypted credential store (#125)
- Observability — stdout/stderr logging with timestamps, network request tracing, and trace spans (#107)
agent.yamlconfiguration — declarative runtime, dependency, and grant definitions (renamed tomoat.yamlin v0.3)- Automatic image selection based on declared runtime (Node, Python, Go) (#102)
- Service dependencies — sidecar containers (e.g., Postgres) with readiness checks (#102)
- Apple containers runtime on macOS 26+ with Apple Silicon (#102)
- Gemini agent support (#118)
moat doctordiagnostic command (#124)- Lifecycle hooks in
agent.yaml(#145) - TUI — interactive terminal with footer controls and trace overlay (#108)
- Audit logging with cryptographic hash chaining (#114)
- Homebrew tap and GoReleaser for automated releases (#142, #146)