# Configuration Options for the Codex Plugin: Complete Guide for openai/codex-plugin-cc

> Explore Codex plugin configuration options for openai/codex-plugin-cc. Master model, temperature, maxTokens, reviewGate, and more to control AI behavior and API connectivity.

- Repository: [OpenAI/codex-plugin-cc](https://github.com/openai/codex-plugin-cc)
- Tags: api-reference
- Published: 2026-07-12

---

**The Codex plugin supports seven core configuration options—model, temperature, maxTokens, reviewGate, adversarialReview, openaiApiKey, and endpoint—that control AI behavior, review workflows, and API connectivity.**

The openai/codex-plugin-cc repository provides a Claude plugin that integrates OpenAI’s Codex model into the Claude Code environment. Understanding the available configuration options for the Codex plugin is essential for customizing model behavior, securing API credentials, and enabling specialized review workflows. These settings are defined across the plugin manifest, runtime environment variables, and initialization parameters.

## Core Configuration Options

The plugin’s behavior is controlled through a combination of static metadata and runtime parameters. Below are the specific options available for tuning the Codex plugin.

### Model Selection

The `model` option specifies which OpenAI model handles code generation and review tasks. Typical values include `gpt-4o`, `gpt-4-turbo`, and `gpt-3.5-turbo`. This option is read by the runtime when the plugin is instantiated. Default: `gpt-4o`.

### Sampling Parameters

Two options in `plugins/codex/scripts/lib/codex.mjs` control the generation behavior:

- **`temperature`**: Controls randomness of model responses. Lower values (e.g., `0.0`) produce deterministic output, while higher values (e.g., `0.7`) increase creativity. Default: `0.2`.
- **`maxTokens`**: Sets the upper limit on tokens returned in a single request. Default: `4096`.

### Review Workflow Flags

Advanced review behaviors are controlled by boolean flags:

- **`reviewGate`**: When set to `true`, activates the stop-review-gate hook implemented in `plugins/codex/scripts/stop-review-gate-hook.mjs`. This allows the plugin to halt a review if specific conditions are met. The flag is stored in runtime state via `plugins/codex/scripts/lib/state.mjs`. Default: `false`.
- **`adversarialReview`**: Enables an enhanced security prompt that asks the model to identify subtle bugs and edge-case failures. This uses the prompt template located at [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md). Default: `false`.

## Environment-Based Configuration

Sensitive and deployment-specific settings are read from environment variables within `plugins/codex/scripts/lib/codex.mjs` rather than hard-coded configuration files.

### API Authentication

The `openaiApiKey` option maps directly to `process.env.OPENAI_API_KEY`. You must provide this value through environment variables or a `.env` file; never embed credentials in source code.

### Custom Endpoints

The `endpoint` option allows specifying an alternative API URL for private deployments or testing. The default value is `https://api.openai.com/v1/chat/completions`. This is also read from environment variables in `plugins/codex/scripts/lib/codex.mjs`.

## Implementation Details by Source File

Understanding where each option is processed helps with debugging and extending the plugin:

- **[`plugins/codex/.claude-plugin/plugin.json`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/.claude-plugin/plugin.json)**: Contains the plugin name and version metadata read by the Claude runtime.
- **`plugins/codex/scripts/lib/codex.mjs`**: Core wrapper that builds request payloads and reads `model`, `temperature`, `maxTokens`, `openaiApiKey`, and `endpoint` configurations.
- **`plugins/codex/scripts/lib/state.mjs`**: Holds runtime state, including the `reviewGate` flag.
- **`plugins/codex/scripts/stop-review-gate-hook.mjs`**: Implements the logic for the `reviewGate` option.
- **[`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md)**: Prompt template used when `adversarialReview` is enabled.
- **`plugins/codex/scripts/app-server-broker.mjs`**: Entry point that reads configuration and starts the plugin server, orchestrating the initialization flow.

## Configuration Examples

Override defaults using environment variables before initializing the plugin:

```javascript
// Example: Overriding the default model and temperature via environment variables
process.env.CODEX_MODEL = "gpt-4-turbo";
process.env.CODEX_TEMPERATURE = "0.5";

// Example: Enabling the review gate from a script that launches the plugin
import { launchPlugin } from "./plugins/codex/scripts/lib/app-server.mjs";

await launchPlugin({
  reviewGate: true,           // turn on the stop‑review‑gate hook
  adversarialReview: false,   // keep normal review flow
  model: "gpt-4o",
  temperature: 0.2,
});

```

Provide sensitive credentials via shell environment:

```bash

# Example: Providing the API key via a .env file

export OPENAI_API_KEY="sk‑xxxxxxxxxxxxxxxx"

# Then start the plugin server

node plugins/codex/scripts/app-server-broker.mjs

```

## Summary

- The **Codex plugin** offers seven primary configuration options: `model`, `temperature`, `maxTokens`, `reviewGate`, `adversarialReview`, `openaiApiKey`, and `endpoint`.
- Static metadata resides in [`plugins/codex/.claude-plugin/plugin.json`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/.claude-plugin/plugin.json), while behavioral tuning happens in `plugins/codex/scripts/lib/codex.mjs`.
- Sensitive credentials (`openaiApiKey`) and custom endpoints must be set via environment variables, never hard-coded.
- The `reviewGate` and `adversarialReview` options enable advanced safety workflows via `plugins/codex/scripts/stop-review-gate-hook.mjs` and [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md).
- Initialization occurs through `plugins/codex/scripts/app-server-broker.mjs`, which orchestrates configuration loading.

## Frequently Asked Questions

### How do I set the OpenAI API key for the Codex plugin?

Set the `OPENAI_API_KEY` environment variable before launching the plugin. The runtime reads this from `process.env.OPENAI_API_KEY` in `plugins/codex/scripts/lib/codex.mjs`. Never hard-code the key in configuration files or source code.

### What is the difference between reviewGate and adversarialReview?

The `reviewGate` option activates a hook in `plugins/codex/scripts/stop-review-gate-hook.mjs` that can halt reviews based on runtime conditions, while `adversarialReview` changes the prompt template to ask the model specifically for subtle bug detection using [`plugins/codex/prompts/adversarial-review.md`](https://github.com/openai/codex-plugin-cc/blob/main/plugins/codex/prompts/adversarial-review.md).

### Can I use a custom OpenAI endpoint with the Codex plugin?

Yes. Set the `endpoint` environment variable to your custom URL. The default is `https://api.openai.com/v1/chat/completions`, but you can override this in `plugins/codex/scripts/lib/codex.mjs` for testing or private deployments.

### Where are the default model and temperature values defined?

Default values for `model` (`gpt-4o`) and `temperature` (`0.2`) are defined in `plugins/codex/scripts/lib/codex.mjs`. These values are used when the plugin is instantiated unless overridden by environment variables or initialization parameters.