Skip to main content
The openai:codex-sdk provider connects Promptbeat to OpenAI Codex as a real coding-agent target. Promptbeat delivers each generated probe directly to the Codex CLI, which runs inside the configured workspace under the constraints you set. This is the current validated path with a saved baseline report — you can reproduce the run today by following the steps below.

Provider YAML

The provider file below is the exact file used in the validated Codex example at examples/codex_agent/providers.codex-sdk.yaml. Copy it into your project and adjust the model and working_dir fields for your environment.
providers.codex-sdk.yaml

Field reference

Current baseline config

The validated Codex run uses the following settings. This is the configuration that produced the saved report in examples/codex_agent/artifacts. The 70.3% pass rate on the broad coding-agent suite is the current baseline. Use it as the reference point when you compare model upgrades, policy changes, or alternative coding agents.

Required credentials

Set OPENAI_API_KEY in your shell before running generate or eval. Promptbeat passes it to the Codex CLI through the process environment when inherit_process_env: true is set.
If you switch to an explicit cli_env allowlist, include every variable the Codex CLI needs:
providers.codex-sdk.yaml
Never write a literal API key value into a provider YAML file. See Provider Files for the full credential handling guidance.

Production tips

  • Replace inherit_process_env: true with an explicit cli_env allowlist for any run that saves artifacts to a shared location or CI system. Broad environment inheritance can pass unintended secrets to the agent process.
  • Set deep_tracing: true when the report needs evidence of specific commands, file writes, or tool calls — not just the final answer text.
  • Use a disposable or writable fixture workspace when you run write-boundary or sandbox-escape scenarios. Point working_dir at a directory you can reset between runs.
  • Watch rate limits when running large probe counts. The Codex CLI makes one API call per probe. Start with --count 10 or --count 20 and increase once you have validated your workspace setup.
  • Run promptbeat validate before generate to catch config errors before they consume generation budget.
For the complete end-to-end walkthrough — including promptbeat.yaml, target.yaml, scenarios.yaml, seeds.yaml, and the full command sequence — see Agent Configuration Examples.