Codex Support

The toolkit installs the same agents, skills and rules into OpenAI Codex. The Markdown files in this repository stay the single source. Codex receives generated copies. The installer adds two hooks, readonly-role-guard and spawn-price-gate, and no other hook.

  1. YouPreview

    DRY_RUN=1 writes nothing

    EXIT 0
  2. YouInstall

    One script copies every asset

    24 SKILLS, 15 AGENTS
  3. InstallerDoctor

    It prints ok: or missing:

    EXIT 0
  4. CodexNext turn

    Codex reads the new assets

Install in four steps

Run the commands from the repository root. The target is ~/.codex, or $CODEX_HOME when you set it. When you set a custom $CODEX_HOME, the renderers write that home into the agent and skill paths, and the agents render to a stage directory. The committed render under codex/agents keeps ~/.codex.

  1. 1

    Check the three prerequisites

    OpenAI Codexrsyncpython3 3.11 or later

    install-codex.sh is a bash script. It needs Python 3.11 for tomllib.

    No Windows installer

    There is no install-codex.ps1. You cannot run the Codex install on native Windows today.

  2. 2

    Preview the install

    The script renders into a temporary directory, prints the plan and exits. It writes nothing under ~/.codex and nothing in this repository.

    bash
    DRY_RUN=1 deploy/scripts/install-codex.sh [dry-run] install 24 skills into ~/.codex/skills [dry-run] install 15 agents into ~/.codex/agents [dry-run] mirror ft-sdd assets into ~/.codex/ft-ai-toolkit/ft-sdd [dry-run] sync rules into ~/.codex/ft-ai-toolkit/rules [dry-run] install codex hooks into ~/.codex/ft-ai-toolkit/hooks [dry-run] install version-gate.py into ~/.codex/ft-ai-toolkit/hooks [dry-run] update owned agent and hook blocks in ~/.codex/config.toml (with backup)
    Real outputCaptured with a scratch $CODEX_HOME. The three rendered lines above these are omitted, and the paths are shortened.
  3. 3

    Install

    The script installs skills, rules, agents and two hooks (the guard and the spawn gate), updates the three config blocks, then runs the doctor.

    bash
    deploy/scripts/install-codex.sh ok: TOML validation ok: hook readonly-role-guard note: readonly-role-guard has no trust recorded; until you trust it in Codex's hooks review, the guard denies nothing ok: hook spawn-price-gate FT Codex assets installed. They are available in the next Codex turn.
    Real outputThe last lines of a run with a scratch $CODEX_HOME. The doctor runs at the end of the install.
    Your edits in installed folders do not survive

    The installer runs rsync -a --delete on each installed skill directory and on the rules directory. It does not touch other skills in ~/.codex/skills/.

  4. 4

    Check the install at any time

    The doctor changes nothing. It prints ok: or missing: for each item, and note: for a state that needs your attention. See what it checks.

    bash
    deploy/scripts/install-codex.sh --doctor ok: TOML validation ok: hook readonly-role-guard note: readonly-role-guard has no trust recorded; until you trust it in Codex's hooks review, the guard denies nothing ok: hook spawn-price-gate
    Real outputThe last four lines of a clean doctor run. The run prints 43 ok: lines: 24 skills, 15 agents, the version gate, the TOML check and the two hooks. A note: never changes the exit code.

The six doctor checks

  • Every listed skill has SKILL.md under ~/.codex/skills/.
  • Every listed agent has a TOML file and an [agents.<name>] entry in config.toml.
  • The doc writer's version-gate.py is installed.
  • config.toml and every agent file parse as valid TOML.
  • The guard hook is installed: the guard file exists, the hook block holds exactly one guard group, its interpreter runs and imports tomllib, and its matcher is the one that this repository's guard template composes. A matcher from an older template, or one that Codex would read as an unanchored regex, is missing:. Trust is reported as a note:, never as ok:.
  • The spawn gate is installed: the script and the gate block exist, the block holds exactly one gate group, and its matcher is the list that the gate template composes for the namespace baked into the guard command. Trust is not checked.

Notes about spawn settings

These notes are not checks. The doctor prints a note: line, never ok: or missing:, and a note never changes the exit code. The doctor stays silent when the condition of a note is absent.

NoteTriggerRemedy
N1Your user config sets expose_spawn_agent_model_overrides = false under [features.multi_agent_v2]. The note starts with "with multi-agent v2" and says that spawn_agent loses model and reasoning_effort.Remove the key or set it to true, if you want the dispatcher's pick to apply.
N2Your user config sets [agents] default_subagent_model to a string. The note shows the value.Remove the key, if you want the dispatcher's pick to apply.
N3Your user config sets [agents] default_subagent_reasoning_effort to a string. The note shows the value.Remove the key, if you want the dispatcher's pick to apply.
N4A project file .codex/config.toml is not a readable TOML file under 16 KiB. It can be too large, not a regular file, not valid TOML, or too slow to parse. The doctor also prints N4 for a file it did not reach before its limit of 5 seconds. The doctor does not check its spawn settings.Fix or shrink the file, then run the doctor again. If the file is small and valid, only run the doctor again.
N5A project file sets [features.multi_agent_v2] expose_spawn_agent_model_overrides, [agents] default_subagent_model or [agents] default_subagent_reasoning_effort. The note names the file and the keys, not their values.Open the file and read the values. Codex applies them only while it trusts the project.

