Install in Codex

Have Codex install and connect LeoPrevent, or run the commands yourself, then trust its three hooks. Untrusted hooks review nothing.

LeoPrevent installs into Codex from its public marketplace. Have Codex do it for you, or run the commands yourself. Either way, you then trust the plugin's three hooks yourself.

Before you start#

  • Codex is installed on macOS or Linux.
  • You have a LeoPrevent account.
  • You work in a git repository.

Set it up with your agent#

Your agent installs the plugin and opens your browser to connect it. The same prompt is in the dashboard under Plugin setup, with Copy.

Start Codex in your terminal and send this prompt:

Install the LeoPrevent plugin for Codex from the leotrace-hq/leoprevent-plugin marketplace, using my real Codex home, then run its login command. Keep login running until it prints "LeoPrevent · Connected". I will trust the hooks myself afterwards. Browser login saves the credential locally, so no licence key needs to be copied. Do not ask for, paste, or print one; keep credentials out of this transcript. Tell me what I need to approve or restart myself. Verify with a real turn, not by running the hook by hand: LeoPrevent fails open, so a successful manual run does not prove your coding agent invokes it. Confirm that turn appears in the LeoPrevent dashboard; report verification as pending if you cannot check it.

Approve what it asks for and choose Link installation when the browser opens. Then start a new session, run /hooks, trust all three and send any message.

Manual setup#

  1. 1
    Add the marketplace
    codex plugin marketplace add leotrace-hq/leoprevent-plugin
    Bash
  2. 2
    Install the plugin
    codex plugin add leoprevent@leotrace
    Bash

    Open a new session, then confirm it shows leoprevent@leotrace as installed and enabled.

    codex plugin list --marketplace leotrace
    Bash
  3. 3
    Trust the hooks

    In the new session, run /hooks, review each LeoPrevent hook and trust all three: UserPromptSubmit, PreToolUse and Stop. In the Codex app, add a local project folder, then trust them in Settings > Coding > Hooks > LeoPrevent.

  4. 4
    Connect to LeoPrevent

    Ask Codex to run the plugin's login command, then choose Link installation on the page it opens in your browser. Keep it running until it prints LeoPrevent · Connected. If Codex cannot find the command, run this yourself, replacing <version> with the installed version:

    ~/.codex/plugins/cache/leotrace/leoprevent/<version>/bin/leoprevent-plugin login
    Bash

Check it worked#

Paste this into your agent and let it reply. The finished turn is what checks in.

Hello! I just installed LeoPrevent. Say hi back so this turn finishes.

The installation then shows as Live in Plugin setup. See Check it's working.

Already installed this before?#

Run only the install command. At the same version, the marketplace, the hook trust and your connection all survive. A version whose hooks changed asks you to trust them again in /hooks.

Update#

Refresh the marketplace, then install from it. Open a new session and trust any changed hooks in /hooks. Your connection survives the update.

codex plugin marketplace upgrade leotrace
Bash
codex plugin add leoprevent@leotrace
Bash

Remove#

Disable or remove leoprevent from Codex's /plugins list.

Updated 19 Nov 2026

Suggested articles