Skip to content

Codex

Zwischen supports Codex as well as Claude Code. Your ~/.zwischen/settings.yaml, your profiles, and the reviewers themselves are shared between the two hosts – a profile that reviews coder works the same way whichever host the agent runs in. Only the wiring into the host differs.

Install

zwischen install

The standard installer targets every host it detects, so if Codex is already on your machine this covers it. Codex counts as detected when a Codex config already exists, or when the codex binary is found – on your PATH, in the Codex Desktop bundle on Windows, or at a standard install location such as ~/.local/bin, /usr/local/bin, or /opt/homebrew/bin. You do not need to put it on your PATH yourself. To target it specifically:

zwischen install --host codex

This registers Zwischen's hooks and MCP server in your Codex config – ~/.codex/config.toml, or $CODEX_HOME/config.toml if you have set that variable. The file is shared with the Codex Desktop app, so the installer edits it in place and touches only its own entries; the rest of your configuration is preserved.

It also installs the z skill, which is how you drive Zwischen from inside a Codex session. The commands match Claude Code's but are invoked with $z rather than /z:

$z status
$z spy

Hook trust

Codex will not run a user-configured hook until that specific hook is trusted, and trust is keyed to the hook's hash. The installer handles this rather than asking you to: it writes the hooks, asks Codex itself what hash it computes for each one, and records that value as trusted. No admin rights, no manual approval step in the Codex UI.

The install reports one of these outcomes:

Status Meaning
installed_trusted Every hook was written and trusted. Zwischen will run.
installed_untrusted Hooks were written but not all of them were trusted. Zwischen will not run yet.
failed The config could not be written.

A partial seed is deliberately reported as untrusted – if some hooks fire and others do not, enforcement has gaps, so it is never presented as success.

If the installer cannot find the codex binary it writes the hooks but skips the trust step entirely, and says so. Fix it by re-running the install with codex on your PATH, or by trusting the hooks once through /hooks inside Codex.

Launching a monitored session

Codex has no equivalent of claude --agent <name>, so Zwischen provides one:

zwischen codex coder
zwischen codex coder "fix the failing auth tests"

Two things happen before Codex starts:

  1. The agent identity is set. Codex's own session-start event carries no agent name, so the launcher stamps it into the environment for the hook to pick up. That is what routes the session to the matching profile in settings.yaml – the one whose agents: list contains coder.
  2. The agent's persona is injected. The launcher reads developer_instructions from ~/.codex/agents/<agent>.toml and passes it to Codex as a session-wide developer instruction. This applies identically whether you launch interactively or with an initial prompt.

The reviewer reads that same persona as its rubric, so the agent and the reviewer are working from one identical set of rules.

If there is no persona file for that name, the session still launches and is still monitored – you get the agent identity and a warning that no persona was found, rather than a session silently pretending to be that agent.

Driving Zwischen from a Codex session

The z skill is the same bundle Claude Code gets, so the full command set is available to you – switching the reviewer's profile or model, clearing blocks, gating a task, editing settings, and opening the live monitor. Only the prefix differs:

$z status
$z monitor
$z adversary code
$z plan Refactor the auth middleware

The one command that does not apply is $z agent. Codex has no mid-session persona switch – identity and persona are set at launch by zwischen codex <agent>, above.

What differs from Claude Code

Blocks, disputes, planning gates, profiles, and reviewer selection all behave the same way. Three differences are worth knowing:

  • Fewer events reach the reviewer. Codex fires five: session start, your prompts, pre-tool, post-tool, and stop. It has no equivalent of Claude Code's failed-tool-call event or its in-progress message narration, so the reviewer sees what the agent did but not its running commentary or the text of a tool error.
  • Primary agent only. Codex sessions are monitored as a single agent. Subagent enforcement is Claude Code only.
  • Personas come from Codex. A Codex session never reads your ~/.claude files. The reviewer's rubric comes from ~/.codex/agents/<name>.toml, which is the same file the launcher injects.

Uninstalling

zwischen uninstall --host codex

Removes Zwischen's hooks, its MCP entry, and the z skill, leaving the rest of your Codex config alone.

Trust records are intentionally left behind. They cannot be distinguished from trust records for your own hooks on the same events, so removing them could strip trust you rely on. Leaving them is harmless: Codex only consults a trust record for a hook that still exists, and any differently-configured replacement hashes differently and reads as untrusted.