Three more lines report that a check could not finish. Each line names a reason and never the text of your files.

  • The user config could not be checked: note: spawn settings in <file> could not be checked (<reason>); fix or replace that file, then run --doctor again. The doctor prints no other note from the user config.
  • The user notes are printed, but the project files could not be checked: note: project files were not checked (<reason>); run --doctor from an existing project directory. This happens, for example, when the current directory was deleted.
  • The check could not run at all: note: spawn settings could not be checked, with no reason.

The <reason> is timed out, not a regular file, or the name of a Python exception class such as FileNotFoundError.

What the spawn notes read, and what they do not

  • The doctor reads your user config and the project files from the current directory. At the end of an install, that directory is the one where you ran the installer. Run --doctor from the project.
  • The doctor does not evaluate the project trust of Codex. It prints project files apart, in N5. A project file never changes N1, N2 or N3.
  • The notes follow the behaviour of Codex rust-v0.167.0. A wrong result is a note, never a failure.
  • The doctor does not read managed config (managed_config.toml, MDM, system), cloud config, session flags or --profile files. managed_config.toml outranks what the doctor shows.
  • A model can select multi-agent v2 without the feature flag. N1 therefore says "with multi-agent v2" and appears whatever enabled says.
  • N2 and N3 report that a value is set. They do not report that Codex accepts it.
  • Codex does not read [profiles.<p>.features.multi_agent_v2]. It rejects --profile when [profiles.x] exists. No note covers that table.
  • The limit of 16 KiB in N4 applies to project files only. The user config has no size limit.
  • A project file over the limit, or one the doctor cannot parse or reach before its limit of 5 seconds, gets N4.

missing:The doctor prints a missing: line

  • The doctor exits with an error, for example after missing: skill ft-fix.
  • Run deploy/scripts/install-codex.sh again. It restores the listed item.

missing:The doctor prints missing: hook readonly-role-guard (...)

  • The text in brackets names the reason: no guard file, no hook block, a hook block that does not parse (not indexable), not exactly one guard group, or no interpreter. A python3 that is not executable, cannot run, or cannot import tomllib is also a reason. Three reasons concern the matcher: matcher does not compile; matcher is not an anchored name list, so Codex reads it as an unanchored regex; and stale install: the installed matcher names <n> tools, this template's names <m>, which is an install from an older guard template that guards fewer tools than the current one.
  • For a missing guard, hook block or group, a matcher reason or a stale install, run the installer again. A stale install is exposed until you do: the old matcher never offers the newer tool names to the guard. For an interpreter reason, install Python 3.11 or later, then run the installer again.

missing:The doctor prints missing: hook spawn-price-gate (...)

  • The bare line missing: hook spawn-price-gate (re-run the installer) means that the gate block, the script name in config.toml or the script file is absent. With a reason in brackets: not exactly one gate group, a gate block that does not parse, matcher is not a plain name list, so Codex reads it as an unanchored regex, or stale install: the installed matcher names <n> tools, this template's names <m>.
  • Run the installer again. A stale gate matcher means that the gate never runs for the tool names it misses.

missing:The doctor prints missing: TOML validation (...)

  • config.toml is absent, or a TOML file does not parse or cannot be read. The line names each file and the class of its error, for example 'config.toml': TOMLDecodeError, and never the text of the file. The doctor exits with an error and goes on with the other checks.
  • If the file is absent, run the installer. If it does not parse, repair its syntax, then run the installer.

What the install changes in config.toml and in this repository

The installer copies the TOML files to ~/.codex/agents/. In config.toml it rewrites only the three blocks between these marker lines. The hook block follows the last hook group that you own, and the spawn gate block comes last. The installer never moves your groups.

config.toml
# >>> ft-ai-toolkit Codex agents >>> # <<< ft-ai-toolkit Codex agents <<< # >>> ft-ai-toolkit Codex hooks >>> # <<< ft-ai-toolkit Codex hooks <<< # >>> ft-ai-toolkit Codex spawn gate >>> # <<< ft-ai-toolkit Codex spawn gate <<<
  • The hook block holds one PreToolUse group. Its command is <python> -I <guard> --agents <dir> --sha256 <hash>, plus --tool-namespace <ns> when [features.multi_agent_v2] tool_namespace is set. The default namespace collaboration, which Codex applies when multi_agent_v2 is on and the key is absent, is in the matcher always and needs no flag. If the installer cannot read that value, it writes a matcher without the namespace, and the doctor prints a note.
  • The spawn gate block holds one PreToolUse group for spawn-price-gate.py, with the same -I command shape, the same --agents directory and its own --sha256.
  • Each agent gets an [agents.<name>] entry with a description and a config_file.
  • The description comes from codex/agents-registry.json.
  • The rest of config.toml stays untouched.
  • The installer validates the result as TOML before it writes.
  • Before a change, it saves a backup named config.toml.ft-ai-toolkit-backup-<timestamp>. A run that changes nothing saves no backup.
  • A real run also writes codex/agents/ and codex/agents-registry.json in this repository.

Where each asset lands

The installer installs a fixed list. Press a scenario to walk one asset from this repository into ~/.codex.

Skip the map

In this repository

  • agents/<name>.mdThe canonical agent files. There are 16.The renderer skips tr-doc-writer, a retired redirect for callers on Claude Code. The other 15 reach Codex.
  • skills/<name>/The canonical skill folders. There are 30.
  • rules/The canonical rule files. There are 22.

