OpenMoat 0.11.0
Released 2026-10-28. GitHub release v0.11.0.
What is new, by feature
Section titled “What is new, by feature”| Feature | Page |
|---|---|
| Running a file the same session wrote asks where no OS sandbox from OpenMoat holds the command | Code the agent wrote |
| Inline code that builds the names it opens, connects to or runs asks | Inline code with built names |
| Every supported agent’s login, provider keys and OAuth tokens are denied to the agent’s tools | Agent logins and keys |
| Reading or copying a folder that holds denied files asks | Folders that hold denied files |
| OpenClaw, pi and OpenCode report that they loaded OpenMoat’s plugin | Did the agent load the plugin? |
| OpenClaw runs the parameters OpenMoat checked | OpenClaw |
| OpenCode 1 and 2 through one plugin; Hermes Agent | OpenCode, Supported agents |
Security
Section titled “Security”- New default rule
agent-credentials(hook only): the agent’s own tools may neither read nor write the files where Claude Code, Codex, GitHub Copilot CLI, pi, Gemini CLI, OpenCode, Hermes Agent, OpenClaw and the Continue CLI keep their login, provider keys and OAuth tokens (OpenCode’s~/.local/share/opencode/auth.json, Hermes Agent’sauth.jsonandmcp-tokens/, Codex’sauth.json, …), in a moved agent directory too;pi auth print-api-key,pi auth print-bearer-token,opencode auth exportandsecret-tool lookupare denied, andclaude setup-tokenasks (agent-token). Underopenmoat runeach agent still reads its own login (#666). - An agent running its own CLI to save an MCP server, turn one on or start an MCP OAuth sign-in (
claude mcp add,codex mcp add,gemini mcp add,opencode mcp add/auth,hermes mcp add, …) asks (runs-later), as does a write of the Continue CLI’s~/.continue/config.yaml;mcp listandmcp getare unchanged (#666). openmoat statusandopenmoat doctorwarn, in one line, when an agent on the search path is a version with a published security advisory that a later version fixes, such as the OpenCode MCP OAuth command execution on Windows and WSL (1.0.137 to 1.18.32) and pi’sauth.jsonwrite race (before 0.78.1) (#666).- OpenCode’s
OPENCODE_CONFIG_DIRand the Hermes Agent profilesopenmoat initfinds get the protection of the agent’s own configuration directory; Hermes Agent’smemoryandskill_managetools are checked as writes of itsmemories/andskills/, so the session-taint andruns-laterasks apply;openmoat statusandopenmoat doctoralso warn about a project’sopencode.jsonc,.opencode/opencode.jsoncand.opencode/plugin/(#666). moat guardbuilds a path pattern’s matcher only for a path that can begin as the pattern’s literal start does, so a call that names a file no longer builds every file pattern of the policy; the verdicts are unchanged (#666).- Reading or copying a folder that holds files a deny rule names now asks (
protected-contents, ADR-038). Before,cp -r ~/.codex /tmp/c,grep -r token ~/.gemini,tar czf a.tgz ~/.hermes,rsync -a ~/.local/share/opencode x,zip -r a.zip ~/.copilotorcp -r ~/.docker xdeferred: the classifier sees one read of the folder, andagent-credentialsandsecrets-pathsname files inside it. Every deny rule’s paths now protect the folders they lie in, in every spelling (moved agent directories, other case on macOS and Windows), for reads and for writes into the folder.ls ~/.codexandls ~/Libraryask too (the home folder and the folders above it are left tohome-sweepanddestructive, sols /is unchanged); folders inside a project are unchanged, sogrep -r TODO .stays allowed. Hosts that cannot ask deny it with theopenmoat allow --lasthint (#670). - An extraction is a write of the folder it extracts into:
tar -x … -C DIR(--directory, alsogtarandbsdtar) andunzip … -d DIR, or the working directory without one.tar xf e.tar -C ~/.claudeandunzip e.zip -d ~/.moatwere deferred and are now denied bykernel-self;tar xf e.tar -C ~is denied bydestructive(#670). git checkout [<tree-ish>] [--] <path>…writes each path, asgit restoredoes:git checkout main -- .github/workflows/ci.ymlandgit checkout .claude/hooks/x.shask (runs-later) instead of deferring or being allowed, andgit checkout -- ~/.claude/settings.jsonis denied;git checkout -- src/main.rsandgit checkout mainare unchanged (#670).shell-rcalso denies writes to fish’s startup files (~/.config/fish/config.fish,conf.d/,functions/), the login and logout files (~/.zlogin,~/.zlogout,~/.bash_login,~/.bash_logout,~/.login), csh, tcsh, ksh and mksh startup files (~/.cshrc,~/.tcshrc,~/.kshrc,~/.mkshrc) and the drop-in folders~/.bashrc.d/and~/.zshrc.d/, which run as often as~/.zshrcand were deferred; the host sandboxes deny them too. Reading them is unchanged (#671).- Writing into a folder on
PATH(~/.local/bin,~/bin,~/.cargo/bin,/usr/local/bin,/opt/homebrew/bin) now asks (persistence): a file there named aftergit,lsornoderuns in its place later.install -m755 evil ~/.local/bin/gitandln -sf evil ~/.local/bin/gitwere deferred. Installers (pipx install,uv tool install,cargo install,brew install,npm i -g) are commands, not writes, and are unchanged (#671). env-dumpalso denies inline Python that reaches the environment through__import__('os')(python3 -c 'print(__import__("os").environ)',__import__("os").__dict__), which was deferred. An alias (e = os.environ; print(e)) is still not followed (#671).killof the pids a command substitution namingmoatlooks up now asks likepkill openmoat(stops-openmoat):kill -9 $(pgrep openmoat),kill $(pidof moat)andkill `pgrep -f openmoat`were deferred.pgrep openmoatalone andkill $(pgrep node)are unchanged (#671).- Writing what every Python start runs now asks (
runs-later), the allowedpytestincluded: a.pthfile in asite-packagesordist-packagesdirectory, andsitecustomize.pyorusercustomize.pyanywhere, a project’s.venvandsrc/included. They were deferred outside the project and allowed inside it. Session taint protects them too; the host sandboxes leave them writable, since installs write them (#671). - Running a file the same agent session wrote now asks where no OS sandbox from OpenMoat holds the command (
session-written-code, ADR-039): on OpenClaw, GitHub Copilot CLI, pi, Gemini CLI, OpenCode and Hermes Agent, and on Claude Code and Cursor on native Windows or with their sandbox not in place. Before, an agent could writex.pyand runpython3 x.py,node x.jsorgo run x.go(allowed) orbash x.sh,ruby x.rborperl x.pl(deferred), and the script could read~/.ssh/id_rsathrough a path it builds. Every interpreter form (python3 -u x.py,python -m tool,node -r ./x.js,deno run,bun,php -f,pwsh -File,npx tsx,sh < x.sh,source x), a program named by a path (./x,bin/x), and inline code importing a module the session wrote (python3 -c 'import tool') count, throughenv,time,bash -cand the other wrappers; so do shell writes (echo … > x.sh; bash x.sh). Claude Code, Codex and Cursor with their sandbox in place on macOS and Linux, andopenmoat run, are unchanged. A session grant (openmoat allow --last) answers it until the session rewrites the file; OpenCode 1 denies it with that hint. Files the session did not write (python manage.py) and test runners (pytest,npm test,cargo test) keep their verdict. The audit log moves to schema 5, which records each session’s writes, bounded to 30 days and 100 000 files (#672). - Inline interpreter code that opens files, connects, reads the environment or runs programs with text it builds at run time now asks (
opaque-code), with-c/-eand in a here-document alike:python3 -c 'print(open(os.path.expanduser("~/.s"+"sh/id_rsa")).read())',node -e "require('fs').readFileSync(process.env.HOME+'/.ss'+'h/id_rsa')"andperl -e 'open F,"$ENV{HOME}/.s"."sh/id_rsa";print <F>'deferred before.python3 -c 'print(1+1)',node -e 'console.log(2)'and code that hands those APIs literal text keep their verdict (#672). - Inline interpreter code that writes a file now writes every file name it shows, not only reads it:
python3 -c 'open("/Users/me/.zshrc","a").write("x")'and its Node, Ruby, Perl, PHP, Deno and Lua equivalents are denied byshell-rc(they were deferred as reads), writes of~/.claude/settings.jsonbykernel-self, a workflow written that way asks (runs-later), and a script written by a one-liner counts as written by the session forsession-written-code. Code that only reads keeps its verdict (#672). - OpenClaw now runs the parameters OpenMoat decided on (ADR-041). OpenClaw shows each
before_tool_callhandler the call as it came and runs theparamsof the last one that returns some, so another plugin could turn a checkedgit statusintocat ~/.ssh/id_rsaand that ran. OpenMoat’s plugin now decides at the highest priority and returns the parameters it checked at the lowest, which undoes such a change; a plugin that changes a call and asks for approval in the same answer keeps its change once a person approves it, as THREAT_MODEL §5 says (#674). - A plugin its agent did not load no longer looks protected (ADR-042). OpenClaw, pi and OpenCode start without a plugin that fails to load and then run every call unchecked. OpenMoat’s plugins now run
openmoat guard --heartbeat --host <id>as they load, andopenmoat statusandopenmoat doctorsay “plugin not loaded yet” (a note) until the plugin has reported or sent a call sinceopenmoat initwrote it or the agent was updated; when pi wrote a session since without either, they warn and report pi as not protected.openmoat status --format jsonlists it underplugins. The default policy denies an agent runningopenmoat guard --heartbeatitself (kernel-self), so one agent cannot report another’s plugin as loaded (#674). - An entry of OpenMoat’s without the agent’s fail-closed key (
fail_closed: truefor Hermes Agent,failClosed: truefor Cursor) is reported as not protected, with the reason, instead of “out of date”: the agent would run a call whose hook failed.openmoat initputs the key back (#674). - Hermes Agent’s limits are documented from its source: its
plugins.hook_callback_timeout(30 s by default) blocks a call whose hook has not answered, before the entry’s own 60 s and together with the guard’s own 30 s, soopenmoat initleaves it alone; and Hermes runs a call unchecked when its own hook dispatcher raises an error (#674). - The OpenClaw, pi and OpenCode plugins are type-checked (
// @ts-check, strict,scripts/ci/check-js.sh) and each runs under Node against a stand-in for its host and for the guard in the tests: every failure of the guard blocks, a deny, ask, allow and no answer reach the agent as they must, and the OpenClaw rewrite is undone (#674).
- Hermes Agent is a supported agent (
openmoat init --hosts hermes, hook only): onepre_tool_callhook withfail_closed: truein itsconfig.yaml, edited as text so your comments stay, and its command approved inshell-hooks-allowlist.json, without which Hermes’s gateway, cron and ACP sessions skip it;openmoat statusandopenmoat doctorreport a hook the allowlist does not approve. An ask is Hermes’s own approval prompt, and a deny you approve withopenmoat allow --lastwhere Hermes would approve it unseen (YOLO mode,approvals.mode: off). The lock pins both files, the MCP servers inmcp_serversone by one, andkernel-selfprotects Hermes’s configuration, allowlist,.env, plugins and hooks and deniesHERMES_SAFE_MODE(#665). - OpenCode 1 (
opencode-ai) is a supported agent, hostopencode, hook only:openmoat initwrites OpenMoat’s plugin to~/.config/opencode/plugins/openmoat.js(or$XDG_CONFIG_HOME/opencode), which checks every tool call throughtool.execute.beforeand blocks the call whenopenmoatis missing, fails or takes over 45 s. OpenCode 1 cannot ask, so anaskis a deny that says how to approve the call. The default policy denies the agent changing the plugin and the files that load plugins, starting OpenCode with--pureorOPENCODE_PURE,opencode upgrade --majorandopencode plugin --global, and asks before it writes other plugins, custom tools, commands or a project’sopencode.json. OpenCode 2 support follows in the next entry (#665). - OpenCode 2 (
@opencode/cli) is supported, through the sameopencodehost and one plugin for both versions (ADR-040): OpenMoat’s plugin exports{ id, server, setup }, so OpenCode 1 (1.3.4 and later) runs it ontool.execute.beforeand OpenCode 2 onexecute.before, and an upgrade from 1 to 2 needs no newopenmoat init;openmoat statusandopenmoat doctorname the hook theopencodeon the search path runs. On OpenCode 2 anaskis OpenCode’s own permission prompt (OpenCode 1 still receives it as a deny with theopenmoat allow --lasthint), and the plugin replaces the call’stoolandinputwith what it checked, frozen, so another plugin that rewrites the call afterwards makes it fail; the shell command it checked is pinned the same way when OpenCode starts it. OpenCode 2’s tools (shell,read/write/editwithpath,patch,opencode_worktree_remove, …), its~expansion and itsmcp.serversare read.-openmoat(or-*) in OpenCode 2’splugins, or a policy denying the plugin, makesopenmoat statusandopenmoat doctorreport OpenCode as not protected (the person’s ownopencode.json[c]) or warn about the project; the default policy denies the agent settingOPENCODE_CONFIG_DIR,OPENCODE_CONFIGorOPENCODE_CONFIG_CONTENT, writing OpenCode 2’sservice*.json, and runningopencode plugin add|remove|updateoropencode service set|unset. WithOPENCODE_CONFIG_DIRset,openmoat initinstalls the plugin there, which both versions load. OpenCode before 1.3.4, which loads no object plugin, is no longer set up:openmoat statussays to upgrade (#673).
Changed
Section titled “Changed”- Breaking Library crates (API, breaking):
openmoat-hostsreplacesInstallSpec::unsupportedwithInstallSpec::versions(the oldest version that loads OpenMoat’s plugin and the hook each major runs) and addsInstallSpec::heartbeatandHookFile::fail_closed_key;openmoat-auditadds the session-writes table (schema 5) andStore::host_seen_since;openmoat-coreaddsCompiledPolicy::executed(#672, #673, #674).
.env.distand.env.<mode>.exampletemplates are no longer blocked bysecrets-paths(#668).openmoat doctor --format jsonnames GitHub Copilot CLI’s checks after the agent: a name as wide as the text output’s column ran into its detail, so tools reading the JSON (OpenMoat Bar) did not find the agent’s protection line (#683).