Connect Codex

Codex is connected as a custom model provider. How much Guardrail can do depends on how Codex is signed in, and it detects that per request.

Connect

Terminal command
guardrail connect codex

This adds a model provider pointing at http://localhost:4000/openai/v1 to your ~/.codex/config.toml, preserving the file’s permissions and leaving your other settings untouched. Restart Codex afterwards.

Two login modes

Signed in withWhat Guardrail does
An OpenAI API keyAPI-key requests are proxied and checked against your policies. Pre-send blocking: Supported.
A ChatGPT subscriptionSubscription traffic is not proxied. Visibility does not block requests or guarantee remaining quota. You get visibility, not enforcement.

Nothing needs configuring for this: the mode is detected from the credentials on each request.

Check it worked

Terminal command
guardrail status
guardrail doctor

Run a Codex prompt and confirm a session shows up in the dashboard with codex as its tool.

Disconnect

Terminal command
guardrail disconnect codex

Cursor is coming. Cursor routes model calls through its own cloud, so it is metered differently from the tools above: support is in progress through Cursor Hooks, which give per-session activity metering and enforcement. See the supported tools for what ships today.

Documentation review: 2026-09-11. Integration mode matters; minimum binary versions are not specified for every guide. Run guardrail doctor to inspect your installation.

Website changes and known limitations