> ## Documentation Index
> Fetch the complete documentation index at: https://docs.actual.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Codex

> Run the plugin's checks and briefing in Codex, and see where governance there differs from Claude Code.

The plugin runs in Codex with the same hook scripts and the same Actual CLI as in Claude Code, so the rules, verdicts, round limit and overrides are the same. What differs follows from what Codex offers a hook: there's no plan-approval step to hold a plan at, no Read tool, and no per-plugin settings.

Governance in Codex needs Actual CLI 0.15.0 or later. `actual plan-check --help` names `codex-hook` on a CLI that has it. On an older CLI, the session start offers the upgrade and the checks stand down.

## Install and trust the hooks

Add the repository as a plugin marketplace, then install the plugin:

```bash theme={null}
codex plugin marketplace add actual-software/actual-skill
codex plugin add actual-cli@actual-cli-skills
```

Codex runs a plugin's hooks only once you trust them. Open `/hooks` in the CLI, or **Settings → Hooks** in the app, review the plugin's hooks and trust them. Codex records that trust against the plugin's content, so after each update the hooks show as modified and stay off until you review them again.

To update, refresh the marketplace and install the plugin again:

```bash theme={null}
codex plugin marketplace upgrade actual-cli-skills
codex plugin add actual-cli@actual-cli-skills
```

The plugin isn't in Codex's public plugin directory, because OpenAI doesn't list plugins that carry hooks there. [Install the plugin](https://docs.actual.ai/install-plugin.md) covers the skill-only installs.

## The hooks

| Codex event | What the plugin does |
| - | - |
| `SessionStart` | Checks the installed CLI and offers an upgrade when it's too old. After a compaction or a clear, lets decisions be briefed again |
| `UserPromptSubmit` | Records the commit the turn starts from, hands the agent the conflicts the last turn stopped on, and records an `actual override` you typed |
| `PreToolUse` on a patch | Briefs the files the patch adds or updates |
| `PostToolUse` on `Bash` | Briefs the files a read-only shell command names |
| `PostToolUse` on `request_user_input` | Records your answer to a picker |
| `Stop` | Checks the plan a Plan-mode turn proposed, checks the turn's changes, and shows the session summary line |

[Hooks](https://docs.actual.ai/plugin/hooks.md) compares them with the Claude Code hooks.

## Plan checks

Codex has no plan-approval step, so the plan is checked when the Plan-mode turn that proposed it ends. The CLI reads the turn's mode and plan from the session's rollout. You see the first draft of a plan before it's checked, while Claude Code blocks a conflicting plan before you see it. A turn in any other mode gets the change check instead.

## A blocked turn

When either check blocks, the turn stops with a "Stopped" entry that lists the conflicts. The agent doesn't revise or undo anything first. You choose what happens next:

* **Revise.** Reply in your own words, for example "revise to conform". The conflicts reach the agent with your message.
* **Override.** Type `actual override all <code>`, or a rule id in place of `all`, as your message. A reason can follow the code. The override is recorded, a "Stopped" entry confirms it, and your message never reaches the agent.

The codes are the ones Claude Code's dialog uses: `misread`, `not-here`, `adr-wrong`, `adr-outdated` and `accepted`. See [Overrides](https://docs.actual.ai/guides/overrides.md).

### The picker

Where the agent can show a picker, you choose from a list instead of typing. Codex's picker is the agent's own `request_user_input` tool. Plan mode always has it. Default mode has it only with Codex's experimental `default_mode_request_user_input` feature on:

```bash theme={null}
codex --enable default_mode_request_user_input
```

or, in Codex's `config.toml`:

```toml theme={null}
[features]
default_mode_request_user_input = true
```

When a check blocks, the agent then shows **Revise … to conform (Recommended)** or **Override**. After **Override**, a second picker asks why: the check misread your change, the decision doesn't apply here, or the decision is wrong. Choose **Other** and type `accepted` if the block is right and you're going ahead anyway, or `adr-outdated` if the decision is out of date. If the picker goes unanswered, because the agent doesn't show it or you dismiss it, the turn ends with the typed choices above. `ACTUAL_CODEX_PICKER=off` always uses the typed choices.

### Runs nobody is watching

For a run with nobody to ask, such as `codex exec`, set `ACTUAL_UNATTENDED=on` or `ACTUAL_OVERRIDE_DIALOG=off`. A conflict then sends the agent straight back to revise. See [Unattended agents and CI](https://docs.actual.ai/guides/unattended-agents-and-ci.md).

## Overrides

Codex has no plugin commands, so there's no `/actual-cli:override`: type `actual override <rule-id|all> [code] [reason]` as a message. An override can't come from the agent's own shell, because the CLI refuses one from any process carrying Codex's `CODEX_THREAD_ID` or `CODEX_SESSION_ID`. `actual check-override` from a terminal outside Codex works too.

## Briefing

Codex has no Read tool. The files a read-only shell command names (`cat`, `head`, `sed -n`, `grep`, `rg` and the like) are briefed after it runs, and the files a patch adds or updates are briefed before it applies. The per-session cap is the same 48,000 characters, kept by the CLI.

Codex shows what a hook adds to the agent's context to the agent only, so each brief is announced as one line, such as `Actual AI: briefed 2 ADRs · 7 rules · src/auth/tokens.ts`. The agent never sees it. A read that briefs nothing new shows nothing, and there's no `/rules-brief`. `ACTUAL_RULES_BRIEF_NOTICE=off` drops the line and keeps the briefing. See [Rule briefs](https://docs.actual.ai/guides/rule-briefs.md).

## Session summary

The summary of what the plugin did this session appears as a line at the end of a turn, only when it has changed since it was last shown, since Codex has no band above the prompt. `ACTUAL_RULES_BRIEF=off` turns it off along with briefing.

## Settings and runners

Codex has no per-plugin settings, so the `ACTUAL_*` environment variables are the only way to set the plugin's options. [Settings](https://docs.actual.ai/plugin/settings.md) lists them.

When nothing names a runner, the checks in Codex try `codex-cli` and `openai-api` before `claude-cli` and `anthropic-api`. Set `runner` with `actual config set runner <RUNNER>` to choose one yourself.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.