Renderers

Stored in this repository

Installer

  • install-codex.shRuns the renderers, copies the fixed lists and runs the doctor.

In ~/.codex

A click on an element opens its short purpose.

An agent

  1. The renderer reads agents/verifier.md.
  2. It writes codex/agents/verifier.toml with four keys, one comment line and a [features] table.
  3. The installer takes the file from the repository.
  4. It copies the file to ~/.codex/agents/.
  5. It writes the [agents.verifier] entry into the marked block.

A skill

  1. The renderer copies skills/ft-fix/ into a temporary directory.
  2. The copy waits for the installer.
  3. The skill is on the list, so rsync syncs it to ~/.codex/skills/ft-fix/.

A rule

  1. The renderer copies rules/ and adds the note to each path-scoped rule.
  2. The rendered folder waits for the installer.
  3. rsync syncs the folder to ~/.codex/ft-ai-toolkit/rules/.

What is not installed

  1. tr-doc-writer stops here. It is a retired redirect, so the renderer skips it.
  2. The renderer copies all 30 skills.
  3. The installer reads its fixed list of 24.
  4. Six skills are not on the list, so they never reach Codex: acs-fresh-reset, ft-docs, ft-jira, ft-ux-audit, ft-watch and sdd-authoring. The skill ft-ux-audit needs the Claude Code tools AskUserQuestion, Agent and Artifact. The skill sdd-authoring runs in the main loop only and drives the ft-sdd agent.

How the parts connect

  • render-codex-agents.py reads each agent file.
  • render-codex-skills.py copies each skill.
  • render-codex-rules.py copies the rules.
  • The agent renderer stores the TOML files in codex/agents/.
  • The agent renderer writes the description of each agent to codex/agents-registry.json.
  • The installer copies the stored TOML files.
  • The installer reads each description from the registry.
  • The installer takes the rendered skills from a temporary directory.
  • The installer takes the rendered rules from a temporary directory.
  • The installer copies each listed agent.
  • The installer rewrites the marked block in config.toml.
  • The installer syncs each listed skill.
  • The installer syncs the rules.

An agent file becomes one TOML file

A TOML file has one of two shapes. A pinned role has four keys: the model, its effort, the sandbox and the instructions. A priced role has two keys: the sandbox and the instructions. Codex does not apply the sandbox key to a spawned role. The readonly-role-guard hook reads the key. A read-only role carries two more parts: one comment line and a [features] table.

bash
head -n 4 codex/agents/verifier.toml # Generated from agents/verifier.md; do not edit by hand. model = "gpt-5.6-sol" model_reasoning_effort = "high" sandbox_mode = "read-only"
Real outputLine 5 is the fourth key, developer_instructions. It holds the agent body, with a <codex-runtime> preamble and Codex tool names. A reviewer file adds a comment line # ft-readonly-allowed-tools: and a [features] table after line 5, so head -n 4 shows the same four lines.
bash
head -n 2 codex/agents/ft-java-coding-agent.toml # Generated from agents/ft-java-coding-agent.md; do not edit by hand. sandbox_mode = "workspace-write"
Real outputA priced role has no model and no model_reasoning_effort line. Line 3 is its second key, developer_instructions.

The model follows the tier

  1. gpt-5.6-lunaFrom haiku, on effort medium. No role is pinned to it. A spawner may pick it for a priced role.
  2. gpt-5.6-terraFrom sonnet, on effort high. An unknown value maps the same way. It pins 3 roles: ft-architecture-audit, ft-doc-writer-agent and ft-ops.
  3. gpt-5.6-solFrom opus, on effort high. It pins 7 roles: bugfix-agent, ft-developer, ft-fix-host, ft-sdd, ft-test-adversary, refactor-agent and verifier.

The other 5 agents are priced roles and have no pin. The tier map offers a spawner the efforts low, medium and high. It offers nothing above high.

A spawner picks the model of a priced role

  • The priced roles are ft-angular-coding-agent, ft-coding-agent, ft-java-coding-agent, ft-python-coding-agent and ft-ui-ux-design.
  • One function in price-gate, is_priced_producer, names them. The renderer calls that function and keeps no second list.
  • The spawn_agent call takes the fields model and reasoning_effort. A pin in a role file beats both fields, so the fields act only on priced roles.
  • Only the two dispatchers, ft-developer and bugfix-agent, receive the pricing bullet. It tells them to name both fields, to stay inside the tier map and to write a Pick: line in the brief.
  • Every spawner sees the registry suffix of a priced role. The suffix says that the role has no model pin and that the spawner sets both fields.
  • The upstream spawn_agent tool text says to omit model. The pricing bullet tells a dispatcher that it outranks that text for priced roles. Other spawners see only the registry suffix. No Codex run exists to show which instruction a model follows.
  • Jev, the decision model, does not run on Codex. The dispatcher writes the pick as self.
  • A Mode: slice run of ft-developer stays pinned, because a role file is per name and cannot depend on a mode. ft-ui-ux-design in Mode: review also loses its pin for the same reason.

Text that the renderer replaces in the agent body

Agent fileTOML
~/.claude/rules/~/.codex/ft-ai-toolkit/rules/
$HOME/.claude/rules/$CODEX_HOME/ft-ai-toolkit/rules/
~/.claude/skills/~/.codex/skills/
$HOME/.claude/skills/$CODEX_HOME/skills/
~/.claude/learning/~/.codex/ft-ai-toolkit/learning/
~/.claude/ft-sdd/~/.codex/ft-ai-toolkit/ft-sdd/
~/.claude/skills~/.codex/skills
Taskspawn_agent
SendMessagefollowup_task
AskUserQuestionrequest_user_input
the Agent toolthe spawn_agent collaboration tool
/code-reviewthe Codex review workflow

The install mirrors deploy/templates/sdd/ to ~/.codex/ft-ai-toolkit/ft-sdd/. The regression checks that every ~/.codex or $CODEX_HOME file that an installed agent cites is installed. Under a custom $CODEX_HOME, the renderers write that home in place of ~/.codex in these paths.

What the preamble says, and what the TOML omits

  • A dispatched agent cannot question the user. It returns NEEDS_USER or BLOCKED to its parent.
  • Only the root agent may use request_user_input or ask in its final response.
  • An agent never edits its generated TOML. It returns a SELF-TUNING PROPOSAL against the canonical agents/<name>.md.
  • Current Codex tool names and permissions override conflicting wording in the body.
  • The TOML carries the keys of its shape. A read-only role adds only the comment line and the [features] table. A skills:, hooks: or disallowedTools: key in the frontmatter does not reach it.

The spawn gate bounds the pick of a priced role once you trust it in Codex's hooks review. The gate is a PreToolUse hook. It denies a priced spawn that omits model or reasoning_effort, names a model outside the tier map, or names an effort above high. Until you trust the hook, nothing on Codex checks or bounds the pick, and the tier map and the pricing bullet are advice. Two groups of changes matter here. g1 removed the model pin of five roles. g2 is the spawn gate. g3 is in the doctor: it prints a note: for each configuration key in the table below (see the notes about spawn settings).

The spawn gate

  • The gate checks a spawn_agent call. It acts only when the agent_type is an FT role whose installed TOML carries the FT marker and no model or model_reasoning_effort key. That is a priced role.
  • The allowed models are the values of the tier map: gpt-5.6-luna, gpt-5.6-terra and gpt-5.6-sol. The allowed efforts are low, medium and high.
  • A denied call returns a reason line to the model. The reason says what to fix and never repeats a value from the call. The model can retry in the same turn.
  • install-codex.sh installs the hook. It writes the hook as its own block at the end of config.toml and copies spawn-price-gate.py next to the guard script. The handler timeout is 5 seconds.
  • The matcher is the list spawn_agent|collaborationspawn_agent. The installer adds the name for a custom tool_namespace of multi-agent v2. A hyphenated namespace is not read, so the matcher stays the default list, and the guard's own doctor note already reports that case. The installer writes the matcher once, from the tool_namespace of your user config only, but Codex reads that key from the merged configuration. If a trusted repository sets a different tool_namespace, or you change it after the install without re-running the installer, the tool is renamed, the matcher misses and the hook never runs. --doctor still prints ok: hook spawn-price-gate in that case. A repository setting [features] hooks = false turns the hook engine off in the same way. Matching the spawn_agent suffix with a regex matcher would remove the namespace dependency. g2 does not do this.
  • Codex runs the hook only after you trust it. After an install prints spawn-price-gate changed: re-trust it in Codex's hooks review, review and trust the hook again. A re-install that changes nothing prints no such line.
  • --doctor prints ok: hook spawn-price-gate when the block, the script and the matcher are in place. It compares the installed matcher with the list that the gate template composes for the namespace baked into the guard command, and prints missing: when they differ. This line does not show trust.
  • The hook fails open. A crash, a timeout, a parse failure, an unknown role or any other exception allows the spawn. The only deny is a proven FT priced role with a defective pick. Codex also treats every hook error as allow.
  • One failure blocks instead. If the installed script spawn-price-gate.py is missing, for example after a restore of the configuration, the interpreter exits with code 2. Codex treats this as a block of every matched spawn_agent call, pinned roles included. Trust covers the hook declaration and not the script bytes, so the gate stays trusted. --doctor prints missing: hook spawn-price-gate (re-run the installer). Re-run install-codex.sh to restore the script. The guard script has the same exposure.
  • The gate never checks a user-authored role. A role without the FT marker is not gated.
  • The setting expose_spawn_agent_model_overrides = false hides both fields from the tool schema only. The model can still send them, and the gate checks them. A dispatcher must name both fields even when the schema does not list them.

What still decides the spend of a priced role

Savings from a lower pick are unmeasured: no Codex run and no luna run on low exists in this toolkit. The table has two parts. The first part lists the paths that the gate bounds when you trust it. The second part lists the paths that stay open.

