.o4 folder and .o4.md, usually once per repository you work in.
When o4 asks
When you start o4 in a folder that isn’t trusted, it asks first, before it reads anything from the folder:Up/Down or k/j move between the two answers.
o4 doesn’t ask:
- in a folder you trusted, or a folder inside one;
- in one-shot runs (
-p,--print,--print-system-prompt) and subcommands such aso4 mcporo4 plugin; - when o4 isn’t attached to a terminal, for example in a script or a pipe.
o4 trust.
Trust a workspace from the command line
To trust a folder without starting a session, runo4 trust from the workspace’s root:
o4 untrust from the same directory:
o4 untrust removes only the exact directory you run it in. If you trusted a parent directory, subdirectories stay trusted until you untrust that parent.
What trust controls
Until a workspace is trusted, o4 ignores these project files and folders:
In an untrusted workspace, o4 also keeps your global memory (
~/.o4/memory/global.db) out of the session. Project memory still works.
Trust also gates these actions in an untrusted workspace:
o4 mcp add <name>refuses to add a project MCP server. Pass--globalto add it to your own config instead.o4 plugin install --projectrefuses to install a project plugin.o4 mcp approverefuses to approve project MCP servers; trust the folder first.o4 --as <name>@<team>doesn’t read the member’s team mail, and says so.- In Ringside,
nstarts a new session only in a trusted directory. Otherwise it shows “<dir>is not a trusted workspace”.
AGENTS.md, CLAUDE.md, .o4.md and .o4/instructions.md) are read whether or not the workspace is trusted. They are text for the model and can’t run code by themselves, but the model follows them and can run commands. If one of these files says to commit, push, merge or install after work, the model treats that as you asking and does it without checking with you first. Before o4 0.4.44, some models asked first or skipped such steps.
Your permission mode still decides whether each command runs. In ask, o4 prompts before every shell command, unless an allow rule or a hook lets it run. In an untrusted workspace, the project’s own rules and hooks are ignored. In auto and bypass, and in print mode by default, commands run without asking. Read a repository’s instruction files before you let o4 work there without prompts.
When o4 skips a project’s .o4/config.toml, .o4/config.local.toml or .o4.md, it logs a warning to ~/.o4/o4.log that starts “Ignored project configuration because this workspace is not trusted.” The TUI shows startup suggestions when it skips project plugins or MCP servers. Skipped project MCP servers are also listed by name, as skipped: this folder isn't trusted, in o4 mcp list and in /mcp.
O4_TRUST_WORKSPACE=1 also approves every project MCP server, the way it trusts every folder, so automation that sets it keeps its project servers.
After “Not now”
If you answer Not now, o4 points out what it skipped when it matters:- If a project has MCP servers in
.o4/.mcp.jsonor a.mcp.jsonat its root, o4 shows a suggestion at startup: “N project MCP servers skipped in<path>: workspace is untrusted. Trust and load?” Accepting it trusts the workspace, aso4 trustdoes, and starts, without a restart, the project servers you have already approved. The others wait for your OK, and o4 says so: open/mcpto see what each runs and approve it. The rest of the project configuration, such as hooks, permission rules and settings, loads from the next session. - If a project has a
.o4/plugins/folder, the startup suggestion tells you the plugins were ignored and to runo4 trustafter you’ve reviewed the checkout. - In a fresh clone, o4 suggests the
airlocksandbox. See Sandbox.
Where trust is recorded
o4 records trusted directories in~/.o4/trusted_workspaces.json:
airlock_suggestion_seen list records workspaces where o4 has already suggested the airlock sandbox tier (see Sandbox).
Commands in a sandboxed tier can’t read or change this file. If o4 can’t read it, for example because it is malformed or a symlink, every workspace is treated as untrusted.
Skip trust for one run
Two options skip trust without recording anything. Both are meant for automation that already vets the repository, such as CI jobs.O4_TRUST_WORKSPACE=1 treats the current workspace as trusted for that process:
--dangerously-bypass-hook-trust is narrower. It loads only the hooks from .o4/config.toml, .o4/config.local.toml and .o4.md for this run. Every other project setting, the project MCP servers, and the rest of the list above stay ignored: