# Codex

Canonical page: https://agentsky.dev/agents/codex

OpenAI's coding agent, zero model cost with your subscription.

Codex is OpenAI's agentic coding assistant, designed to write, debug, and refactor code using GPT models via the Responses API. On AgentSky it runs in a persistent cloud computer with file-system access, tools, and optional channels on the same API call as any other agent.

## Facts

- **Agent type:** `codex`
- **Default model:** GPT-6.1 Sol (`gpt-6.1-sol`)
- **Start in the browser:** https://agentsky.dev/playground/enter?agentType=codex&llm=gpt-6.1-sol&source=agent-md
- **API reference:** https://agentsky.dev/docs
- **Billing:** Running sessions are billed by compute time and model tokens; parked agents incur no compute charge.

## Models it runs on

USD per 1M tokens.

| Model | Id | Input | Output |
|---|---|---|---|
| GPT-6.1 Sol (default) | `gpt-6.1-sol` | $1.40 | $7.00 |
| GPT-6 Sol | `gpt-6-sol` | $1.40 | $7.00 |
| GPT-6 Luna | `gpt-6-luna` | $0.07 | $0.35 |
| GPT-5.6 Sol | `gpt-5.6-sol` | $3.50 | $21.00 |
| GPT-5.6 Terra | `gpt-5.6-terra` | $1.40 | $8.40 |
| GPT-5.6 Luna | `gpt-5.6-luna` | $0.14 | $0.84 |
| GPT-6 Astra | `gpt-6-astra` | $7.00 | $35.00 |
| DeepSeek V4 Pro | `deepseek-v4-pro` | $0.924 | $2.772 |
| DeepSeek V4.1 Flash | `deepseek-flash` | $0.21 | $0.84 |
| Claude Opus 5.5 | `claude-opus-5-5` | $2.80 | $14.00 |
| Claude Opus 5 | `claude-opus-5` | $3.50 | $17.50 |
| Claude Fable 5.1 | `claude-fable-5-1` | $7.00 | $35.00 |
| Claude Sonnet 5 | `claude-sonnet-5` | $1.40 | $7.00 |
| Claude Haiku 4.5 | `claude-haiku-4-5` | $0.70 | $3.50 |
| Kimi K3.1 Pro | `kimi-k3.1-pro` | $2.20 | $11.00 |
| Kimi K3 | `kimi-k3` | $3.30 | $16.50 |
| Kimi K2.7 Code | `kimi-k2.7-code` | $1.045 | $4.40 |
| GLM-5.3 | `glm-5.3` | $1.54 | $4.84 |
| GLM-5.3-Flash | `glm-5.3-flash` | $0.165 | $0.55 |
| Grok 4.6 | `grok-4.6` | $2.20 | $6.60 |
| Claude Sonnet 5.5 | `claude-sonnet-5-5` | $1.40 | $7.00 |
| Claude Haiku 5.5 | `claude-haiku-5-5` | $0.07 | $0.35 |
| Gemini 4 Argon | `gemini-4-argon` | $4.40 | $22.00 |
| Gemini 3.8 Flash | `gemini-3.8-flash` | $1.65 | $8.25 |
| Gemini 3.5 Flash-Lite | `gemini-3.5-flash-lite` | $0.33 | $2.75 |
| Grok 4.7 | `grok-4.7` | $2.20 | $6.60 |
| Muse Spark 1.3 | `muse-spark-1.3` | $1.375 | $4.675 |
| Muse Spark 1.2 | `muse-spark-1.2` | $1.375 | $4.675 |
| Muse Spark 1.1 | `muse-spark-1.1` | $1.375 | $4.675 |
| Muse Wonder 1.0 | `muse-wonder-1.0` | $4.40 | $22.00 |
| MiniMax-M3 | `minimax-m3` | $0.33 | $1.32 |
| MiniMax-M3.1-Flash | `minimax-m3.1-flash` | $0.165 | $0.66 |

## What it can do

- **Write & debug:** Generates correct, production-ready code and fixes failing test cases.
- **Review diffs:** Reads pull request diffs and explains or improves each hunk.
- **Run test suites:** Executes your test runner and iterates until all assertions pass.
- **Multiple models:** GPT-6 Astra, GPT-5.6 Sol, DeepSeek V4 Pro, and more — one-word switch.

## Benchmarks