PathWhat happens
A pick above the tier mapBounded when trusted. The Codex catalog lists larger models and efforts above high, and spawn_agent accepts them. The gate denies the call. If the hook is not trusted, the value applies.
A model without an effort, or an effort without a modelBounded when trusted. The gate denies a half pick. Without the gate, a model alone runs on its default effort, which is low for gpt-5.6-sol, or on default_subagent_reasoning_effort when set. An effort alone runs on default_subagent_model when set, otherwise on the model of the spawner.
Both fields omittedBounded when trusted. The gate denies the call, so default_subagent_model, default_subagent_reasoning_effort and the model of the spawner never apply to a gated role. The registry suffix tells every spawner to name both fields, so a compliant spawner meets no deny. A spawner that ignores the suffix pays one extra model turn for each deny. Without the gate, the role runs on the model and effort of the spawner. The dispatcher runs on gpt-5.6-sol on high. ft-doc-writer-agent runs on gpt-5.6-terra on high and starts ft-ui-ux-design on the same values.
A configured defaultBounded when the gate runs, because a gated role never reaches the default. If the gate does not run, for example under a repository-set tool_namespace (see the rows below), the default applies. Without the gate, the keys default_subagent_model and default_subagent_reasoning_effort in the [agents] table apply when a call omits a field. Your user config or the committed .codex/config.toml of a trusted repository can set them. The doctor prints a note for each key (N2, N3, N5).
No fields in spawn_agentBounded when trusted. With multi-agent v2, expose_spawn_agent_model_overrides = false under [features.multi_agent_v2] removes both fields from the schema. The default is true. The model can still send both fields. The gate treats the call like any omission and denies it until both fields are named. The doctor prints a note for this setting (N1, N5).
A pick inside the tier map but too cheapOpen. A spawner can choose a cheap tier for a hard task, for example after text in a ticket says the task is trivial. The gate allows every pick inside the tier map, and no oracle checks the quality of the pick.
The gate is untrusted, disabled or failingOpen. Codex runs no hook that you have not trusted, and the gate fails open. A crash, a timeout of 5 seconds, a parse failure, an unknown role or any other exception allows the spawn. For that spawn, picks are unbounded in both directions.
A role redefined by a trusted repositoryOpen. The .codex/config.toml of a trusted repository can redefine [agents.<role>] config_file of a priced role. The role layer applies after the pick and overrides it. The gate reads only the agents directory of CODEX_HOME.
Another hook that rewrites the pickOpen. Another trusted PreToolUse hook can rewrite model with updated_input after the gate ran. The gate does not see the rewrite.
A tool_namespace that the matcher does not knowOpen. The installer writes the matcher from the user-layer tool_namespace only, and Codex reads the merged configuration. A trusted repository that sets a non-default tool_namespace, or a namespace that you set after the install, renames the tool. The matcher misses and the hook never runs, while --doctor still prints ok: hook spawn-price-gate. A repository with [features] hooks = false turns the hook engine off, in the same trust class.
A hyphenated tool_namespaceOpen, the same class as the row above. The matcher falls back to the default list, so the gate does not run for a hyphenated namespace of multi-agent v2. The guard's doctor note reports this case.
The gate script is missingBlocks, not open. Every matched spawn_agent call is blocked until you re-run the installer. See the list above.
A built-in or unknown roleOpen. The gate checks only FT priced roles. A pick through a built-in role without a pin, such as default, worker or explorer, is not gated.

The sandbox_mode key is a marker, not a sandbox

The toolkit declares least privilege once, in the tools: allowlist of the agent frontmatter. The renderer reads that list and keeps no second roster of read-only agents. The result is a sandbox_mode key in each TOML file. Codex does not apply that key to a spawned role: the role runs with its parent's sandbox. The installed readonly-role-guard hook reads the key as a marker. The table below lists what stops a read-only role and what does not.

  1. 1. Read the frontmatter

    The renderer reads only the tools: key of the agent file.
  2. 2. Is the key there?

    Without the key, the agent inherits all tools.
    • NOworkspace-write
    • YESContinue at step 3.
  3. 3. Does it grant a write tool?

    The write tools are Write, Edit and NotebookEdit.
    • YESworkspace-write
    • NOread-only
  4. 4. Does a protected agent keep the marker read-only?

    READ_ONLY_FLOOR in the renderer lists the three reviewers. Every other agent passes.
    • YESThe TOML is written.
    • NOThe render stops with an error.

The key that the 15 agents get

  • 3 read-only: an allowlist with no write toolThe reviewers. They check work. Their shell writes nothing by instruction only.ft-architecture-auditft-test-adversaryverifier
  • 1 workspace-write: an allowlist with a write toolIts allowlist grants Write and Edit.ft-doc-writer-agent
  • 11 workspace-write: no tools: keySeven of them carry a disallowedTools: list. The renderer does not read it.bugfix-agentft-angular-coding-agentft-coding-agentft-developerft-fix-hostft-java-coding-agentft-opsft-python-coding-agentft-sddft-ui-ux-designrefactor-agent
bash
grep sandbox_mode codex/agents/verifier.toml sandbox_mode = "read-only"
Real outputCheck any agent the same way.
The render stops at step 4

A reviewer with a write tool would be a privilege escalation. The error says to fix the allowlist and not to widen the projection. So the TOML file of a reviewer never says workspace-write. The key is still only a marker for the guard.

On Codex a spawned role runs with its parent's sandbox. Two things limit a read-only role, and the table below says what each one stops. The role [features] table removes the tools of apps, plugins, memories and permission requests. It holds without trust. The installed readonly-role-guard hook denies apply_patch, shell-routed apply_patch, and spawning or messaging other agents through the multi-agent tools. This works in the v1 namespace, in the default v2 namespace collaboration, and in a namespace set with [features.multi_agent_v2] tool_namespace. The hook also denies every mcp__ tool that the tools: list of the role does not name, and the tools in the list of denied names. The hook has effect only after you trust it in the hooks review of Codex.

The shell of a read-only role writes nothing by instruction only, as Bash does on Claude Code. The OS sandbox of the parent stops some shell writes and not others. A denied call returns the reason "put findings in your final report". A role that needs a mutating command returns BLOCKED with the exact call.

