Codex CLI is a Full-tier host: MCP tools, project hooks, a managed
AGENTS.md and /prompts:repowise-* slash commands.
Install
Local, with your agent. Paste this into Codex:
Read https://docs.repowise.dev/setup.md and set up Repowise in this repository.
Local, by hand. An interactive repowise init offers Codex setup when
codex --version and codex login status both succeed. A non-interactive
run needs the flag:
repowise init --codexor, on an indexed repository:
repowise agents add --target=codexThe plugin. Codex can also load the Repowise plugin (MCP, hooks, seven skills) from a clone. See Plugins.
Hosted. Run in the repository, then sign in:
repowise agents add --target=codex --hosted
codex mcp login repowiseWhat gets written where
| File | Scope | What repowise writes |
|---|---|---|
.codex/config.toml | project | [mcp_servers.repowise] running repowise mcp, and [features] hooks = true, without which Codex ignores the hooks file |
.codex/hooks.json | project | SessionStart and PostToolUse hooks running repowise-augment --client codex |
AGENTS.md | project | The managed Repowise block (--no-agents skips it). OpenCode and Hermes share it |
~/.codex/hooks.json | user | The command-rewrite hook, on Codex builds that support it |
~/.codex/prompts/ | user | repowise-ask, repowise-why, repowise-risk and the other slash prompts |
Your global ~/.codex/config.toml is not touched. The hosted entry is a
url table in the project .codex/config.toml, named repowise-hosted
when a local repowise exists.
Restart
Start a new Codex session in the repository so it loads the project config.
For a hosted entry, run codex mcp login repowise (or repowise-hosted),
approve Repowise in the browser, then restart Codex. Run /hooks inside
Codex to review and trust the rewrite hook.
Verify
codex mcp list
repowise agentsYou should see repowise in the Codex list and codex with status
configured. In a session, type /prompts:repowise-ask and a question, or
ask "What are the hotspot files in this repo?" and check that Codex calls a
Repowise tool.
Uninstall
repowise agents remove --target=codexThis removes the server table, the hooks, the prompts and the AGENTS.md
block (kept while OpenCode or Hermes still uses it), and leaves your own
content outside the markers.
Troubleshooting
| Symptom | Fix |
|---|---|
| Hooks never fire | [features] hooks = true is missing from .codex/config.toml. Run repowise agents refresh. |
| Plugin hooks do not load | Plugin-bundled hooks are opt-in in Codex. Set [features] plugin_hooks = true, or use the hooks repowise init --codex writes. |
/prompts:repowise-* is missing or stale | repowise doctor reports it. Run repowise agents add --target=codex --scope=user. |
| Commands are not rewritten through distill | Codex applies a rewrite only on 0.137 or newer, and only for families set to permission: allow. repowise hook rewrite status shows what your build supports. |
codex mcp list has no repowise | Codex reads .codex/config.toml from the project you start it in. Start it in the repository root. |
Next
- Plugins for the Codex plugin and the
codex_cliprovider. - Hooks for what the Codex hooks say.
- Tool profiles to list all ten tools in Codex.