---
title: "Oh My Sol vs Codex CLI for Solana development · Barestate"
description: "How Oh My Sol and Codex CLI differ for building Solana programs, how they score on Solana Bench and fresh Solana tasks with the same OpenAI models, and how to run your ChatGPT subscription inside Oh My Sol."
url: https://barestate.xyz/compare/oh-my-sol-vs-codex-cli
---

# Oh My Sol vs Codex CLI for Solana development

Short answer

Codex CLI is OpenAI's general coding agent for the terminal. Oh My Sol is a Solana harness that runs the same OpenAI models on your ChatGPT subscription, adding Solana references, error decoding, toolchain checks, a local Surfpool chain and a check that closes a task only when your requirements pass. With GPT-6.1 Sol it passed 96% of fresh Solana tasks against 76%, and scored 377 against 273 on Solana Bench.

Who it’s for

Solana developers who use Codex CLI or a ChatGPT plan and want to know what a Solana harness adds.

Last checked

November 16, 2026, against Oh My Sol 0.1.0

## What is the difference between Oh My Sol and Codex CLI?

Codex CLI is OpenAI’s coding agent for the terminal. It inspects a local repository, edits files and runs commands, with permission settings for when it can act without asking, optional live web search and support for local and remote MCP servers. Oh My Sol (OMS) is a terminal harness built for Solana work. It does not supply a model; it runs the one you already have, including OpenAI models on a ChatGPT plan.

|  | Codex CLI | Oh My Sol 0.1.0 |
| --- | --- | --- |
| Scope | Any language or project | Solana programs and clients |
| Models | OpenAI models, signed in with ChatGPT or another sign-in method | OpenAI (ChatGPT subscription or API key), Anthropic, MiMo and OpenCode models |
| Solana references | The model’s own knowledge, plus MCP servers and skills you add | Offline reference for 50 programs and 1,559 instructions, a pinned Solana documentation set, then the official Solana MCP server |
| Error decoding | Left to the model | `/error 3012` or `/error 0xbc4` turns a code into a name and message; `/tx` shows a transaction’s status, compute and logs |
| Toolchain checks | Left to the model | `oms toolchain check` compares Anchor, Solana/Agave and platform-tools with pinned versions |
| Local chain | Whatever you set up | Surfpool chain built in, with `/chain`, `/airdrop`, `/account` and `/rewind` |
| When a task is done | The model decides | Each task runs in its own Git worktree. The model can only propose that it is done; a separate check runs your requirements on a fresh offline chain |
| Command sandbox | Configurable permissions and sandbox | macOS Seatbelt sandbox that always blocks `~/.config/solana` and `~/.ssh`, or Docker mode |

## Can I use my ChatGPT subscription in Oh My Sol?

Yes. OMS connects a Codex or ChatGPT subscription under the provider id `openai-codex`, or an OpenAI API key. Nothing is sent to a model until you type a request.

```
npx @barestate/oms doctor --install
npx @barestate/oms
/connect   → Codex or ChatGPT subscription
/model     → gpt-6.1-sol
```

The [connect guide](https://barestate.xyz/docs/guides/connect-a-model) covers every provider, and [the model catalog](https://barestate.xyz/docs/reference/models) lists the OpenAI models OMS 0.1.0 can use: `gpt-6.1-sol`, `gpt-6-astra` and `gpt-6.1-terra`.

## Which one passes more Solana tasks?

OMS does. On eight fresh Solana tasks, each graded by a hidden check, both harnesses ran the same OpenAI model.

| Model | Oh My Sol | Codex CLI |
| --- | --- | --- |
| GPT-6.1 Sol | 96% | 76% |
| GPT-6 Astra | 92% | 71% |

OMS also used 42% fewer input tokens per solved task with GPT-6.1 Sol and 51% fewer with GPT-6 Astra. The [fresh tasks page](https://barestate.xyz/docs/benchmarks/fresh-tasks) has the charts.

## How do they compare on Solana Bench?

Solana Bench scores how many distinct Solana instructions an agent executes successfully on a mainnet fork. Both harnesses ran GPT-6.1 Sol. Higher is better.

| Environment | Oh My Sol | Codex CLI |
| --- | --- | --- |
| Basic | 377 | 273 |
| Swap | 366 | 283 |

See the [Solana Bench page](https://barestate.xyz/docs/benchmarks/solana-bench) for both environments.

## Which should I use?

- **Use Codex CLI** for work outside Solana, for scripting and CI, and for Codex features such as cloud tasks and branch reviews.
- **Use Oh My Sol with your ChatGPT subscription** when you are writing, testing or debugging a Solana program and want the work checked on a local chain before it counts as done.

## Frequently asked questions

Is Oh My Sol a replacement for Codex CLI?

For Solana work, it is the better tool. Codex CLI is a general coding agent for any project, and Oh My Sol (OMS) is a harness built for Solana. OMS can run your ChatGPT or Codex subscription, so you can keep Codex CLI for other projects and use OMS when the work is a Solana program.

Can I use my ChatGPT or Codex subscription with Oh My Sol?

Yes. Inside OMS, run /connect and choose the Codex or ChatGPT subscription (provider id openai-codex), then pick a model such as gpt-6.1-sol with /model. You can also connect an OpenAI API key instead.

Does Oh My Sol score better than Codex CLI on Solana tasks?

Yes. With GPT-6.1 Sol in both harnesses, OMS passed 96% of runs on eight fresh Solana tasks against 76% for Codex CLI. On Solana Bench it averaged 377 in the basic environment against 273, and 366 in the swap environment against 283. It also used 42 to 51% fewer input tokens per solved task with the OpenAI models.

When is Codex CLI the better choice?

For work outside Solana, for scripting and CI in any language, and when you want Codex features such as cloud tasks or code review against a branch.

Can a command the model writes read my Solana keypair?

On macOS, OMS runs every command through a Seatbelt sandbox that blocks reads from your home folder, apart from the toolchains it needs, and always blocks ~/.config/solana and ~/.ssh. On Linux, Docker mode runs commands in a container; in host mode there is no operating system sandbox, so OMS asks you to approve every model shell command.

## Try it on your own program

Oh My Sol 0.1.0 runs on macOS and Linux, and on Windows through WSL 2. You need Node 22.19.0 or newer and Git. You bring your own model access: an API key, a ChatGPT subscription or a Claude subscription.

```
npx @barestate/oms doctor --install
npx @barestate/oms
```

[Read the docs](https://barestate.xyz/docs) · [See the benchmarks](https://barestate.xyz/oh-my-sol#benchmarks)
