[otel] table of the user-level ~/.codex/config.toml, and from the managed and system configuration that your administrators deploy. A project-level .codex/config.toml cannot set them.
Settings
The Harness Setup card on Settings > Uplink > Publishing Keys shows these settings, andagentgolf harness setup codex writes them to ~/.codex/config.toml, or to $CODEX_HOME/config.toml. See Set up with the CLI. To copy them by hand, replace:
<endpoint>withhttps://uplink.agent.golffor Cloud Uplink, or with the listener of your Self-Hosted Uplink instance, for examplehttp://127.0.0.1:4318.<publishing-key>with your personal publishing key. See Publishing keys.
- Each endpoint includes the full signal path:
/v1/logsor/v1/traces. - Use
otlp-httpwithprotocol = "binary". A Self-Hosted Uplink instance with its gRPC listener on also acceptsotlp-grpcon port 4317, without the signal path. Cloud Uplink also acceptsotlp-grpcathttps://uplink.agent.golf. See Protocol. - Keep both the log exporter and the trace exporter. Uplink needs both signals.
- Set
metrics_exporter = "none". Uplink does not use Codex metrics. - Codex does not replace environment variables in
headers. Put the secret itself in the file, and let only your user read the file.
Team rollout
Codex merges its configuration layers table by table, key by key. A key in a layer replaces the same key in all layers below it. A table that a layer does not set, or a key that a table does not hold, keeps its value from the lower layers. From the lowest to the highest precedence, the layers that can set[otel] are:
- The system file:
/etc/codex/config.toml, or%ProgramData%\OpenAI\Codex\config.tomlon Windows. - The cloud configuration of a ChatGPT Business or Enterprise workspace.
- The user file:
~/.codex/config.toml, or$CODEX_HOME/config.toml. - The legacy
managed_config.tomlfile. - The macOS managed preferences of domain
com.openai.codex, keyconfig_toml_base64. Deploy them with an MDM profile.
agentgolf harness managed-settings codex prints the shared settings. Add --endpoint <url> for a Self-Hosted Uplink instance. See agentgolf harness managed-settings. Put them in a managed layer. Do not put a publishing key in it:
agentgolf harness setup --all, or agentgolf harness setup --all --endpoint <url> with the same URL for a Self-Hosted Uplink instance. The command writes the publishing key to their user file. With another endpoint in the user file, Codex sends to that endpoint, because the user file is above /etc/codex/config.toml. To write the file by hand, put only the publishing key in it:
- In
/etc/codex/config.toml, the settings are defaults. A developer can change each of them in their user file. - The MDM value
config_toml_base64is above the user file. It fixes each key that it sets, for exampleendpointandprotocol, and keeps theheadersof each user, because the managed exporter tables have noheaders. - Never set
headersin a managed layer. Underconfig_toml_base64, it replaces the personal publishing key of each user. - Do not set
exporterortrace_exporterin the[otel]table of a Codexrequirements.toml, or of the MDM keyrequirements_toml_base64. A requirement replaces the full exporter, with itsheaders. It removes each developer’s personal publishing key, and Agent Golf cannot find their sessions’ contributor. - You can set the other
[otel]keys as requirements, for examplelog_user_promptandmetrics_exporter.
Session content
Codex sends tool arguments and tool output in its log events by default.log_user_prompt = true adds prompt text. The settings above turn it on. Set it to false where your policy does not allow the uplink instance to receive that content. With less content, Agent Golf links fewer sessions to pull requests automatically. See Session content.
TLS with a private CA
Each exporter accepts atls table for the trust anchor of a private CA. See the Codex configuration reference for its keys.
Known limits
codex mcp-serversends no OpenTelemetry data. Sessions in this mode do not show in Agent Golf.
Verify the setup
- Start
codexand send a prompt. Then do the checks in Verify the setup. - If Uplink receives no requests, confirm that
exporterandtrace_exporterare set in~/.codex/config.tomlor in a managed layer. - If Uplink refuses the requests, or sessions have no contributor, confirm that no Codex requirement sets
exporterortrace_exporter. Codex writes a warning at start when a requirement replaces a setting.