Skip to content

Policies, MCP, network and audit

Every call in one project is denied with kernel-error, and openmoat status there says repo policy ✗ …; every call in this project is denied. The project’s .moat/policy.yaml:

  • cannot be read or parsed;
  • sets a key a repository may not (only version, deny, review and allow are accepted; ask, the name of review before 0.14.0, is still read, but a file with both ask and review is refused);
  • or is not a regular file.

OpenMoat never ignores it, because that would drop the team’s deny rules. Fix the file in your own editor (the agent cannot write .moat/), then run openmoat status again. The rule syntax: The policy file.

openmoat status in the project says not trusted: … or changed since `openmoat trust`: …: its allow rules wait until you trust that exact file. Read it, then run openmoat trust there (Use it in your projects).

A repository’s allow rules stopped applying after openmoat trust

Section titled “A repository’s allow rules stopped applying after openmoat trust”

Your policy has require_signed_repo_policy: true, so only a signature by a trusted key lets a repository policy allow. openmoat status in the project says not signed by a trusted key: tightening only. Ask the maintainer to sign .moat/policy.yaml with -n openmoat-repo-policy (a signature made before 0.9.0 no longer counts), or remove the setting with openmoat edit.

The signature did not verify, or it was made by a key you have not trusted. Check that <pack>.yaml.sig belongs to that exact file and was made with -n openmoat-pack (signatures made with -n openmoat-policy before 0.9.0 no longer verify), then trust the signer’s key with openmoat policy trust-key <key.pub> --name <who>. A key trusted before 0.9.0 needs trust-key again. The commands need the system ssh-keygen from OpenSSH 8.1 or later. See Signed policy packs.

An MCP server’s tools are denied with mcp-server-changed

Section titled “An MCP server’s tools are denied with mcp-server-changed”

Its definition changed, or it was added, since you last accepted the agents’ MCP servers. Run openmoat mcp accept <server>: it shows the change and asks. See MCP servers.

A wrapped MCP server shows no tools after an upgrade

Section titled “A wrapped MCP server shows no tools after an upgrade”

Since 0.9.0, openmoat mcp proxy pins more of each tool (its title, output schema, annotations and every other field), so every tool it pinned before is held once, even unchanged. openmoat status says so. Run openmoat mcp accept once.

A wrapped MCP server’s calls fail with error -32001 (mcp-unattributed)

Section titled “A wrapped MCP server’s calls fail with error -32001 (mcp-unattributed)”

From 0.12.0 openmoat mcp proxy is a gateway: it passes a call only when it finds the agent hook’s decision for that exact call (the same tool and arguments, within the hour).

The agent did not run OpenMoat’s hook for it (openmoat status says whether each agent is set up), or something other than an agent is using the wrapped server. openmoat mcp unwrap <server> takes the gateway out of that server’s path. With another rule in the message, the policy denies what the call’s arguments name. See The MCP gateway.

Sandboxed commands get 407 Proxy Authentication Required

Section titled “Sandboxed commands get 407 Proxy Authentication Required”

From 0.12.0 openmoat proxy serves agent sessions only. Run openmoat init once so Claude Code gets its SessionStart hook, then start a new Claude Code session; until then its sandboxed commands get 407. A Codex started with HTTP_PROXY pointing at openmoat proxy sends no credential: run it under openmoat run -- codex, or set sandbox.proxy_serve_without_credential: true (which openmoat policy lint, doctor and status warn about). See The proxy serves agent sessions only.

A request to a brokered secret’s host gets 403

Section titled “A request to a brokered secret’s host gets 403”

The secret has allow rules and the request is not one they name; openmoat show lists it under proxy-secret-route with its method. Widen the rules with openmoat edit if the request is one you mean. A 502 under proxy-tls means the client could not complete the terminated tunnel: it ignores SSL_CERT_FILE and NODE_EXTRA_CA_CERTS (Go programs such as gh on macOS), pins certificates or speaks only HTTP/2. See Secrets over HTTPS.

A connection to a port other than 443 or 80 is refused

Section titled “A connection to a port other than 443 or 80 is refused”

Through openmoat proxy and openmoat run, a host allowed without a port is reached on ports 443 and 80 only, and any other port is refused (proxy-port). Add a rule that names the port with openmoat edit, and keep the bare host in it too, because the hook decides by host alone and a host:port pattern matches nothing there:

allow:
- id: example-8443
reason: the staging API listens on 8443
net: ["example.com", "example.com:8443"]

openmoat policy check-diff reports files you meant to change

Section titled “openmoat policy check-diff reports files you meant to change”

A pull request check (Check a pull request) reports every change to a file that runs later or steers an agent, whoever wrote it. A finding is a report, not a block: look at the change, then merge it. To make the step fail only on deny, set fail-on: deny in the workflow. A change to the policy file the check reads is reported as diff-policy and applies from the next pull request after it is merged.

An event that an anchor recorded is no longer in the log, or has another hash: the log was cut short or rewritten after you anchored it. The message names the first such anchor. Look at the events around it with openmoat show, and keep the database file as it is while you find out what changed it.

An older OpenMoat cannot open the audit log

Section titled “An older OpenMoat cannot open the audit log”

Each release that adds to the audit database moves it to a new schema version the first time it writes (0.6.0: file provenance, schema 4; 0.11.0: the session’s writes, schema 5; 0.12.0: the gateway’s decisions and the taint answers, schemas 6 and 7; 0.14.0: the review verdict, schema 8), and an older openmoat then refuses to open it. Upgrade every openmoat (and any older moat) on the machine to the same release.