Connect OffiAI to the Codex CLI on macOS
Run one installer, approve its hooks once and reopen OffiAI. From then on, each Codex CLI session shows up at a desk in OffiAI: it arrives with your first prompt, shows what kind of step Codex is on, and leaves when you quit.
Beta 76 is out: the OffiAI app for macOS (notarised DMG) and the Codex installer are on the release page.
What you need
- A Mac with Apple silicon.
- OffiAI, open on the same Mac. It is a free public preview: download it from the release page.
- The Codex CLI, version 0.161 up to 0.169 (check with
codex --version). - Node.js 18 or newer. The hooks run with the Node.js already installed on your Mac.
Install the hooks
- Download and unzip
offiai-codex.zip. Direct link: offiai-codex.zip (the app DMG and all releases: GitHub). - Run the installer. In the unzipped folder, run
node install-codex.mjs. It adds OffiAI's hooks to~/.codex/hooks.json(or to$CODEX_HOME/hooks.jsonif you set it), prints which file it changed and backs up the old one first. If you use several Codex homes, run it once per home:node install-codex.mjs --codex-home <dir>. - Approve the hooks. The next time you start
codexit asks you to review the new OffiAI hooks. Approve them once. - Send your first prompt. The desk appears then: Codex starts its session, and fires its hooks, with the first prompt, not when the window opens.
OffiAI shows the kind of step a session is on (prompt, tool, done) and when it last heard from it. A session that stays quiet for ten minutes leaves its desk; quitting Codex releases it straight away. The desk also shows Codex’s latest answer of each turn. A Codex session you start in your own terminal is read-only in OffiAI: to reply, continue in Codex. Since beta 40 you can also start Codex from OffiAI’s Reception (Codex must be installed in a supported version; Reception shows it). That session runs in its own terminal session, its answers appear in the desk’s Talk drawer and you reply from there, one line per message; approvals stay in its terminal (“Approve in Terminal”).
Troubleshooting
- Nothing appears in OffiAI
- Send a prompt first: the desk appears with the first prompt. Then check that OffiAI is open, that Codex CLI is On under Settings → Agents in the office, and that you approved the OffiAI hooks. If you just switched Codex CLI on, quit and reopen OffiAI: the on/off switch takes effect at the next start.
- It stopped working after a Node.js update
- The hooks call Node.js by its full path. Run
node install-codex.mjsagain to update it.
Uninstall
Run node install-codex.mjs --uninstall, with the same --codex-home if you used one. Only OffiAI's hook entries are removed; your other hooks stay as they are.
Privacy
The hooks send OffiAI only session start, end and heartbeat, the kind of each event, fixed labels, the word count of a prompt and tool names. OffiAI also reads Codex’s session files on your Mac to show the model and Codex’s latest answer at the desk, with secrets masked. The hooks talk to OffiAI over 127.0.0.1; nothing leaves your Mac.
More
- Connect OffiAI to Claude Cowork — one plugin file for the Claude desktop app.
- Connect OffiAI to the Claude Code CLI — no plugin needed.
- Changelog — what shipped and when.
- Roadmap — what comes next.