Connect Codex CLI to Repowise

Wire the Codex CLI to the local or hosted Repowise MCP server, with project hooks, AGENTS.md and /prompts:repowise-* commands, then verify and remove it.

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:

Paste into Claude Code, Codex, Cursor or any MCP agent

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:

bash
repowise init --codex

or, on an indexed repository:

bash
repowise agents add --target=codex

The 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:

bash
repowise agents add --target=codex --hosted
codex mcp login repowise

What gets written where

FileScopeWhat repowise writes
.codex/config.tomlproject[mcp_servers.repowise] running repowise mcp, and [features] hooks = true, without which Codex ignores the hooks file
.codex/hooks.jsonprojectSessionStart and PostToolUse hooks running repowise-augment --client codex
AGENTS.mdprojectThe managed Repowise block (--no-agents skips it). OpenCode and Hermes share it
~/.codex/hooks.jsonuserThe command-rewrite hook, on Codex builds that support it
~/.codex/prompts/userrepowise-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

bash
codex mcp list
repowise agents

You 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

bash
repowise agents remove --target=codex

This 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

SymptomFix
Hooks never fire[features] hooks = true is missing from .codex/config.toml. Run repowise agents refresh.
Plugin hooks do not loadPlugin-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 stalerepowise doctor reports it. Run repowise agents add --target=codex --scope=user.
Commands are not rewritten through distillCodex 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 repowiseCodex 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_cli provider.
  • Hooks for what the Codex hooks say.
  • Tool profiles to list all ten tools in Codex.

Hosted

Indexed on every push, with nothing to install.

Start free
Was this page helpful?
Report a problem with this pageUpdated