
TL;DR
A Codex CLI SQLite logging bug showed how global TRACE logs can burn SSD write endurance. OpenAI has now merged fixes, but the incident is a useful local-agent operations lesson.
Last updated: June 24, 2026
OpenAI's Codex CLI hit a useful local-agent operations lesson: a persistent SQLite feedback log was writing excessive diagnostic data, with one public report extrapolating the churn to hundreds of terabytes of SSD writes per year. The original GitHub issue is still reported as open by GitHub's API at verification time, but OpenAI has merged three related fixes and shipped the first two in Codex 0.142.0.
That changes the framing. This is no longer just "check your SSD right now." It is a case study in what happens when a global TRACE default meets a local database, and why coding agents need explicit resource budgets. If you run Codex heavily, update first, then check whether old log files still need cleanup.
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 issue now has a better ending than the first version of this post suggested. OpenAI engineer jif-oai merged three PRs:
The Codex 0.142.0 release notes explicitly mention reduced persistent-log churn from the first two fixes. The third fix merged into main and is marked by the issue reporter as targeting 0.143.0; an alpha tag for 0.143.0 was already published on June 24, 2026.
The reporter updated the issue body saying those three PRs avoided about 85% of logs in their own Codex measurement. That is still a user-side measurement, not a formal benchmark, but it is enough to change the recommendation: upgrade before applying heavier workarounds.
The SQLite feedback log sink used a broad TRACE-level persistence path. This meant high-volume log targets could write to disk even when their diagnostic value was low. The merged fixes did not remove logging entirely. They narrowed what gets persisted: raw WebSocket payload events, mirrored telemetry records, and bridged dependency TRACE events no longer belong in the durable SQLite sink.
That is the important design lesson for local agent tools. Telemetry is useful, but persistence needs a budget. Local logs should have level filters, target filters, retention limits, and a clear difference between interactive debugging and always-on background storage.
Newsletter
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools, delivered free every week.
From the archive
Jun 22, 2026 • 8 min read
Jun 22, 2026 • 9 min read
Jun 22, 2026 • 8 min read
Jun 22, 2026 • 7 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.
If you use Codex regularly, start with the boring path:
codex --version
If you are below 0.142.0, update before assuming the workaround is still necessary. Then inspect the current log footprint:
du -sh ~/.codex
ls -lh ~/.codex/logs_2.sqlite*
If old log files are still large after upgrading, 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. Use it as a temporary local workaround, not as the default team recommendation, because it removes useful diagnostics too.
Option 2: Reclaim space with VACUUM
sqlite3 ~/.codex/logs_2.sqlite "VACUUM;"
SQLite uses VACUUM, not PostgreSQL-style VACUUM FULL. Run it after quitting Codex so the database is not being actively written.
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 can ship mundane systems bugs. Excessive logging is not new. What is new is the shape of the runtime: agent CLIs stay open for hours, stream events constantly, and often sit in the background while developers work elsewhere.
For teams evaluating AI coding assistants, bugs happen. What matters is whether the tool exposes enough local state to diagnose the problem, whether the vendor responds with targeted fixes, and whether your own workflow has resource guardrails. This is the same reason I keep coming back to Codex CLI resource budgets, Claude Code token burn observability, permissions and rollback for AI coding agents, long-running agent harnesses, and terminal agents as portable runtime surfaces.
The better takeaway is not "never trust Codex." It is that local agents need the same operational controls as any other long-running developer service: bounded logs, visible storage use, process lifetime controls, and upgrade discipline.
Partially, based on public evidence. OpenAI merged three PRs tied to the issue. The first two shipped in Codex 0.142.0; the third is marked by the reporter as targeting 0.143.0. At verification time, GitHub's API still reported issue 28224 as open, even though the issue body says the reporter intended to close it after the fixes.
~/.codex/logs_2.sqlite?If the file is huge, quit Codex first, upgrade, and then either delete the old SQLite/WAL files or run sqlite3 ~/.codex/logs_2.sqlite "VACUUM;". Deleting old logs may remove diagnostic history, but it is reasonable if the files are consuming disk space.
Not categorically. It means Codex, like any long-running local agent, should be monitored. Check version, disk footprint, log churn, and release notes. Teams should treat local agent CLIs as runtime software, not just one-off commands.
No. The pattern is broader: local AI tools can write logs, caches, transcripts, embeddings, and checkpoints while staying open for long sessions. Codex issue 28224 is useful because the public report included concrete measurements and the fixes are visible.
Read next
A developer used OpenAI Codex to build a fully open-source WYSIWYG editor for TikZ figures. The technical approach and reception on Hacker News offer a useful case study in what agent-built software looks like when shipped.
7 min readOpenAI teases its most capable coding model yet - Sol Ultra uses trained subagents that communicate during tasks, reportedly hitting 91.9% on Terminal-Bench 2.1.
5 min readCodex 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 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 ToolA hosted infinite canvas your headless AI agents drive over MCP. Any MCP-speaking agent - Claude Code, Codex, Cursor, or...
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

In this video, we delve into OpenAI's latest release, Codex, a cloud-based software engineering agent designed for various coding tasks. Unlike tools like Cursor or Windsurf, Codex integrates...

Exploring Codex: AI Coding in Terminal In this video, I explore Codex, a new lightweight CLI tool for AI coding that runs in the terminal. This tool, possibly a response to Anthropic's CLI,...

OpenAI teases its most capable coding model yet - Sol Ultra uses trained subagents that communicate during tasks, report...

A developer used OpenAI Codex to build a fully open-source WYSIWYG editor for TikZ figures. The technical approach and r...

Mistral releases Leanstral 1.5, an Apache-2.0 licensed 119B parameter model (6B active) for Lean 4 theorem proving that...

The Godot Foundation has established a policy banning autonomous AI agent code and substantial AI-generated contribution...

Ngrok engineer Sam Rose ported 100,000 lines of Kubernetes to TypeScript, creating a browser-based cluster for education...

A new project proposes a graphical shell layer for SSH that turns remote servers into browsable desktops. The HN discuss...

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