Add human approval to Codex with Contro1
Route selected Codex shell actions to an accountable reviewer before they run, and use the same Contro1 workflow when Codex needs input from a person.
Start here
Give Codex the Contro1 MCP server for company apps, and stop chosen shell commands for a person with a Codex hook. Exact commands and what you should see.
Updated Oct 21, 2026
Codex connects in two independent parts: the Contro1 MCP server for company apps, signed in as you, and a Codex hook that makes chosen shell commands wait for a person in Contro1. There is no contro1 connect codex.
OpenAI's coding agent, in the terminal or the IDE. For: Codex. Acts as: You. Credential: Your MCP sign-in, and your contro1 sign-in for the hook.
Codex connects in two independent parts: the Contro1 MCP server for company apps, signed in as you, and a Codex hook that makes chosen shell commands wait for a person in Contro1. There is no contro1 connect codex.
Codex runs contro1 mcp serve as a local MCP server, signed in as you. It can then list and run the Actions you may use, every call checked by Contro1 and recorded as yours.
Signing Codex in to the remote address https://api.contro1.com/api/centcom/mcp directly (codex mcp login) does not work today. Codex's sign-in returns to a 127.0.0.1 address on the same computer, which Contro1 refuses. Use the local server below.
| Step | What to do | What you should see |
|---|---|---|
| Install the Contro1 CLI | curl -fsSL https://contro1.com/install.sh | sh contro1 --version | The installer ends with "Installed contro1 to <folder>", and contro1 --version prints "contro1 version 0.2.29" or later. On Windows, if contro1 is not found, open a new terminal: the installer added it to your PATH. |
| Sign the MCP connection in as you | contro1 mcp login --execute | "To connect, open this address on any device and approve: https://contro1.com/connect-app and enter the code: ABCD-EFGH". After you approve: "MCP connected for profile default (mcp:whoami, ..., mcp:actions:execute)." and "See or disconnect it anytime in Contro1: Settings > Connected apps." |
| Add Contro1 to Codex | codex mcp add contro1 -- contro1 mcp serve codex mcp list | codex mcp list shows contro1 with the command contro1 mcp serve. In Codex, /mcp lists contro1 and its tools. |
| Try it | In Codex, ask: "Who am I in Contro1?" | Codex calls the whoami tool, which names you and your organization. |
Once per computer. The installer downloads the contro1 program from its official GitHub releases. You can read it first at https://contro1.com/install.sh (PowerShell: https://contro1.com/install.ps1).
What you should see: The installer ends with "Installed contro1 to <folder>", and contro1 --version prints "contro1 version 0.2.29" or later. On Windows, if contro1 is not found, open a new terminal: the installer added it to your PATH.
This gives the local Contro1 MCP server a sign-in of its own, separate from contro1 auth login. --execute asks for permission to run Actions; without it the connection can only read and preview.
It shows a code and opens the approval page. You can approve on this computer or on any other device, such as your phone. On the page, check that "Run Actions as you" is ticked, then press Approve.
What you should see: "To connect, open this address on any device and approve: https://contro1.com/connect-app and enter the code: ABCD-EFGH". After you approve: "MCP connected for profile default (mcp:whoami, ..., mcp:actions:execute)." and "See or disconnect it anytime in Contro1: Settings > Connected apps."
Use the Codex command, or write the same entry into ~/.codex/config.toml yourself. Both do the same thing.
What you should see: codex mcp list shows contro1 with the command contro1 mcp serve. In Codex, /mcp lists contro1 and its tools.
In Codex, ask: "Who am I in Contro1?"
What you should see: Codex calls the whoami tool, which names you and your organization.
contro1 hooks codex is a Codex PreToolUse hook. Before Codex runs a Bash command that matches, it creates an approval request in Contro1 and keeps Codex waiting until a person decides. Other commands go through Codex's normal permission flow. It handles the Bash tool only: not apply_patch, other local tools or MCP calls.
By default it matches deploy-like commands: npm, pnpm or yarn deploy scripts, kubectl and Helm changes, Terraform or OpenTofu apply and destroy, Pulumi up and destroy, production Vercel or Netlify deploys, and selected cloud deploy commands.
| Step | What to do | What you should see |
|---|---|---|
| Sign in to Contro1 on this computer | contro1 auth login | "Logged in as you@company.com (Org: <your organization>)". |
| Add the hook to the project | {
"description": "Contro1 approval for selected Codex shell commands.",
"hooks": {
"PreToolUse": [
{
"matcher": "^BashAI Control Plane for Enterprise AI Agents | Contro1Control AI agents in production with human oversight built in. Contro1 routes approvals, escalations, and critical decisions to the right team by function, role, and shift. What Contro1 does
Key links |
quot;, "hooks": [ { "type": "command", "command": "contro1 hooks codex --role cto --environment production --setup convenience", "timeout": 910, "statusMessage": "Waiting for approval in Contro1" } ] } ] } }
The hook creates the approval request with this sign-in. A browser opens on a Contro1 approval page; approve it with your Contro1 account.
What you should see: "Logged in as you@company.com (Org: <your organization>)".
Put this file at .codex/hooks.json in the project. Replace cto with a reviewer role somebody in your organization holds (or is mapped to under Settings, Routing): only people with that role can approve the request.
What you should see: The file is saved in the project. Nothing else changes until Codex trusts it.
Open Codex in that project and run /hooks. Review the Contro1 hook and trust it. Codex records trust against the hook's exact text, so a changed hook has to be trusted again.
What you should see: /hooks lists the Contro1 hook as trusted for PreToolUse.
In a test project whose package.json has "deploy": "echo deployed", ask Codex to run npm run deploy.
What you should see: Codex shows "Waiting for approval in Contro1", and Contro1 shows a request titled "Approve production deploy from Codex?" with the command, branch, commit and working folder. Approve it and the command runs ("Approved by Contro1. Codex may run the exact reviewed command."). Reject it and Codex is told "Production deploy denied by Contro1." with the reviewer's comment. Nobody answering within 15 minutes counts as a refusal.
Codex is not registered as its own agent with a key in the Contro1 service, the way Claude Code is: there is no contro1 connect codex today.
| Part | What it gives | Acts as | Needs |
|---|---|---|---|
| Company apps (MCP) | Codex lists and runs the Actions you may use. Contro1 checks and records each call. | You | contro1 mcp login --execute and the contro1 entry in Codex |
| Approvals (hook) | Chosen Bash commands wait for a person in Contro1 before they run. | Your contro1 sign-in on that computer | contro1 auth login and .codex/hooks.json |
A project hook is a convenience: whoever controls the project configuration can change or remove it. To enforce it, distribute a managed Codex requirements.toml through your device or system policy, allow only managed hooks, and install contro1 at the administrator-controlled path the hook names. To protect production itself, keep deploy credentials off developer machines and release them only in protected CI after the approval is verified.
Codex approvals guide, with the managed template ยท Codex hooks reference
A connected agent starts with nothing. It can ask people for approval and report what it did. To use an application such as Gmail, two things happen in Contro1:
No. Codex connects through the local MCP server signed in as you (contro1 mcp login --execute, then contro1 mcp serve), and through the contro1 hooks codex hook for approvals.
No. It handles the Bash tool, for deploy-like commands by default or every command with --all-bash. apply_patch, other local tools and MCP calls are not gated by it.
No. Reject it and let Codex propose a new command, so each decision stays bound to exactly what was reviewed.
Route selected Codex shell actions to an accountable reviewer before they run, and use the same Contro1 workflow when Codex needs input from a person.
Install and use the contro1 CLI to register AI agents, create approval requests, push AI inventory, retrieve evidence and traces, and test workflows before using the SDK or API.
Choose the applications your organization approves, decide who may do what, and connect one MCP. Every person and agent gets exactly their access, and every action is recorded on their name.
Put a human approval in front of production deploys from Claude Code, Codex, local scripts, and GitHub Actions without confusing a convenience hook with an enforcement boundary.