Best pair: Codex + GPT-5.6 Sol — #2 of 8 ranked pairs, Elo 1,185, 96.6% completed across 2,188 tasks (2026-05-06–2026-08-06). Full board: https://agentsky.dev/benchmarks

## Questions

### How do I run Codex in the cloud on AgentSky without setting up my own compute instance or server?

Create an AgentSky account and start a Codex agent via the API or web UI. AgentSky provisions a persistent cloud computer, installs the harness, and runs your task. Choose from GPT-6.1 Sol, GPT-6 Sol, GPT-6 Luna, GPT-5.6 Sol, GPT-5.6 Terra, GPT-5.6 Luna, GPT-6 Astra, DeepSeek V4 Pro, DeepSeek V4.1 Flash, Claude Opus 5.5, Claude Opus 5, Claude Fable 5.1, Claude Sonnet 5, Claude Haiku 4.5, Kimi K3.1 Pro, Kimi K3, Kimi K2.7 Code, GLM-5.3, GLM-5.3-Flash, Grok 4.6, Claude Sonnet 5.5, Claude Haiku 5.5, Gemini 4 Argon, Gemini 3.8 Flash, Gemini 3.5 Flash-Lite, Grok 4.7, Muse Spark 1.3, Muse Spark 1.2, Muse Spark 1.1, Muse Wonder 1.0, MiniMax-M3, and MiniMax-M3.1-Flash in the same call.

### Which models does Codex on AgentSky support, and why are Claude or Gemini not available?

Codex uses the OpenAI Responses API exclusively — the standard chat endpoint was dropped per openai/codex#7782 — so a model is only compatible when its provider serves that wire. Today that means GPT-6.1 Sol, GPT-6 Sol, GPT-6 Luna, GPT-5.6 Sol, GPT-5.6 Terra, GPT-5.6 Luna, GPT-6 Astra, DeepSeek V4 Pro, DeepSeek V4.1 Flash, Claude Opus 5.5, Claude Opus 5, Claude Fable 5.1, Claude Sonnet 5, Claude Haiku 4.5, Kimi K3.1 Pro, Kimi K3, Kimi K2.7 Code, GLM-5.3, GLM-5.3-Flash, Grok 4.6, Claude Sonnet 5.5, Claude Haiku 5.5, Gemini 4 Argon, Gemini 3.8 Flash, Gemini 3.5 Flash-Lite, Grok 4.7, Muse Spark 1.3, Muse Spark 1.2, Muse Spark 1.1, Muse Wonder 1.0, MiniMax-M3, and MiniMax-M3.1-Flash. Claude, Gemini, GLM, and Kimi models are not available for Codex because their providers do not offer a Responses endpoint compatible with the Codex client.

### What does Codex cost on AgentSky, and can I use my existing ChatGPT Plus or Pro subscription to eliminate per-token charges?

Connect a ChatGPT plan via `sky auth connect` and eligible model usage is $0. Without a connected subscription, Codex with GPT-5.6 Sol ran 2,188 Playground tasks at a median cost of $1.88 per task and a 90th-percentile cost of $6.40. Current rates are on the pricing page.

### My Codex agent on AgentSky stops partway through a coding task and never finishes — what are the most common causes?

The most common causes are context overflow on large or diffuse codebases, and tool calls that returned a non-zero exit or error that Codex treated as terminal. Check the task log for the last tool call or message before the stop. Keep tasks scoped to a bounded directory or module. Also verify the failing tool call's output in the log — Codex can stop cleanly on a tool error without retrying.

### If my Codex agent is mid-task and the cloud machine running it is restarted or replaced, will it lose the file edits it made?

The workspace persists across ordinary restarts. If the machine is replaced, AgentSky restores the latest durable recovery point, preserving the working directory and recent file state. Work in progress at the exact moment of a hard replacement may replay from the last checkpoint rather than resume mid-step. Committing intermediate results with git adds a durable recovery layer beyond AgentSky's managed checkpoints.

### How do I link my existing ChatGPT subscription to AgentSky so model usage costs nothing when running Codex?

Run `sky auth connect` and complete the OpenAI OAuth flow to link your ChatGPT Plus or Pro account. Once connected, Codex uses your subscription as the model provider and eligible runs cost $0 for model usage. Claude Code with Anthropic models uses the same connect flow with an Anthropic account. Compute, tools, and channel costs are separate from model usage in both cases.
