Set up Codex
Kenaz, a Kameas AI product.
The quickest way is kenaz init. It sets up Codex, ChatGPT desktop's Codex mode and Claude Code in one go.
With kenaz init (recommended)
Install Kenaz, then run:
kenaz init
kenaz init puts kenaz on your PATH, signs you in, finds the Codex CLI and the ChatGPT desktop app, and runs kenaz setup codex for you, showing its diff and asking first.
See Install → Then run kenaz init for every step and option.
Restart Codex afterwards. The plugin's session hooks need you to trust them once in Codex; telemetry works without them.
Set up Codex by itself
To set up only Codex, run setup with the kenaz you installed:
kenaz setup codex
If kenaz isn't on your PATH yet, use its full path: ~/.kenaz/install/current/bin/kenaz setup codex on macOS and Linux, or & "$env:LOCALAPPDATA\Programs\Kenaz\current\bin\kenaz.exe" setup codex on Windows.
Setup starts the local relay if it isn't running, and then does two things:
-
It adds the plugin to Codex.
- If you already added the
kenazmarketplace from GitHub (kameas-ai/kenaz-plugin), setup uses it, and adds the plugin from it withcodex plugin add kenaz@kenazif it isn't installed yet. That plugin runskenazfrom yourPATH. - Otherwise, setup registers the plugin from your download. It first checks every file of the installed archive against its
bundle.json, and refuses a modified, incomplete or mixed-version archive. It then writes a per-user copy of the plugin under the Kenaz state directory, with the MCP server and hook commands pointing at thiskenazby its full path, and registers that copy withcodex plugin marketplace addandcodex plugin add kenaz@kenaz. The installed archive itself is never changed.
- If you already added the
-
It points Codex's telemetry at the local relay. It sets these keys in the
[otel]table of your Codex config file (~/.codex/config.toml, or$CODEX_HOME/config.toml):[otel]exporter = { otlp-http = { endpoint = "http://127.0.0.1:<relay port>/v1/logs", protocol = "binary" } }trace_exporter = { otlp-http = { endpoint = "http://127.0.0.1:<relay port>/v1/traces", protocol = "binary" } }metrics_exporter = { otlp-http = { endpoint = "http://127.0.0.1:<relay port>/v1/metrics", protocol = "binary" } }log_user_prompt = falsetool_result = { max_bytes = 0 }Nothing is sent to Kameas Fleet until you opt in.
kenaz setup claude and kenaz setup codex show you a diff of the changes to your Claude Code or Codex settings file and ask before writing it (--dry-run only shows the diff; --yes skips the question). Setup saves a backup copy next to the file. kenaz setup --undo claude (or --undo codex) removes the settings setup added and puts back the values it replaced; if you haven't edited the file since, it is restored exactly.
Before the diff, setup also lists the codex plugin commands it will run.
Re-running setup changes nothing; running it from a newer installed version re-registers that one.
If codex isn't on your PATH, setup uses the copy of Codex that the ChatGPT desktop app ships (macOS).
Restart Codex afterwards.
The plugin's session hooks need you to trust them once in Codex; telemetry works without them.
Options
kenaz setup codex [--yes] [--dry-run] [--env E] [--bundle DIR | --no-bundle]
kenaz setup --undo codex [--yes] [--dry-run] [--env E]
| Option | What it does |
|---|---|
--dry-run | Show the diff and change nothing. |
--yes | Apply without asking. Without it, setup asks, and makes no changes when it isn't run in a terminal. |
--env E | Kameas Fleet environment: prod (default), stage or dev. |
--bundle DIR | Register this extracted archive's plugin, replacing the kenaz marketplace from GitHub. --undo removes it and prints the command that adds the GitHub marketplace back. |
--no-bundle | Never register a downloaded archive's plugin; the plugin runs kenaz from your PATH. |
If setup stops or warns
- "Codex already has a "kenaz" plugin marketplace … that setup did not register": you added a
kenazmarketplace from somewhere other than GitHub'skameas-ai/kenaz-plugin, for example a local folder. Remove it (codex plugin marketplace remove kenaz) and run setup again. The plugin is never registered twice. - "the Kenaz plugin (kenaz@kenaz) is installed in Codex but turned off": see Troubleshooting.
- "the Kenaz plugin from GitHub starts
kenazfrom PATH, and kenaz is not on PATH": runkenaz initto putkenazon yourPATH, then restart Codex.
kenaz setup doctor checks what setup configured for each tool.
ChatGPT desktop (Codex)
The ChatGPT desktop app's Codex mode is covered by the same setup: kenaz init or kenaz setup codex sets it up too, and needs no separate step.
It runs Codex with the same ~/.codex/config.toml, plugins and marketplaces as the Codex CLI.
After kenaz init changes your PATH, quit and reopen ChatGPT so it sees the change.
From the kenaz marketplace
These are the self-install steps shown on the Agent harnesses page in Kameas Fleet, with the kenaz program installed first, as on the Install page.
The plugin installed this way runs kenaz from your PATH; kenaz init puts it there.
codex plugin marketplace add kameas-ai/kenaz-plugin
codex plugin add kenaz@kenaz
kenaz init
kenaz init signs you in and runs kenaz setup codex, which finds the marketplace you added and uses it, so the plugin isn't registered twice, and writes the [otel] settings.
For administrators: managed_config.toml
To route every developer's Codex telemetry to the local relay, deploy this block in Codex's managed_config.toml, which overrides each user's own [otel] settings.
It's the same template as on the Agent harnesses page in Kameas Fleet. To print it for your Kenaz version, run kenaz setup print-managed codex (add --raw for only the block, or --port N to pin another relay port).
- macOS and Linux file:
/etc/codex/managed_config.toml - macOS device management: preference domain
com.openai.codex, keyconfig_toml_base64(the block, base64-encoded)
Merge it with any [otel] settings you already manage.
[otel]
exporter = { otlp-http = { endpoint = "http://127.0.0.1:4318/v1/logs", protocol = "binary" } }
trace_exporter = { otlp-http = { endpoint = "http://127.0.0.1:4318/v1/traces", protocol = "binary" } }
metrics_exporter = { otlp-http = { endpoint = "http://127.0.0.1:4318/v1/metrics", protocol = "binary" } }
log_user_prompt = false
tool_result = { max_bytes = 0 }
Distributing this configuration makes Kenaz available. It does not opt anyone in. You are responsible for any notice your developers are owed under the laws that apply to them, and for any works-council or employee-representative consultation those laws require. Subscription Agreement §3.7.
Notes:
- To install the plugin for everyone, import the GitHub marketplace
kameas-ai/kenaz-pluginin the ChatGPT admin console and setkenazto Installed for the roles that should have it. Plugin hooks still need each user to trust them once in Codex; telemetry works without them. - The template is for Codex 0.147.0 or later.
- Each developer still needs the
kenazprogram on theirPATH, from a download or your device-management tool, and signs in once withkenaz login. Admin configuration never signs anyone in or turns on telemetry classes for them: nothing is sent until each member signs in and opts in.
Claude and Claude Code are trademarks of Anthropic, PBC. OpenAI and Codex are trademarks of OpenAI. Kenaz and Kameas are trademarks of Kameas AI, Inc. Kenaz for Claude Code and Codex is an independent product of Kameas AI, Inc. and is not affiliated with, endorsed or sponsored by Anthropic or OpenAI.