On Codex, verifier can be the executor only in a worktree inside the writable roots of the parent, created by the parent. The child cannot write the top-level .git or the gitdir of the worktree, so it cannot run git worktree add. It reverts the fix with git apply -R or a file copy, and never with git checkout, git restore, git stash or git add. See the quality pipelines reference.

Limits of the guard
  • The denials of the guard are inactive until you trust the hook. They are inactive again after an install that changes the guard, its matcher or its timeout. The installer then prints a re-trust line once. The anchored matcher of the current guard is such a change, so trust drops once on an upgrade. The role [features] hold regardless of trust. A change of the matcher, the command or the timeout counts, for example a different python3, CODEX_HOME, agents directory or namespace. A user hook group that you add above our block also shifts the index of the guard, and the doctor then shows the no-trust note. The installer never moves your groups. The doctor prints a note about trust, never prints ok for it, and exits with 0. Open Codex's hooks review to trust the hook. The menu path in Codex is unverified.
  • A config installed from the earlier branch layout, with the hook inside the agents block, moves the hook once. That can shift the index of a later user group, so re-trust it.
  • Codex lets a call run when the hook crashes or times out (fail-open). The timeout is 5 seconds. The guard denies a command longer than 65,536 characters without reading it, so that the length of a command does not run the guard into the timeout. The guard also denies a hook input that it cannot parse (not UTF-8 JSON, or nested too deep) for every caller, because such an input names no role it could clear. The spawn gate allows that input.
  • The guard denies a shell script that names apply_patch or applypatch and later contains << followed by a non-empty line, in any form: a heredoc opener, but also a <<< here-string or a run of <, because Codex's parser recovers from errors, so the guard reads the raw text and does not predict the parse. It also denies a shell script that runs apply_patch, also behind leading assignments (A=1, A+=1, a[0]=1; not one whose subscript holds an operator or a nested bracket, see below), redirections, comments, line continuations, env, command, exec, eval, nohup, nice, time, case arms, a path such as ./apply_patch, and nested bash -c wrappers up to 4 deep. The command name matches in any letter case: a case-insensitive file system runs APPLY_PATCH as the same binary. It also denies a script that it cannot parse, with the reason Bash script (cannot parse). These cases still run:
    • Shell writes other than apply_patch: redirection, sed -i and cp. Inside a writable root nothing stops them. Elsewhere only the OS sandbox of the parent stops them, as the table says. A reviewer shell can change the TOML files or the guard only where the table says that the sandbox does not hold.
    • With no heredoc after the name: apply_patch behind sudo, xargs, timeout, setsid or another wrapper that the guard does not list.
    • With no heredoc after the name: a string built at run time, for example eval "...", and a $(apply_patch ...) inside a double-quoted string.
    • With no heredoc after the name: bash -c -- '...' and bash -o posix -c '...'. The guard does not unwrap a shell when an option after the wrapper is not an option cluster ending in c.
    • With no heredoc after the name: a name assembled at run time, for example a${X}pply_patch.
    • With no heredoc after the name: apply_patch behind an assignment whose subscript holds an operator, a nested bracket, a newline or a quoted or escaped bracket, for example a[1;2]=1 apply_patch x, a[b[0]]=1 apply_patch x or a[']']=1 apply_patch x (bash 5). The guard reads a subscript only up to the first operator or bracket, so that a prefix never crosses a statement boundary.
    • With no heredoc after the name: an empty expansion in front of the name or glued to it, for example $x apply_patch x, ${x}apply_patch x or apply_patch$x y; a carriage return, form feed or vertical tab glued to a leading assignment or redirection, for example A=1\f apply_patch x; an escaped blank as a redirection target or glued to a substitution, for example > \ apply_patch x, >&\ apply_patch x or A=$(true)\ y apply_patch z; and an expansion in front of a >| redirection, for example $x >|f apply_patch y. The current scan and the scan of the guard's first release both allow these, so the base scan kept inside the guard cannot deny them either.
    • A shell nested deeper than 4 wrappers.
    The guard can deny a read-only role by mistake:
    • A multi-line script that names apply_patch or applypatch and later contains << followed by a non-empty line, also across lines and inside quotes, comments or heredoc bodies. Examples: a two-line rg "apply_patch <<", a python heredoc that prints the name, a script that names the tool before its own heredocs.
    • After such a name, a <<< here-string, << in $((1 << 3)) or <<=, read as a heredoc. A single-line rg apply_patch <<<x still runs: no line follows it.
    • A line of an unquoted heredoc body that reads as apply_patch.
    • With the reason "cannot parse": $((1 << 3)) elsewhere; a comment that contains a backtick, for example ls # see `git log`; a # glued to a closing ) of a subshell or case arm, for example (echo a)#; a comment line that ends in )\ followed by another comment line, for example # a)\ and # b on the next line; a double-quoted $(...) that contains both a double quote and an apostrophe; and any command longer than 65,536 characters (64 KiB), whatever it contains, because the guard does not read it.
    • The name right after the | of a redirection operator: >|, <|, >>|, &>|, <<<|, <>|, >&|, <&|, 2>| or &>>|. Also the name as a path, or behind an assignment or keyword, after that |. Examples: echo x >| apply_patch (which writes a file named apply_patch), echo a>>|apply_patch x (a syntax error), echo x >| ./apply_patch, echo x >|A=1 apply_patch y and echo x >|eval apply_patch. None of them runs the binary. The guard keeps the scan of its first release inside itself, so that no repair can lose a denial that release made, and that scan reads this | as a pipe. With no command in front, >|A=1 apply_patch x does run the binary, so that denial is correct.
    • The name after a blank escaped twice, \ \ apply_patch x, or after a form feed and a comment sign joined to it by a line continuation. To bash each is one command word, and no such command exists. The same kept scan reads them as the name.
    A denied role reads one of these lines on stderr. The first two are the shell reasons. The base rule also denies by tool name, for example <role> is read-only (FT): spawn_agent denied; put findings in your final report. or <role> is read-only (FT): apply_patch denied; put findings in your final report. The third reason is the tool line: <role> is read-only (FT): shell apply_patch denied; put findings in your final report., <role> is read-only (FT): Bash script (cannot parse) denied; put findings in your final report. or <role> is read-only (FT): tool <tool_name> denied, do not retry; put findings in your final report. The "cannot parse" above is the second reason. The third line is the one for MCP and effect tools. Codex wraps each line as Tool call blocked by PreToolUse hook. Recovery from a false deny: run the command that names the tool and the command with the heredoc or here-string as two separate calls; drop the backtick from the comment; put a blank between ) and #; split a command over the length limit into shorter calls.
  • close_agent and interrupt_agent stay allowed.
  • The guard denies a tool whose name starts with codex_app, codex_tui or cloud_threads. A spawned child inherits such client-defined tools only with multi-agent v2 and the feature multi_agent_v2_dynamic_tools, which is under development and off by default. A client-defined tool with another prefix is not denied.
  • Four paths have no hook or no denial: write_stdin into a shell (no hook by design), hosted web_search (server side), the code-mode exec tool (off by default) and tools that a later Codex release adds. The deny list is a census of release rust-v0.167.0.
  • The format of an MCP tool name, mcp__<server>__<tool> with every other character replaced by _, comes from the test of Codex and has not been observed. If it is wrong, or a hash suffix, a hyphen at the edge of a name or another server name changes it, the guard reads a listed tool as unlisted and denies it. That failure is visible and safe only while the name keeps the lowercase mcp__ prefix. The anchored, case-sensitive matcher never offers a name without that prefix to the guard.
  • The guard runs on every shell and MCP call of every Codex agent, about 30-60 ms median on the measured host, plus the login-shell profile. A slow profile counts against the 5 second timeout.
  • The permission profile of the parent limits the shell of the child only as the table lists.
  • A guard interpreter inside a workspace virtual environment is writable under workspace-write. Install from a system Python.
  • The guard supports POSIX only. There is no Windows Codex installer.
  • Codex strips the spawned role name (agent_type) before it builds the hook payload (codex-rs hook_runtime.rs lines 1095-1101 and thread_spawn.rs lines 138-141 at rust-v0.167.0). The guard matches the role name exactly and relies on that. Re-check those two places on every Codex upgrade.
  • No live Codex run is verified. The behavior is verified in the Codex source, releases rust-v0.166.0 and rust-v0.167.0.

