Codex 0.140.0 Turns Claude Code Migration and Token Usage Into First-Class Product Surfaces

Codex 0.140.0 Turns Claude Code Migration and Token Usage Into First-Class Product Surfaces

OpenAI shipped Codex 0.140.0 this week, and the release notes will tell you it adds an /import command and a /usage view. That is technically accurate and completely undersells what just happened.

This release is the moment OpenAI stopped pretending Codex is a fresh-start product and started treating it like a destination. Import flows for Claude Code setup are not a convenience feature. They are an acknowledgment that coding agents now accumulate state — project configs, tool permissions, conversation history, MCP server settings, skills, and workflow conventions — that users do not want to rebuild every time they switch agents. Once an agent remembers your repo habits, migration becomes a product surface. OpenAI just made that surface clickable.

The timing is not accidental. The coding-agent market has been quietly reorganizing around switching costs rather than benchmark scores. Users are not asking "which agent is smartest on a clean repo?" anymore. They are asking "which agent am I already invested in, and what would it take to move?" That is a fundamentally different competitive dynamic, and 0.140.0 is OpenAI's opening bid in that fight.

The /import implementation is worth reading the PRs for, not just the release summary. PR #27071 makes import deliberate rather than automatic: external-agent setup is detected only when the user invokes /import, runs through the embedded local app-server, blocks duplicate imports while one is pending, and rejects unsupported remote or local-daemon sessions. PR #27070 adds a two-step picker with explicit item focus, selection state, counts, and a review action. PR #27703 restores source-specific wording because the supported source is currently Claude Code.

That last detail is the interesting one. OpenAI is not building a generic "import from any agent" pipeline. It is building a pointed on-ramp from Claude Code specifically. That makes sense commercially and technically — Claude Code is the incumbent with the most users who have accumulated real workspace state — but it also means the migration path is as narrow as the PR suggests. If you are coming from OpenCode, Qwen, Gemini CLI, or a custom harness, you are still writing your own import logic.

The deliberate design matters more than it looks. Early implementations of agent migration often defaulted to importing everything silently at startup. That feels smooth until you realize you have just handed a new runtime your old tool permissions, your MCP server configs, your conversation history full of repo-specific context, and potentially your credentials for internal services. Stale instructions, unsafe tool permissions, and local MCP configs should not migrate without review. The PRs removed startup migration behavior entirely and put the flow behind an explicit command with a picker. That is the right shape for a trust boundary that most users have not thought about yet.

The /usage command is the other half of the same story, and it may matter more to more users. Coding-agent token cost has been a billing-page footnote for most of the category's life. You got a invoice at the end of the month showing you burned through $340 in API calls, and by then the damage was done. /usage daily, /usage weekly, and /usage cumulative put that feedback inside the CLI where the work happens.

The implementation detail that should get more attention: PR #27925 adds these views through the existing account/usage/read app-server RPC, with bounded transient cards, theme-aware terminal charts, rollback handling, hook-ordering handling, and regression and snapshot coverage. The validation notes mention 37 focused tests and a broader TUI run with 2,870 passing tests. This is not a hack that reads a raw API response. It is a first-class CLI feature with proper error handling, theming, and test coverage. Someone at OpenAI thinks token visibility is part of the core product experience, not a post-hoc addition.

That matters because agent cost is not linear. A simple request can trigger tool retries, subagent spawns, long-context summarization passes, MCP calls, and repeated review loops. Any one of those can turn a "small" prompt into a long-running spend event. Without runtime visibility, developers have no way to know whether their agent workflow is 10x more expensive than a direct API call or within acceptable bounds for the task. /usage inside the CLI is the feedback loop that makes cost optimization possible.

The release also ships managed Bedrock authentication as a first-class Codex auth mode, with separate credential storage and request-time provider routing that isolates OpenAI/ChatGPT credentials from Bedrock. MCP reliability fixes retry transient startup failures, report unusable OAuth credentials as logged out, and preserve explicitly disabled servers. Permanent session deletion via codex delete and /delete now includes subagent cleanup with confirmation safeguards.

The Bedrock move is enterprise infrastructure, not a consumer feature. Teams running Codex through AWS — whether for compliance, cost management, or model routing — can now store Bedrock credentials through the shared auth lifecycle instead of stitching together environment variables and ad-hoc config. Isolating Bedrock credentials from OpenAI credentials in request routing is the right separation: mixing auth contexts creates subtle bugs where one provider's token gets sent to another.

For teams evaluating whether to migrate from Claude Code to Codex — or to run both in parallel — the 0.140.0 release changes the checklist. Before, the question was "does Codex do what I need?" Now it is "what would I lose by moving, and what would I gain?" The /import flow answers the first part by making migration reviewable. The /usage views answer the second by making cost visible. The MCP and auth hardening makes the operational surface less likely to surprise you in production.

The honest version of the migration question is not "can I move my prompts?" It is "can I move my setup safely, and can I see what I am spending?" OpenAI just made both easier to answer. Whether that is enough to pull users out of an incumbent they have already customized is still the harder bet. But 0.140.0 is the most serious attempt yet to make switching feel like importing a browser profile — useful, reversible, and worth trying.

Sources: OpenAI Codex GitHub Release, OpenAI Codex Changelog, PRs #27925, #27070, #27071, #27703, #27443, #27689