Skip to content

Integration

Codex

Use Codex with your OpenCode Console workspace's models, policies and any MCP servers or Library items.

npx @opencode/console setup codex

What it does

One command connects Codex on your computer to an OpenCode Console workspace. You keep running codex as before, with these changes:

  • /model lists the workspace's models, including ones from other providers. Requests go through Console, so the workspace's model rules and budgets apply.
  • Every tool call, and every skill a prompt mentions, is checked against the workspace's policies first. A blocked call stays blocked even with --dangerously-bypass-approvals-and-sandbox.
  • OpenCode Web Search is added as an MCP server when the workspace has it on. Codex's own web search is turned off while the workspace's policies limit web search, since Console can't check it.
  • If the workspace has MCP servers or Library skills and instructions, they're added too. Skills go in ~/.codex/skills, so you can run each one as $name, and instructions go in ~/.codex/AGENTS.md.

Codex picks up changes in Console when a session starts, and on tool calls once its copy is more than a minute old.

Requirements

  • An OpenCode Console workspace you're a member of.
  • Codex 0.167.0 or later.
  • Node.js 22 or later, for npx.

Setting up

  1. Run this in a terminal:
    npx @opencode/console setup codex
  2. Your browser opens Console. Check that the code matches the one in your terminal, approve the sign-in and pick the workspace.
  3. Setup prints the models and policies it set up, and any MCP servers and Library items. Run codex to start.

Setup approves its hooks in Codex for you, so /hooks lists them as trusted. Run the command again any time to update the setup.

Keeping your own provider

To keep your own Codex sign-in and models, such as a ChatGPT plan, run the command below. Codex still gets the workspace's policies, plus any MCP servers and Library items the workspace has.

npx @opencode/console setup codex --keep-provider

If the workspace offers no models, Codex keeps its own sign-in the same way. Run setup without --keep-provider to use the workspace's models again.

Checking the connection

To see who you're signed in as, the workspace, and how many policies and models it has, run:

npx @opencode/console status

Removing

To undo setup, run:

npx @opencode/console setup codex --remove

It puts back the settings setup changed, unless you've changed them since, and removes its hooks, command rules, MCP servers, skills and instructions. You stay signed in until you run npx @opencode/console logout.

Limits

  • Policies are checked by hooks in your Codex config, so they hold only while those hooks are in place and approved. If Codex stops trusting them after an update, run setup again or approve them in /hooks. Console enforces model rules, budgets and MCP tool rules itself, on every request that goes through it.
  • If a hook crashes or times out, Codex lets the call through. Policies that block a command by name, such as rm *, are also written to Codex's command rules, which Codex enforces itself. Input Codex sends to a command that's already running isn't checked.
  • Providers rules don't apply in Codex, so you can still point it at your own OpenAI account.
  • Until Codex has the workspace's policies, it blocks every tool call. If Console can't be reached, the policies it last fetched stay in place.
  • Running setup again overwrites settings you've changed by hand. If you already have an MCP server or skill with the same name as one of the workspace's, setup keeps yours.

Support

Email help@anoma.ly. We reply within two business days (Monday to Friday, excluding US holidays). The support page covers data requests, security reports and more.