What stops a read-only reviewer on Codex

Read the table for a role such as verifier under workspace-write. The first column is the action. The second column names what stops it. The third column says when it does not hold.

PathStopped byDoes not hold when
The apply_patch tool, shell-routed apply_patch in the forms the guard reads, and delegation to other agentsThe guard, once you trust itThe hook crashes or times out. The form is in the list of cases that still run. A shell is fed through write_stdin, which has no hook.
An MCP tool outside the role's tools: list, the MCP resource tools and the effect tools of the denied listThe guard, once you trust itThe hook crashes or times out. Hosted web_search has no hook.
The tools of apps and plugins, the memory tools and the request_permissions toolThe role [features] table: apps, plugins, memories and request_permissions_tool, all false. No trust is needed.Never: it always holds. It does not remove require_escalated, which a shell call can still carry.
A shell write inside a writable root: the workspace, /tmp, $TMPDIR, the folders in writable_roots and a nested sub/.gitNothing. The instruction stops it, as for Bash on Claude Code.Always open.
A shell write elsewhere, including a default ~/.codex with the role TOML files and the guardThe OS sandbox of the parent, on read-only or workspace-writeThe parent runs on danger-full-access. You approve a command with require_escalated. A command matches an exec-policy allow rule in any loaded config folder, including a rule that a "don't ask again" approval added. A CODEX_HOME lies inside a writable root.
A shell write to the top-level .git, .codex, .agents or .aws of a writable root, and to the gitdir of a linked worktreeThe OS sandbox of the parent, as in the row aboveThe same cases as in the row above.

Scope The sandbox rows come from the macOS Seatbelt code of Codex. The Linux sandbox was not read. A parent on read-only stops every shell write, but that parent cannot do its own work, so the toolkit does not recommend it.

The tool names that the guard denies

  • Every name that starts with mcp__, codex_app, codex_tui or cloud_threads, unless the name is in the tools: list of the role. Only mcp__ names can be listed.
  • These exact names, always: list_mcp_resources, list_mcp_resource_templates, read_mcp_resource, multi_env_copy_file, image_genimagegen, webrun, create_goal, update_goal, noteswrite_file and notesappend_to_file.
  • The matcher of the hook is an anchored regular expression that fires on these names, on the delegation names, on apply_patch and on Bash, and on no other name. The installer builds the same string and stops if the string is malformed.
  • The allowed mcp__ names sit in one comment line of the role file, # ft-readonly-allowed-tools:. The renderer writes it from the tools: frontmatter, with every character outside letters, digits and _ replaced by _. A role file without that line has no allowed mcp__ tool.

