Skip to main content
The plugin works through hooks: Claude Code and Codex call a plugin script at fixed points in a session, and each script hands the moment to the Actual CLI. The plugin registers 7 hook events in Claude Code and 5 in Codex, and adds a mod in Claude Code. Every hook does nothing in a repository without rule files in .actual/rules/ (or the directory ACTUAL_RULES_DIR names), so installing the plugin changes nothing in a repository Actual doesn’t govern. The one exception is the plan-approval hook once you turn on unattended mode.

Claude Code

The plan check and the change check each have 180 seconds, and show a status line while they judge, such as “Checking plan against architecture rules…”.

Codex

Codex runs a plugin’s hooks only after 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 stay off until you review them again. Every Codex hook needs CLI 0.15.0 or later, which actual plan-check --help shows by naming codex-hook. Codex has no session-end hook, so a Codex session sends no session-end event. Codex covers what governance looks like there.

The Claude Code mod

Beside its hooks, the plugin loads a mod in Claude Code (hooks/register.js, with the override dialog in hooks/override-dialog.js). It needs Claude Code 2.1.287 or later; on 2.1.285 and 2.1.286, set CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 to load it. Where it loads, it:
  • Briefs every read. It briefs reads through the Read tool and through shell commands Claude Code marks read-only, and an edit or write of a file never read. Briefing shares one budget (48,000 characters per session by default) and one record of what the agent has already been told, so a file read twice is briefed once.
  • Reports each brief. Each read of a governed file adds one line to the transcript, such as actual-cli: ▌ BRIEFED 2 ADRs · 8 of 35 rules tokens.ts. The model never reads these lines. /rules-brief opens a pane listing the session’s reads.
  • Shows the session summary. A row above the prompt counts the decisions added to the agent’s context and the folders it worked in that no decision covers.
  • Asks you about a denial. When a check denies, it asks whether to revise or override, and records the override you choose. It also records a typed /actual-cli:override. See Overrides.
Without the mod, the Read hook still briefs reads through the Read tool, with no cap and no transcript line, and you record an override with actual check-override from a terminal.

Fail-open behavior

Only an explicit deny from plan-check or impl-check can block. Everything else lets the plan or the turn through:
  • No rule files. Every hook exits silently.
  • The CLI is missing, too old, unreadable or crashes. You get a message, never a block.
  • No runner, a failed judge call, or no plan or diff to read. A notice says the work wasn’t checked.
  • Too many rules for one check. Past about 60 selected rules, a prioritized part of them is judged, and the notice says how many of how many were checked.
  • A rule that stays unresolved. It stops blocking after 3 denied rounds per session. ACTUAL_PLAN_CHECK_MAX_ROUNDS and ACTUAL_IMPL_CHECK_MAX_ROUNDS change the limit; see Environment variables.
  • Briefing. It never blocks anything.
  • The CLI’s own judge. Every hook and the mod stay silent inside the claude subprocess the CLI runs as its judge, which it marks with ACTUAL_CLI_SUBPROCESS=1.
Round-limit passes and overrides are logged in ~/.actualai/actual/plan-check-overrides.log. Treat a denial as a strong nudge with a record behind it, not a security control. To turn every hook off, set ACTUAL_PLAN_GATE=off. Settings lists that switch and the others.