Skip to content
Isonapse
Install

OpenAI Codex CLI and other agents

Connect OpenAI Codex CLI or your own agent through the open Hook ADK.

OpenAI Codex CLI and other agents

OpenAI Codex CLI · through the open Hook ADK

Codex CLI connects through the reference adapter in the Hook ADK, the open-source (Apache-2.0) adapter toolkit inside current Agent Hook releases.

With Docker: the easy install connects Codex for you. isonapse setup prepares the adapter, then registers it, adds its hook definitions to Codex and trusts them, as one plan you approve in your terminal. The dashboard's Hosts page adds, removes or re-adds Codex the same way. The plan also sets approvals_reviewer = "user" in Codex's settings, so an approval request the adapter does not answer comes to you. It needs codex-cli 0.159.0 or newer, and Node.js 22 or newer: a real file rather than a shim, in folders only you or root can change, and not Homebrew's. nvm install 22 gives you one, and so does the nodejs.org installer unless its folder is group-writable. On macOS, Codex and its settings folder must be on the startup disk. isonapse hook codex-adapter prepares the adapter and its pin, and changes nothing governed.

By hand: you review the adapter and register it as a host profile, which needs OS authentication and a daemon restart. Then add its six hook definitions to Codex and trust them in Codex's /hooks. The adapter needs Node.js 22 or newer at a path only you or root can change.

What it does: while the adapter runs, each Codex shell command, single-file patch and MCP tool call goes to the same local policy engine as the built-in hosts. In Normal and Enforce, Isonapse can block the call, replace its exact input, or withhold its result from the model. The adapter denies the PermissionRequest events Codex sends it. It also refuses the opt-in request_permissions tool before it runs, through PreToolUse. When the control plane decides and witness storage is available, it records a distinct signed DENY for each route, including in Profile. If the Hook cannot decide, the running adapter refuses without a denial receipt. With the setting that blocks personal data in prompts, a prompt that carries it does not reach the model.

Limits:

  • Whenever Isonapse's final decision is to ask, Codex gets a refusal instead, because its hooks cannot ask you. The daemon records that refusal when its witness storage is available.
  • Codex cannot take a replacement result, and withholding a result does not undo what already ran.
  • The adapter refuses multi-file, delete and move patches itself.
  • When Isonapse cannot check a prompt itself, because its control plane is not running or its check of the prompt fails, the prompt reaches the model unchecked and Codex shows a warning; tool calls are still refused while the control plane is down.
  • Codex is a cooperative, fail-open host: the adapter refuses every failure it can see. But if Codex cannot start the adapter or has not trusted its hook definitions, Codex runs the tool anyway, with no check and no receipt.

Check it: after setup, after every Codex update and after any change to the hook definitions, make one harmless call. Then confirm that isonapse hook report --host <host ID> --details shows a new receipt; isonapse hook host-profile list prints the full adk-codex-… ID. Isonapse also warns in isonapse hook status when the registration or pin of a registered host, the Codex hooks.json, or the Isonapse install changed, or a session of that host started, and no tool decision from that host followed. The hook definition or an activity file of another host is watched only after you declare it with isonapse hook host-profile evidence. For a fail-open host, this is an early warning, not a guarantee.

Versions: codex-cli 0.159.0 or newer, contract-tested on codex-cli 0.164.0 on macOS arm64 and Linux x86_64. Other versions, including the builds Codex's IDE extension and the ChatGPT desktop app bundle, are unqualified. The adapter does not check the Codex version.

Updates: isonapse update refreshes an existing Codex pin file. If you already replaced the Isonapse binaries by hand and the pin is stale, run isonapse hook restart and then isonapse hook adk-pin. A stale pin makes the adapter refuse the call.

Full setup is in the Codex reference README inside the toolkit, at $(brew --prefix)/share/isonapse/isonapse-adapter-toolkit.tar.gz (Homebrew) or ~/.isonapse/bin/isonapse-adapter-toolkit.tar.gz (install script). Its public source: Hook ADK · Codex reference adapter.

Other agents

Built-in setup covers Claude Code, Hermes Agent and pi, and the easy install also connects Codex. Other agents connect through the Hook ADK. Its toolkit in current Agent Hook releases carries the Python and TypeScript packages, the Host Adapter Protocol v1 and the Codex reference adapter. Its public source adds the conformance runner, an adapter scaffold and the Hermes and pi references. You review an adapter and register it yourself as an operator-approved host profile with isonapse hook host-profile; activating it requires a daemon restart, and managed policy can refuse it. Custom hosts run on macOS and Linux.

Register your own agent

Once your adapter is reviewed, register your agent as a host profile. Replace my-agent with its name: lowercase letters, digits and hyphens, starting with a letter, at most 24 characters. The built-in agents' names are taken.

Run these in your own terminal, not inside an agent: they ask for the password you log in with, and a machine your organization manages refuses them.

  1. 1. Print a profile to review

    isonapse hook host-profile create my-agent --executable <agent-executable>

    It pins your agent's executable by its path and content, and lists what your agent can do. It grants nothing and writes no configuration. Save what it prints as my-agent.json. Add --approval if your agent can ask a person to approve an action; without it, an ask is a refusal. --input-replacement, --output-replacement and --prompt-boundary declare that it applies rewritten input, applies rewritten output, or reports submitted prompts. --script pins a script the executable runs. Without it, the profile trusts every program the executable launches, and a pinned script does not cover the modules it imports: for an agent started by node or python, that means every script the interpreter runs.

  2. 2. Check it

    isonapse hook host-profile validate my-agent.json

    Checks the profile and the files it pins, without changing anything.

  3. 3. Register it

    isonapse hook host-profile register my-agent.json

    Authorizes exactly what the profile declares, and takes effect after a restart. It needs Isonapse set up and running.

  4. 4. Restart Isonapse

    isonapse hook restart

    Run it in a terminal, not from inside an agent.

  5. 5. See it registered

    isonapse hook host-profile list

    Lists the registered profiles with their host IDs. A host ID changes whenever the profile does, so use the name below.

  6. 6. See it work

    isonapse hook report --host my-agent --details

    After one harmless tool call from your agent, this shows its counts for the last 24 hours and whether it is registered.

  7. 7. Remove it

    isonapse hook host-profile remove my-agent

    When you no longer need it. It takes effect after isonapse hook restart.

Stuck? Help finds the message you see.