Agent adoption policy

August 23, 2026 ยท View on GitHub

Codex can select the plugin automatically from the installed skill descriptions, and users can always invoke $codex-process-jobs:start explicitly. The approved PreToolUse hook challenges non-obviously-short local commands before foreground execution, and PostToolUse reinforces the absolute release boundary after a successful start. The plugin therefore remains useful without any AGENTS.md policy.

The optional managed policy adds a compact high-priority routing default. Detailed critical-job, Goal, progress, cancellation, completion, and untrusted-output rules stay in the selected skills and load only when relevant. This keeps always-loaded context small without weakening the operational contract.

Policy scope is a separate opt-in decision. After showing the read-only preview, an installing agent must ask the user to choose exactly one:

  • global: manage the CPJ block in ~/.codex/AGENTS.md for every task on that execution host;
  • project: manage it in <project-root>/AGENTS.md for one repository or directory tree; or
  • none: leave every AGENTS.md unchanged and rely on skill routing plus hook classification and reinforcement.

Permission to install the plugin never implies one of these choices.

Hook consent is also separate and always manual. The installer never writes hook trust. After every install or update and client restart, the user must review the installed PreToolUse, PostToolUse, Stop, and UserPromptSubmit definitions and referenced shared source through /hooks. Any definition Codex marks new or changed requires approval; if trust persists, the user still verifies that status. Foreground classification and hook-boundary fallback can run only for definitions Codex currently trusts.

Preview any choice without changing anything:

node scripts/install.mjs --agent-policy global
node scripts/install.mjs --agent-policy project --project-root /absolute/path/to/project
node scripts/install.mjs --agent-policy none

After reviewing the paths and active-job check, apply the same choice:

node scripts/install.mjs --apply --agent-policy global

The installer inserts the contents of assets/agent-policy.md between these markers:

<!-- codex-process-jobs:begin -->
...
<!-- codex-process-jobs:end -->

Re-running the installer replaces that one managed block without duplicating it and preserves all unrelated instructions. An older verbose CPJ managed block is compacted in place. The block classifies the underlying finite workload rather than wrapper latency, composes task-specific correctness checks with CPJ lifecycle ownership, excludes interactive and persistent server/watch workloads, makes successful start a hard launch-turn boundary, forbids memory searches for CPJ work because the current request and validated CPJ state are authoritative, and points Codex to the selected skills for the full contract. The routing acceptance test exercises the intended positive and negative cases.

--agent-policy none never changes an AGENTS.md. The deprecated --with-agent-policy alias remains compatible with older automation and means --agent-policy global.

Repository-level or nested AGENTS.md files can override global guidance for their scope. If a project must never detach a particular command, state that exception close to the project. A project-scoped CPJ block is often preferable when only one repository has routinely long builds or evaluations.