On this page
On this page
Codex runtime reference
Codex restricted turns
Which tool policies push a Codex turn onto the restricted native surface. Part of the Codex harness reference; Where each section moved lists every section.
Restricted turns
The Codex harness evaluates the effective tool policy when each turn starts. It marks the turn policy-restricted when any explicit policy would otherwise leave a Codex-native capability outside the OpenClaw policy boundary. Changes apply when the next turn starts, including in an existing conversation; they do not revoke the policy of a turn already in progress.
Restriction sources include global, provider, agent, group, sender, sandbox,
subagent, inherited, scheduled/runtime, and per-run tool policies. A finite
allowlist always restricts the native surface. A deny list restricts it when an
expanded entry is unknown or absent from the audited safe-deny set; this includes
wildcards and tool groups containing any unsafe entry. disableTools becomes an
empty per-run allowlist and therefore also restricts the native surface. Default
tool-profile narrowing is not an explicit restriction and does not activate this
mode.
The current audited safe-deny names are:
A policy containing only those denies stays on the normal Codex native surface;
the harness applies the named OpenClaw denial directly. Any other deny uses
the restricted surface. For example, tools.deny: ["nodes"]
restricts the native surface because nodes is not in the audited set.
Plugin-owned names must also be present in the current plugin manifest metadata.
For example, denying Memory Core intent blocks that tool without disabling
hosted apps such as GitHub. The same applies to the audited LanceDB and Memory
Wiki tools above; they operate on OpenClaw-owned memory stores, not Codex native
memory. Plugin ownership alone does not make a denial safe: unknown names and
unaudited plugin tools still use the restricted surface.
OpenClaw admin and status denies alone do not remove native Codex tools.
OpenClaw sets agents.enabled=false and turns off features.multi_agent and
features.multi_agent_v2 on every thread it starts or resumes, so
spawn_agent, send_input, resume_agent and the v2 cross-thread tools are
not available; delegation uses sessions_spawn. When a session, conversation or
delegation-tool deny applies, managed Codex requirements or legacy managed config
that pin multi_agent or multi_agent_v2 on make the turn fail before inference
instead of re-enabling delegation. Without such a deny, a managed pin wins and
Codex keeps its native tools.
Policy-restricted turns have no Codex environment selection or native Code Mode. OpenClaw disables inherited and configured MCP servers, attests that they remain disabled, disables native hook relays, and applies the effective policy to its dynamic tools. Compatible conversation-wide restrictions keep one native Codex thread. A temporary restriction uses a transient thread and preserves any existing conversation binding for later resume. Run-owned additive plugin grants also use a transient thread even when native tools remain enabled. Scheduled requests without an effective policy change keep the ordinary conversation. See Restricted turns and ring zero for policy changes and replacement behavior.
Ring zero is not a configurable policy profile. It is the host-scoped system
agent path used by OpenClaw setup and repair flows. The host must activate the
system-agent authority and provide the exact single-tool allowlist
["openclaw"]. Ring zero applies the restricted tool surface plus host-authored
base instructions and zero project-document budget. It also suppresses
OpenClaw's AGENTS.md developer-instruction carrier, so ambient workspace
instructions cannot enter the setup/repair turn.
Message-only source replies also use the restricted tool surface. Lightweight bootstrap turns and tool-disabled internal turns additionally set the project- document budget to zero. These modes are separate inputs even when their final thread configuration overlaps.
For supported checks before inference, see Codex pre-turn verification.