Skip to content

Credits, Usage Limits, and Cost Optimization

Codex cost management covers pricing tiers, the token-based credit system, and strategies for reducing spend without losing productivity. Credits scale with the mix of input, cached input, and output tokens across the Sol, Terra, and Luna model tiers, so right-sizing tasks, trimming AGENTS.md, limiting MCP servers, routing to a cheaper tier, and using cloud deliberately all reduce consumption. Usage dashboards and the Analytics API make that spend visible and alertable.

You are three days into a sprint and your team’s Codex usage dashboard shows you have burned through 80% of the available credits. Two developers are running broad exploratory tasks with far more context than they need. One automation is running hourly when daily would suffice. Without visibility and discipline, Codex costs can surprise you. This article gives you the controls and strategies to keep spending predictable.

What you’ll walk away with on Codex cost management

Section titled “What you’ll walk away with on Codex cost management”
  • A clear understanding of Codex pricing tiers, credit costs, and usage limits
  • Concrete strategies that reduce unnecessary credit consumption without sacrificing productivity
  • Monitoring and alerting patterns using the usage dashboard and Analytics API
  • Decision frameworks for when to use local vs cloud and GPT-5.6 Sol vs Terra vs Luna
Access routeGPT-5.6 in CodexHow usage is metered
Free / GoTerraIncluded plan limits; users are prompted to upgrade rather than buy extra Codex credits
Plus / ProSol, Terra, and LunaIncluded usage first; eligible users can buy credits after reaching it
Business / EnterpriseSol, Terra, and Luna when enabled for the workspace and roleIncluded usage and/or a managed credit pool, depending on workspace configuration
OpenAI API keySol, Terra, and Luna through the APIAPI token billing, separate from ChatGPT plan credits

Model availability and usage allowances depend on the plan, rollout, workspace policy, and role. Do not hard-code message counts in budgeting documentation: OpenAI can adjust included limits, while the usage dashboard shows the current account-specific allowance.

Most new and existing customers now use the token-based Codex rate card. Credits depend on the actual mix of input, cached input, and output tokens rather than a fixed cost per message:

ModelInput / 1M tokensCached input / 1MOutput / 1M
GPT-5.6 Sol125 credits12.50 credits750 credits
GPT-5.6 Terra62.50 credits6.25 credits375 credits
GPT-5.6 Luna25 credits2.50 credits150 credits

For the same token mix, Terra consumes half as many credits as Sol and Luna one fifth as many. Real tasks can use different amounts of context and output, so those ratios are not guaranteed per-task savings. A small subset of Enterprise workspaces still uses the legacy per-message card; verify which card applies before forecasting. Under the current token-based card, code review uses GPT-5.3-Codex rather than one of the GPT-5.6 tiers.

The biggest cost driver is task complexity. Every message Codex processes includes your prompt, AGENTS.md, MCP tool definitions, and accumulated context.

Every Codex message includes your AGENTS.md content. For large projects, use nested AGENTS.md files:

# Root AGENTS.md (100 lines - loaded for all tasks)
AGENTS.md
# Service-specific (50 lines - loaded only when working in payments/)
services/payments/AGENTS.md
# Frontend-specific (50 lines - loaded only when working in frontend/)
packages/frontend/AGENTS.md

This way, a task in services/payments/ loads 150 lines of guidance instead of a monolithic 500-line file.

Every configured MCP server adds tool definitions to your context. Disable MCP servers you are not actively using:

~/.codex/config.toml
[mcp_servers.sentry]
enabled = false # Re-enable when debugging production issues
[mcp_servers.linear]
enabled = true # Always useful for issue context

Reserve GPT-5.6 Sol for complex reasoning. Use Terra for balanced everyday work and Luna for:

  • Simple refactors and renames
  • Straightforward test writing
  • Documentation updates
  • Linting and formatting fixes

In the CLI: codex --model gpt-5.6-luna "add docstrings to all public functions in src/utils/"

GPT-5.6 API pricing: Sol $5 / $30, Terra $2.50 / $15, and Luna $1 / $6 per MTok input/output. Codex subscription usage follows the credit rate card above. Model and reasoning-effort choices shown in Codex depend on the plan and workspace role.

In the App: switch models in the thread composer dropdown.

The current rate card is token-based, so local and cloud tasks do not have one durable per-message price ratio. Cloud runs can still consume more when they load broader environments, run longer, or produce more output. Use cloud when you need:

  • Remote execution (delegating from Slack, mobile, or another timezone)
  • Complete environment isolation
  • Best-of-N parallel attempts
  • Work on a branch you have not pushed yet (use codex cloud to delegate from CLI)

The Codex usage dashboard shows:

  • Current usage against your limits
  • Credit consumption over time
  • Breakdown by surface (local, cloud, code review)

For enterprise teams, build automated alerts. Look up the exact route and auth for daily metrics in the Analytics API reference — the endpoint below is illustrative:

// Check daily credit burn rate
// Illustrative endpoint — see the Analytics API reference for the real path
const response = await fetch(ANALYTICS_DAILY_ENDPOINT, {
headers: { Authorization: `Bearer ${adminToken}` }
});
const data = await response.json();
const dailyCredits = data.total_credits_used;
if (dailyCredits > DAILY_BUDGET * 0.8) {
await sendSlackAlert(`Codex credit usage at ${dailyCredits}/${DAILY_BUDGET} (80% of daily budget)`);
}

Automations are a hidden cost driver because they run unattended:

  • Review cadence: Does your automation need to run hourly? Daily is often sufficient.
  • Scope prompts tightly: A broad “scan the entire codebase” automation costs much more than “scan files changed in the last 24 hours.”
  • Use read-only mode: Reporting automations do not need write access, and read-only mode prevents unnecessary tool calls.
  • Archive completed runs: Old automation worktrees consume disk space, and their creation consumed credits. Archive what you have reviewed.
  • Hitting limits mid-sprint: Free and Go users are prompted to upgrade. Eligible Plus and Pro users can buy credits; managed-workspace options depend on role and admin policy. For the same token mix, moving from Sol to Terra halves the credit rate, while Luna uses one fifth of Sol’s rate.
  • Unexpected cloud task costs: Review which integrations (Slack, Linear) are creating cloud tasks. Consider restricting cloud access to specific user groups via RBAC.
  • Automation credit drain: Check the Automations section in the sidebar for runs that are firing too frequently or producing low-value results. Adjust cadence or disable.
  • API key usage surprises: API key usage is billed at standard API rates per token. Set spending limits in the OpenAI platform dashboard.