Skip to content

Codex CLI ​

OpenAI's terminal coding agent. It uses only the Responses API.

Plugboard options ​

jsonc
"options": {
  "keys": { "codex-cli": "{env:PLUGBOARD_KEY_CODEX_CLI}" },
  "models": ["openai/gpt-5.6-luna#low", "anthropic/claude-haiku-4-5"],
  "aliases": { "fast": "anthropic/claude-haiku-4-5" },
  "maxTools": 128
}

Use any model your OpenCode server is signed in to. ChatGPT models need a variant such as #low. Codex's own tools plus one MCP server can go past the default maxTools of 64, so raise it if you add MCP servers.

Connect ​

In ~/.codex/config.toml:

toml
model = "fast"
model_provider = "plugboard"

[model_providers.plugboard]
name = "Plugboard"
base_url = "http://127.0.0.1:4010/v1"
env_key = "PLUGBOARD_KEY_CODEX_CLI"
# The only value Codex accepts. Plugboard serves it at /v1/responses.
wire_api = "responses"

Then export the key and run codex or codex exec "...". base_url ends in /v1; env_key names the variable Codex reads the key from. For any model id Codex does not know, an alias such as fast or a canonical id such as anthropic/claude-haiku-4-5, Codex warns that it has no model metadata; the warning is harmless. The file is in examples/codex-cli/.

For MCP servers in headless codex exec, set default_tools_approval_mode = "approve" on the server, or each tool call comes back as an approval error.

What works ​

  • Chat and streaming.
  • Codex's tools, including its multi-agent tools and MCP server tools.
  • Model names Codex knows (such as openai/gpt-5.6-luna#low), where Codex runs tools through its code mode.
  • Continuing a conversation by resending it, or with previous_response_id.

Limits ​

  • The model has no web search. Codex sends its web search tool by default; plugboard leaves it out and names it in the x-plugboard-dropped-tools header.
  • local_shell and tool_search tools are refused with 400.
  • Reasoning text is returned only when the hub sets reasoningOutput: true.
  • A 400 previous_response_not_found means the earlier answer is gone: expired, deleted, sent with store: false, or made with another app's key.