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.
Security architecture
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.
Start with a five-minute developer gate, then move the production credential behind managed client policy and a protected CI or deployment boundary.
A convenience gate stops an autonomous coding agent before a recognized deploy command and gives developers a fast, low-friction approval flow. It is ideal for evaluation and daily guardrails, but the developer can still remove a project hook or run the command elsewhere.
An enforced enterprise setup controls the coding-agent configuration centrally and moves production credentials behind protected CI or a deployment broker. The approval job has only a scoped Contro1 token; the deploy job receives short-lived production credentials only after the approval succeeds. This is non-bypassable for the governed path, assuming branch, environment, identity, and policy administration are themselves protected.
Use a harmless script first. Contro1 sends the redacted command, hash of the original argv, commit, workspace-state hash, environment, target, risk, and policy trigger to the CTO. The original argv bound to that hash runs only after approval, and the CLI blocks if the repository state changes while the request is waiting.
The connector runs at Claude Code's PreToolUse boundary and, by default, gates deploy-like Bash commands. Tests, reads, and ordinary local work continue normally. Keep the agent token in user-level or managed settings, never in the repository.
The thin adapter reads a Codex PreToolUse or PermissionRequest event from stdin. It emits no decision for non-deploy Bash calls, so the normal Codex flow remains in control. It denies a recognized deploy on rejection, timeout, invalid policy, authentication failure, or API failure.
quot;, "hooks": [ { "type": "command", "command": "contro1 hooks codex --role cto --environment production --target billing-api --setup convenience", "timeout": 910 } ] } ] } }
Full Codex setup · Codex convenience and managed templates
Use two jobs. The approval job can read source and call Contro1, but it must not have cloud deploy credentials. The deploy job depends on approval, checks out the reviewed commit, enters a protected production environment, and obtains short-lived credentials through OIDC. Pin the Contro1 CLI release and every third-party action before production use.
A rejected, expired, timed-out, or unavailable approval fails the workflow closed. Protect changes to the workflow, environment reviewers, OIDC trust, and deployment policy with normal repository and identity controls.
Every path sends the same canonical request. context.action is the proposed tool and redacted input. context.machine_observed contains facts captured by the adapter, such as commit, command hash, workspace-state hash, target, and environment. context.agent_reported contains optional model-written justification and is never trusted for routing or risk. policy_trigger explains the organization rule. routing and approval_policy determine eligible reviewers, quorum, separation of duties, timeout behavior, and escalation.
Approve and Reject are the only decisions for a deploy approval. The API key decision_comment_policy controls whether the reviewer can decide with one click or must add a comment. A comment can explain a decision; it does not edit the command. If a different command is needed, reject and create a new request so the audit trail keeps both revisions clear.
Distribute Claude Code or Codex hooks through managed configuration, prohibit unmanaged overrides and bypass modes, and install the adapter at an administrator-controlled absolute path. Remove standing production credentials from developer laptops. Require a protected CI environment or deployment broker to verify the approved request and bind it to the repository, commit, environment, target, and workflow run. Use short-lived credentials, protect policy changes, fail closed, and export the resulting decision and deployment evidence.
No client hook can secure another terminal by itself. The deployment system or credential issuer is the final enforcement point. Describe a setup as non-bypassable only within its explicitly governed identity and execution path.
No. It is a strong convenience gate for the exact command it launches. A user who controls the machine and has direct production credentials can run another command outside it.
It makes the governed client path resistant to user or project configuration bypass. Protect production itself by keeping credentials behind protected CI or a deployment broker that releases them only after the approval.
Not in this release. The approver can approve, reject, and add a policy-controlled decision comment. A changed command must be submitted as a new request with new hashes.
Route selected Claude Code actions to a manager or other eligible reviewer before they run, with production deployment as a practical quickstart example.
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.
Learn how to create, inspect, and cancel Contro1 requests for approvals, clarifications, and escalations.
Use Contro1 audit records to log actions that agents are authorized to run autonomously, and correlation_id to connect requests and logs into one case timeline.
A short practical guide for assigning an AI agent owner: who should be accountable, when a VP or department head should own it, and how to record fallback ownership.
Your ERP is the system of record for money and your CRM for customers. AI agents now take real business actions with no system of record at all. Here is what one must capture and how to stand it up fast.