Codex CLI 0.140.0: Token Usage Dashboard, Import from Claude Code, and Session Deletion
Codex CLI 0.140.0 introduces a built-in /usage dashboard that displays daily, weekly, and cumulative token consumption, giving developers direct visibility into how tokens are being spent across sessions. The release also adds /import, a migration command that pulls setup configuration, project settings, and up to 30 days of chat history from Claude Code, enabling teams to switch workflows without losing context. Additionally, permanent session deletion is now available via codex delete, the /delete slash command, and an app-server thread/delete API endpoint.
Sources & Mentions
3 external resources covering this update
Token Usage Dashboard
Codex CLI 0.140.0 ships a long-requested visibility feature: the /usage command. Invoking it opens an in-terminal dashboard that breaks down token activity across three time horizons, showing daily, weekly, and cumulative consumption. For developers running long-lived agent sessions or heavy multi-file editing workflows, this dashboard provides the first native way to understand token spend without leaving the terminal or consulting an external billing page.
On Pro and higher plans, the dashboard also surfaces per-skill attribution, letting teams see exactly which plugins or capabilities are consuming the most tokens. This level of granularity helps identify unexpectedly expensive workflows and make informed decisions about session management.
Migration from Claude Code
The new /import command addresses one of the most common friction points for developers evaluating Codex as an alternative to Claude Code. Running /import launches an interactive migration flow that selectively pulls three categories of data:
- Setup configuration: shell preferences, editor integrations, and environment variables
- Project settings: workspace-specific memories, skill configurations, and permission profiles
- Recent chat history: up to 30 days of conversation threads, imported asynchronously with automatic compaction
The import runs in the background, so the terminal remains usable throughout the process. The async design also means large history sets do not block the session, and the compaction step ensures imported threads integrate cleanly into Codex's storage format.
Permanent Session Deletion
Codex now offers three paths to permanently delete a session: the codex delete CLI subcommand (for scripting and CI pipelines), the /delete slash command (for interactive terminal use), and the app-server thread/delete REST endpoint (for programmatic integrations). All three paths include confirmation safeguards to prevent accidental deletion.
When a session is deleted, the operation is recursive: associated subagents and their threads are cleaned up alongside the parent session. This prevents orphaned subagent state from accumulating over time.
Unified Mentions Menu
Typing @ now opens a unified mentions interface that combines files, plugins, and skills into a single scrollable menu by default. Previously the mention picker was contextual and required knowing which type of resource to reference. The unified default removes that friction, making it easier to attach the right resource in a single gesture.
Additional Changes
The release also includes several stability and reliability improvements:
- SQLite self-healing: corrupted state databases now automatically back up and rebuild from rollout data, preventing sessions from becoming permanently unrecoverable
- /goal improvements: goals now preserve oversized text blocks, large pasted content, and image attachments in both local and remote sessions
- Git filesystem monitor preservation: enhanced responsiveness for large repositories and extended sessions
- Performance: eliminated duplicate history reads, accelerated archive lookups, and added turn-diff rendering caching
- Removal: the experimental
/realtimevoice controls and associated audio dependencies have been removed from the TUI