Gray vs Codex CLI: which terminal agent should you use?

Last updated

Short answer

Choose Codex CLI if you want OpenAI's open-source coding agent with an OS-level sandbox on by default and a ChatGPT account sign-in. Choose Gray if you want a smaller, provider-agnostic MIT harness that runs 24/7 as a service and extends with plugins and skills.

GrayCodex CLI
What it isMinimal, always-on AI harness: one Rust binary, open source (MIT)OpenAI's open-source (Apache-2.0) terminal coding agent, written in Rust
Sign-in / modelsAny OpenAI-compatible provider with your own API key; local models through Ollama; Claude Pro/Max and ChatGPT plans through official pluginsChatGPT account sign-in (included on paid plans) or an OpenAI API key; built around OpenAI models
SandboxRuns the model's shell commands with your user's privileges; no sandbox or approval prompt by default. The official permissions plugin adds approvalsOn by default: commands run under OS-level restrictions until you approve more access
Runs 24/7Yes — the gateway runs Gray as a user service, with cron and app connectionsInteractive sessions plus a non-interactive codex exec mode for pipelines
Extends withPlugins and skills; MCP servers through the official pluginMCP servers and AGENTS.md project instructions
PriceFree (MIT); you pay your model provider. Hosted Voyager plan $77/month, not yet openFree software (Apache-2.0); use through a ChatGPT plan or API billing

Is Codex CLI safer than Gray?

Out of the box, yes: Codex CLI sandboxes commands at the OS level until you approve wider access. Gray runs the model's shell commands with your privileges and no sandbox by default, so use a container or the official permissions plugin for untrusted work; see Safety.

Can I use Codex CLI with non-OpenAI models?

Codex CLI is built around OpenAI models and ChatGPT sign-in. Gray connects to any OpenAI-compatible provider — Anthropic, Google, OpenRouter, DeepSeek and local models through Ollama — with your own keys; see Providers & models.

When should you choose Codex CLI instead?

Choose Codex CLI if you already pay for ChatGPT, want the sandbox-first security model, or need codex exec for scripted pipelines.

Sources

Competitor details are taken from the sources above as of the date at the top of this page. Products change quickly — if something here is out of date, open an issue on GitHub.