Add human approval to Claude Code with Contro1
Route selected Claude Code actions to a manager or other eligible reviewer before they run, with production deployment as a practical quickstart example.
Integrations
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.
Add a native Codex PreToolUse gate for reviewed shell actions, from a five-minute project setup to organization-managed hooks and protected production credentials.
Use the adapter when a Codex shell action should wait for an accountable person: a production deployment, infrastructure mutation, database migration, release operation, or another organization-specific command. Production deployment is the quickstart example, not a claim that every Codex workflow is a deploy workflow.
The current adapter is intentionally thin. It handles the Bash tool, recognizes common deploy commands, creates a canonical Contro1 approval request, waits for the decision, and returns allow or deny to Codex. It does not yet gate apply_patch, arbitrary local tools, or MCP calls.
Install the public Contro1 CLI, sign in with the safe agent profile, register the Codex agent, and verify connectivity before adding a hook. Agent credentials can create and wait for their own requests but cannot claim or answer operator requests.
Put the hook in a trusted project at .codex/hooks.json, then open /hooks in Codex to inspect and trust the exact definition. Codex records trust against the hook hash, so a changed hook must be reviewed again.
This default setup gates recognized deploy-like Bash commands. A normal test, read, or local command produces no Contro1 decision and continues through the usual Codex flow.
quot;, "hooks": [ { "type": "command", "command": "contro1 hooks codex --role cto --environment production --target billing-api --setup convenience", "timeout": 910, "statusMessage": "Waiting for human approval" } ] } ] } }
Codex hooks reference · Complete convenience template
The built-in policy recognizes common production mutations including npm, pnpm, or yarn deploy scripts; kubectl mutations; Helm changes; Terraform or OpenTofu apply and destroy; Pulumi up and destroy; production Vercel or Netlify deploys; selected cloud deployment commands; and deploy-oriented GitHub workflow runs.
Repeat --match to add an organization-specific regular expression. Use --all-bash only when every Codex shell command should be reviewed; it is deliberately broader and can add substantial operator friction.
A gated action is an approval request: the reviewer approves or rejects the exact reviewed command. A policy-controlled decision comment can explain that decision, but it is not a replacement command and it is not a free-text response.
When Codex needs information rather than permission, create a free_text request with contro1 ask and wait for response.decision_type=respond. The returned string can be passed back into the agent workflow. Keeping these flows separate prevents an ambiguous Respond button from leaving a risky command without a terminal approve or reject decision.
The request contains the redacted command and tool input, hashes of the original values, working directory, branch, commit, workspace-state hash, environment, target, Codex session and tool identifiers, enforcement setup, risk, policy trigger, required role, quorum, separation of duties, and timeout behavior.
Machine-observed facts are kept separate from agent-reported justification. The agent cannot choose its reviewer or downgrade the request risk by changing prompt text.
Distribute requirements.toml through a supported cloud, MDM, device, or system policy channel. Pin hooks on, allow only managed hooks, and install the Contro1 binary at the administrator-controlled absolute path referenced by the hook.
Managed Codex configuration protects the configured Codex path. To protect production itself, remove standing deployment credentials from developer machines and release short-lived credentials only inside protected CI or a deployment broker after the approval is verified.
Complete managed template · Production credential-boundary architecture
No. The current public adapter handles Bash and can gate deploy-like commands or all Bash commands. Codex supports hooks for additional local tools, but the Contro1 adapter must add and test those mappings before we document them as supported.
Use Respond for a separate free_text request created with contro1 ask. A risky command still requires a terminal approve or reject decision; a decision comment can accompany either outcome.
No. Reject the request and submit a new command so its input hash, policy evaluation, and decision history remain immutable and reviewable.
No. Use centrally managed hooks for the Codex path and protect the production credential behind CI or a deployment broker for target-side enforcement.
Route selected Claude Code actions to a manager or other eligible reviewer before they run, with production deployment as a practical quickstart example.
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.
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.
Learn how to create, inspect, and cancel Contro1 requests for approvals, clarifications, and escalations.