Codex CLI GPT-5.6 Context Window Fix: What 0.144.6 Changes for API Workflows

Abstract developer workspace showing GPT-5.6 context window routing for Codex CLI

On July 18, 2026, OpenAI shipped Codex CLI 0.144.6. It looks like a tiny patch: refreshed bundled instructions for GPT-5.6 Sol, Terra, and Luna, plus a correction to their Codex CLI context windows: 272,000 tokens.

That small line matters. Coding agents don’t fail gracefully when their model metadata is wrong. They overfill context, compact too late, quote budgets that aren’t real, and sometimes burn money on a request that had no chance of fitting. If you run Codex in production-like workflows, update the CLI and treat 272K as the planning window for GPT-5.6 inside Codex.

TL;DR: Key Takeaways

  • OpenAI released Codex CLI 0.144.6 on July 18, 2026, and the changelog says it corrected GPT-5.6 Sol, GPT-5.6 Terra, and GPT-5.6 Luna context windows to 272,000 tokens in Codex CLI bundled metadata.
  • GPT-5.6 Sol costs $5.00 per million input tokens and $30.00 per million output tokens for short-context API requests.
  • GPT-5.6 Terra costs $2.50 per million input tokens and $15.00 per million output tokens for short-context API requests.
  • GPT-5.6 Luna costs $1.00 per million input tokens and $6.00 per million output tokens for short-context API requests.
  • OpenAI API pricing says GPT-5.6 requests above 272,000 input tokens are priced at two times input and 1.5 times output for the full request.

Why the 272K Fix Changes Real Workflows

The practical issue isn’t whether a model can hold a million tokens somewhere in the API docs. The issue is what Codex thinks it can safely pack into a coding task. A repo scan, test output, dependency graph, diff, issue thread, and tool transcript can blow past 272K faster than people expect.

Before this patch, a stale or overly generous context estimate could make a local agent act confident while it quietly depends on server-side truncation or emergency compaction. That’s bad engineering. Context management should be boring and predictable.

My recommendation: after upgrading, set your own soft budget below the hard Codex window. I like 220K input tokens as a planning ceiling for large tasks. It leaves room for tool output, retries, approvals, and the model’s own reasoning items. If you need more, split the job.

Pricing Table: GPT-5.6 Models for Codex Work

ModelInput priceCached inputOutput priceCodex CLI context window
GPT-5.6 Sol$5.00 / 1M tokens$0.50 / 1M tokens$30.00 / 1M tokens272,000 tokens
GPT-5.6 Terra$2.50 / 1M tokens$0.25 / 1M tokens$15.00 / 1M tokens272,000 tokens
GPT-5.6 Luna$1.00 / 1M tokens$0.10 / 1M tokens$6.00 / 1M tokens272,000 tokens
GPT-5.3-Codex$1.75 / 1M tokens$0.175 / 1M tokens$14.00 / 1M tokens400,000 tokens

Model Comparison: Which One Should Run the Task?

OptionContext windowPricingBest forKey limitation
GPT-5.6 Sol272,000 tokens in Codex CLI metadata$5.00 input / $30.00 output per 1M tokensArchitecture changes, difficult debugging, high-risk refactorsExpensive when used for routine repo chores
GPT-5.6 Terra272,000 tokens in Codex CLI metadata$2.50 input / $15.00 output per 1M tokensDaily feature work, code review, test repairLess headroom than Sol for ambiguous multi-file design work
GPT-5.6 Luna272,000 tokens in Codex CLI metadata$1.00 input / $6.00 output per 1M tokensBulk edits, lint fixes, documentation, simple migrationsNot the model I’d pick for subtle product or security decisions
GPT-5.3-Codex400,000 tokens$1.75 input / $14.00 output per 1M tokensAgentic coding workloads already tuned for Codex behaviorOlder capability baseline than GPT-5.6 for frontend judgment and newer model behavior

Update Codex CLI First

