The Claude Code sovereign runtime example is built around hooks. That is the right answer for Claude because Claude exposes those events directly. Codex currently does not.
So the Codex implementation has to answer a narrower question:
Where can we place controls that Codex cannot silently reason around, given today’s runtime?
The answer is not “more prompt text.” The answer is:
Codex exposes a dangerous startup mode:
--dangerously-bypass-approvals-and-sandboxThat is the first place a sovereign runtime has to intervene. If you let users or injected shell aliases normalize that flag, every downstream control becomes advisory. The wrapper in this package blocks that flag before Codex starts.
Codex’s current durable control plane is config.toml.
That means a secure baseline has to govern:
approval_policysandbox_modeweb_searchThis is the Codex equivalent of hardened settings files in other agent harnesses.
AGENTS.md Is Necessary But Not SufficientAGENTS.md matters because it shapes the model’s behavior around destructive operations, network use, prompt injection, and MCP scope. But it is not a sovereign boundary by itself.
AI SAFE2 requires external controls. For Codex today, AGENTS.md is one layer in a stack, not the stack.
Without per-tool hooks, Codex runtime monitoring is not as granular as Claude’s hook model. The compensating control is to:
This is weaker than per-tool interception but still materially better than trusting the agent runtime alone.
CI runs are the easiest place to enforce:
If you cannot fully govern desktop usage, govern CI first and treat workstation usage as semi-trusted development, not deployment authority.
The key lesson is simple: the sovereign runtime concept survives the platform change, but the mechanism changes. Copying the Claude hooks blindly into Codex would look similar while failing operationally. This package avoids that mistake.