If the guard denies your call

  • For an mcp__ tool, add the exact tool to the tools: list of the agent in agents/<name>.md, run the installer again, or do without the tool.
  • You cannot grant any other denied tool to a read-only role.
  • A reviewer that needs a mutating command returns BLOCKED with the exact call.

Why the toolkit ships no shell floor

The toolkit ships no shell floor. A role file can only switch the shell tool off, and a reviewer with no shell cannot read files or run its checks. A wrapper that runs every command of a reviewer in a read-only profile exists on paper. It has not been run on Codex, so the toolkit does not install it. If you need a hard floor, run the reviewer as its own codex exec --sandbox read-only session. That session is not a spawned role: it has no spawn_agent dispatch and no context of the parent.

Differences from the Claude Code install

Open a row to read both sides. Four rows are weaker in Codex, and only two hooks run there.

TopicClaude CodeCodex
Hooks and gates

install.sh installs the hook scripts and registers them in settings.json. install-codex.sh installs two hooks, readonly-role-guard and spawn-price-gate, in config.toml. It installs no other hook, so the other gates in Harness do not run in Codex.

Claude Code: installedCodex: two hooks, no ring
Rules

Claude Code loads a rule when a file matches paths:. Codex only receives a copy, and you name the rule in the prompt.

Claude Code: installedCodex: by hand
MCP servers

install.sh registers them. The Codex installer does not, because it only syncs skills, rules and agents.

Claude Code: installed
Windows installer

install.ps1 exists. No PowerShell version of the Codex installer exists.

Claude Code: installed
Agent definitions

Claude Code reads Markdown with frontmatter. Codex reads generated TOML.

Claude Code: installedCodex: installed
Least privilege

Claude Code uses the tools: allowlist. Codex derives sandbox_mode from the same allowlist, but a spawned role runs with its parent's sandbox. The readonly-role-guard hook, once trusted, denies a read-only role apply_patch, shell-routed apply_patch, spawning or messaging other agents, and every mcp__ tool outside the role's tools: list. The role [features] table holds without trust. The shell stays non-mutating by instruction, as Bash does on Claude Code.

Claude Code: installedCodex: installed, hook denials active after you trust it

the install gives you this you do it by handEmpty: not there

Rules in the agent text are instructions only

No gate hook runs, so Codex has no price gate or context guard. The agent text still describes those rules, and nothing enforces them. The one installed hook, readonly-role-guard, only limits read-only roles.

In Codex, you name what must run

Rules never load by themselves, and six skills never start by themselves. Name them in your prompt.

Only when you name it6autoreviewft-devft-fixft-image-rollout-verificationft-refactortr069-walk-benchmark
May start on its own18clickhouse-iocwmp-xmlft-angular-standardsfriendly-branded-docsft-decideft-docker-standardsft-guide-pageft-java-standardsft-python-standardsgrafana-dashboard-snapshotiot-fleet-engineerobsidian-knowledge-vaultoma-lwm2m-expertperformance-engineerreceiving-code-reviewspringboot-tddspringboot-verificationtr69hostif-issue-triage
Not installed6acs-fresh-resetft-docsft-jiraft-ux-auditft-watchsdd-authoring

Orange outline: explicit-only. Dashed outline: this repository holds the skill, and Codex does not receive it.

You want a rule to apply → name the rule in your prompt

Codex does not auto-load rules. Claude Code loads a rule on a paths: match, and Codex has no such trigger. For each rule with a paths: header, the renderer removes the frontmatter and adds this note at the top: "Codex: Rules are not auto-loaded. Your prompt named this rule, so it applies to the work at hand regardless of file type." A rule without paths: stays unchanged. Today all 22 rule files have the header.

You want an explicit-only skill → name the skill in your prompt

These six skills must never start on their own. For each one, the renderer writes agents/openai.yaml with this policy:

agents/openai.yaml
policy: allow_implicit_invocation: false
You want a Word document from ft-sdd → use Claude Code

ft-sdd writes a Word document through friendly-branded-docs, which the Codex install ships. word-pages.py finds friendly-branded-docs in the skills folder next to the folder that holds ft-sdd ($CODEX_HOME/skills or ~/.claude/skills), and falls back to ~/.claude/skills. The build and the file check run anywhere; the page-image check needs real Word (Windows or macOS), so a Codex-only Linux host gets a draft, exit code 3.

You want to change an agent → edit agents/<name>.md

The TOML is generated, so do not edit it by hand. Change the Markdown file, then run deploy/scripts/install-codex.sh again.

What the skill renderer changes in each skill

  • It keeps only these frontmatter keys: allowed-tools, description, license, metadata and name.
  • It replaces the description of ft-docker-standards, ft-fix and ft-refactor with a Codex-specific text.
  • It rewrites ~/.claude/... paths in the skill body to the Codex paths. The agent table lists them.

Use the Codex install next to the Claude Code one, or test the installer itself.

The Claude Code installEvery installer command in Deployment and Usage.
Test the installerThe Codex installer regression in Contributing: Regression Suites.
What Codex does withoutThe hooks and gates in Harness, except readonly-role-guard.
Deployment and Usage