If Codex is installed globally through npm, the update is straightforward:

npm install -g @openai/[email protected]
codex --version

Then run one small task before trusting a long repo operation. You want to verify that your shell, auth, sandbox, and project permissions still behave the way your team expects.

Use the API with an Explicit Model Choice

For direct API work, avoid vague aliases when you’re benchmarking. Use the exact model slug, then record cost and quality per task type.

curl https://api.openai.com/v1/responses   -H "Authorization: Bearer $OPENAI_API_KEY"   -H "Content-Type: application/json"   -d '{
    "model": "gpt-5.6-terra",
    "reasoning": {"effort": "medium"},
    "input": "Review this patch for correctness and security risks..."
  }'

Python: Add a Token Budget Gate

A coding agent should know when to split work before it calls the model. This simple gate is intentionally conservative:

MAX_CODEX_INPUT_TOKENS = 272_000
SOFT_BUDGET = 220_000


def choose_codex_strategy(estimated_input_tokens: int) -> str:
    if estimated_input_tokens <= SOFT_BUDGET:
        return "send_single_task"
    if estimated_input_tokens <= MAX_CODEX_INPUT_TOKENS:
        return "summarize_tool_output_then_send"
    return "split_into_subtasks"


for estimate in [80_000, 245_000, 410_000]:
    print(estimate, choose_codex_strategy(estimate))

This is boring code. That’s the point. The worst context bugs are the ones you only notice after the model has already dropped half the evidence.

Node.js: Route by Risk, Not by Hype

Don’t send every task to Sol just because it’s the flagship. A cheap router usually beats a heroic prompt.

function chooseModel(task) {
  if (task.risk === "high" || task.type === "architecture") return "gpt-5.6-sol";
  if (task.type === "feature" || task.type === "review") return "gpt-5.6-terra";
  return "gpt-5.6-luna";
}

const task = { type: "lint_fix", risk: "low" };
console.log(chooseModel(task)); // gpt-5.6-luna

If you’re using an OpenAI-compatible gateway such as KissAPI, keep the same idea: one key, multiple model routes, and explicit fallback rules. The important part is not the brand of the router. It’s that your automation doesn’t pretend every coding task deserves the most expensive model.

What to Change in Existing Codex Workflows

  1. Update to Codex CLI 0.144.6 or newer. The July 18 patch fixes metadata that directly affects GPT-5.6 planning.
  2. Set a soft context ceiling. Treat 220K input tokens as a safer planning limit for Codex GPT-5.6 tasks.
  3. Split huge repo jobs. Ask one run to inspect, another to patch, and a final run to review.
  4. Track model and token cost per task type. If Luna passes a routine migration, don’t pay Sol prices for the next hundred files.
  5. Keep fallbacks ready. Agent runs are long enough that rate limits, overloaded models, and permission prompts will happen.

Need GPT-5.6 Routing Without Rewiring Every Tool?

Create a free KissAPI account and use one OpenAI-compatible endpoint for GPT, Claude, Gemini, and coding-agent fallback workflows.

Start Free

FAQ

What changed in Codex CLI 0.144.6?

OpenAI Codex CLI 0.144.6, released on July 18, 2026, refreshed bundled instructions for GPT-5.6 Sol, GPT-5.6 Terra, and GPT-5.6 Luna and corrected their Codex CLI context windows to 272,000 tokens.

Does GPT-5.6 still support larger API context windows outside Codex CLI?

OpenAI API documentation lists GPT-5.6 Sol with a 1,050,000-token context window. The July 18 Codex changelog is specifically about Codex CLI bundled metadata and says the GPT-5.6 family context windows were corrected to 272,000 tokens there.

Should I use GPT-5.6 Sol for every Codex task?

No. Use GPT-5.6 Sol for hard, high-risk work. Use GPT-5.6 Terra for everyday coding tasks and GPT-5.6 Luna for cheap high-volume maintenance work.