
TL;DR
A bug in OpenAI's Codex CLI writes excessive trace logs to SQLite, potentially consuming 640TB/year of SSD writes. The issue has been open for a week with no official response.
OpenAI's Codex CLI has a bug that writes excessive diagnostic logs to a local SQLite database, potentially consuming terabytes of SSD write endurance. The GitHub issue has been open for over a week with no official response from OpenAI.
The bug hit Hacker News this morning and the community reaction has been pointed.
Codex continuously writes trace-level logs to ~/.codex/logs_2.sqlite and its associated WAL/SHM files. The logging is indiscriminate - it captures everything from low-value dependency logs (inotify events, locale lookups) to raw websocket payloads and OpenTelemetry diagnostic events.
By the numbers:
The problem is compounded by write amplification in the SQLite database. Users report approximately 36,211 rows inserted per 15 seconds while the retained row count remains static - a continuous insert-and-prune cycle that multiplies actual disk writes.
A 1 TB SSD with 600 TBW (terabytes written) endurance rating could theoretically be worn out in less than a year of continuous Codex usage.
The SQLite feedback log sink uses a "global TRACE default" configuration. This means every log target writes at maximum verbosity regardless of importance. The fix is straightforward - switch from global TRACE to targeted INFO-level logging for core Codex modules. Community members estimate this would reduce logged bytes by approximately 96% without disabling diagnostics entirely.
Multiple developers have prepared pull request branches with proposed filters, but upstream PR creation permissions issues have prevented formal submission.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
From the archive
Jun 22, 2026 • 6 min read
Jun 22, 2026 • 11 min read
Jun 22, 2026 • 9 min read
Jun 22, 2026 • 10 min read
The Hacker News thread is running hot. A few representative comments:
On quality:
"Codex is one of the most infamous examples of slopware. Just having the window unhidden on my mac will cause it to use 100% of the GPU displaying the spinner message."
"I don't understand how Codex can blunder so badly. I imagine that even if they would be using vibe-coding, surely they must have some good engineers."
On OpenAI's response:
"Shocking. Been open a week and AFAICT just silence from OpenAI. I just find it baffling. You'd think that these vendors would be very sensitive to this sort of issue."
"SQLite + unbounded TRACE logs = firehose in a bathtub. No rotation, no cap, no surprise. The RAISE(IGNORE) fix patches a design flaw. OpenAI's silence is worse than the bug."
Defending the nuance:
"This thread will become a typical 'haha slop company made slop' but I've been bitten by a bug exactly like this before in a (pre-AI, artisan) OSS project."
Fair point. Shipping trace logging to production is a classic blunder that predates AI coding tools by decades. The difference is the volume - modern SSDs are fast enough that the app remains usable while silently burning through drive endurance.
On AI tool quality generally:
"I want to like codex, but the quality is just not very good, especially when compared to Claude."
"OpenAI really snatched defeat from the jaws of victory late last year when Claude Code was a laggy mess. Nowadays Codex has typing latency out of the gate, whereas Claude Code has the odd pause but generally displays my key presses as... you know... I press them."
One commenter noted that Claude Code has similar logging behavior - "writes massive debug logs to ~/.claude/logs" - suggesting the problem may be broader than just Codex.
Until OpenAI ships a fix, you have options:
Option 1: Disable logging via SQLite trigger
sqlite3 ~/.codex/logs_2.sqlite "CREATE TRIGGER IF NOT EXISTS block_log_inserts BEFORE INSERT ON logs BEGIN SELECT RAISE(IGNORE); END;"
This blocks new log inserts at the database level.
Option 2: Reclaim space with VACUUM
sqlite3 ~/.codex/logs_2.sqlite "VACUUM FULL;"
One user reported shrinking their log file from 27GB to 73MB with this command.
Option 3: Delete the log files
rm ~/.codex/logs_2.sqlite*
The files will be recreated, but you will have bought yourself time.
Option 4: Symlink to tmpfs
For users concerned about SSD wear, symlinking the logs directory to a RAM-backed tmpfs prevents disk writes entirely (at the cost of losing logs on reboot).
This bug is a reminder that even flagship developer tools from major AI labs ship with basic quality issues. The actual bug - excessive logging - is mundane. The response - silence for over a week on a high-visibility issue - is more concerning.
For teams evaluating AI coding assistants, bugs happen. What matters is how vendors respond. A quick acknowledgment and ETA would have defused most of the frustration in the HN thread.
If you are using Codex in production, check your ~/.codex/ directory size and apply one of the workarounds above. Monitor your SSD health metrics if you have been running Codex for extended periods.
Read next
Codex CLI 0.129.0 added modal Vim editing in the composer. The feature is small, but it points at a bigger shift: terminal agents are becoming native engineering workbenches.
6 min readCodex automations are useful when recurring engineering work has clear inputs, reviewable outputs, and safe boundaries. Here is the practical playbook.
9 min readOpenAI is turning Codex from a coding assistant into a broader agent workspace for files, apps, browser QA, images, automations, and repeatable knowledge work.
8 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
OpenAI's open-source terminal coding agent built in Rust. Runs locally, reads your repo, edits files, and executes comma...
View ToolOpenAI's coding agent for terminal, cloud, IDE, GitHub, Slack, and Linear workflows. Reads repos, edits files, runs comm...
View ToolOpenAI's flagship. GPT-4o for general use, o3 for reasoning, Codex for coding. 300M+ weekly users. Tasks, agents, web br...
View ToolAI-native code editor forked from VS Code. Composer mode rewrites multiple files at once. Tab autocomplete predicts your...
View ToolEvery coding agent in one window. Stop alt-tabbing between Claude, Codex, and Cursor.
View AppSee exactly what your agent did, locally. No cloud, no signup.
View AppChange your lights without leaving the terminal. `hue dim` just works.
View AppSet up Codex Chronicle on macOS, manage permissions, and understand privacy, security, and troubleshooting.
Getting StartedA practical walk-through of how to design, write, and ship a Claude Code skill - from choosing when to trigger, through allowed-tools, to the steps the agent will actually follow.
Getting StartedInstall the dd CLI and scaffold your first AI-powered app in under a minute.
Getting Started
OpenAI Codex Desktop App: Plan/Goal Modes, Plugins, Multi-Agent Workflows & UI Annotation Demo The video showcases OpenAI’s Codex desktop app, which the creator calls OpenAI’s best product and a prem...

OpenAI Codex ‘Record & Replay’: Turn Screen Recordings Into Reusable Automation Skills The script explains a new OpenAI Codex feature, Record and Replay, which lets you record a recurring computer or...

Nimbalyst Demo: A Visual Workspace for Codex + Claude Code with Kanban, Plans, and AI Commits Try it: https://nimbalyst.com/ Star Repo Here: https://github.com/Nimbalyst/nimbalyst This video demos N...

The new wrangler deploy --temporary flag creates ephemeral Cloudflare accounts for AI agents. 60-minute deployments, no...

Most developers only know .gitignore, but Git offers two other ignore mechanisms for local workflows and machine-wide pa...

Auto-installing tree-sitter grammars, built-in markdown mode, window layout commands, and more - the upcoming Emacs rele...

The Transformer co-creator leaves Google DeepMind for OpenAI just two years after Google paid $2.7 billion to bring him...

Epic Games open-sourced Lore, a centralized version control system designed for binary-heavy game projects. It uses Merk...

The IETF published RFC 10008 defining a new HTTP QUERY method - GET with a request body. It is safe, idempotent, cacheab...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.