
TL;DR
A trending Codex SQLite WAL bug is a useful warning for every local coding agent: logs, disks, background processes, and telemetry paths need budgets too.
| Resource | Link |
|---|---|
| Codex SQLite WAL issue | openai/codex#28224 |
| Earlier Codex WAL write issue | openai/codex#17320 |
| Codex goals write amplification issue | openai/codex#27911 |
| Unbounded logs_2 WAL issue | openai/codex#28997 |
| Codex troubleshooting docs | developers.openai.com/codex/app/troubleshooting |
| Codex changelog | developers.openai.com/codex/changelog |
| Hacker News discussion | news.ycombinator.com/item?id=48626930 |
A Codex bug report hit Hacker News this week because it had the kind of number that makes developers stop scrolling: a local SQLite feedback log path that could, by the reporter's estimate, write hundreds of terabytes per year under sustained use.
The issue is openai/codex#28224. The exact number is a community measurement, not an OpenAI postmortem. That distinction matters. But the broader pattern is harder to dismiss because related Codex issues describe excessive logs_2.sqlite-wal growth, heavy local I/O, idle process churn, and desktop startup failures when local log databases grow too large.
This is not really a SQLite story. It is a local-agent operations story.
We already talk about token budgets. We write about Claude Code token burn, agent FinOps, and AI coding review queues because model calls are visible enough to become product complaints. But agent CLIs also spend disk, CPU, file descriptors, terminal sessions, background processes, log volume, and human trust.
Last updated: June 22, 2026
Agent CLIs need resource budgets as first-class product features.
Not only:
Also:
The local runtime is part of the product. If the local runtime can fill a disk, stall a workstation, or quietly chew through SSD endurance, that needs the same engineering attention as a flaky model response.
The public reports point at Codex's local SQLite-backed state and diagnostic logging.
In issue #28224, the reporter describes high write amplification from Codex feedback logs. In issue #17320, another report says streaming responses caused sustained writes to ~/.codex/logs_2.sqlite-wal, with observed rates in the MiB-per-second range. In issue #28997, the report narrows the symptom to unbounded logs_2.sqlite-wal growth under default-style state behavior.
There are adjacent reports too: #27911 describes write amplification around goals_1.sqlite, #22444 says deleting a WAL file did not immediately free disk because older suspended Codex processes still held deleted file descriptors open, and #20563 frames idle I/O as SQLite WAL churn rather than plain log appending.
That does not prove one root cause. It does prove a shape:
local agent process
-> high-frequency state or trace writes
-> SQLite database
-> WAL growth or checkpoint pressure
-> disk usage, I/O stalls, startup failures, or manual cleanup
The bug might be a logging-level problem. It might be checkpoint behavior. It might be multiple processes holding files open. It might be trace volume that made sense during early debugging and stopped making sense once Codex became a daily driver. The public thread does not need to settle that for the lesson to be useful.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
From the archive
Jun 22, 2026 • 5 min read
Jun 22, 2026 • 6 min read
Jun 22, 2026 • 11 min read
Jun 22, 2026 • 9 min read
The obvious pushback is: this is a bug, not a category lesson.
That is partly true. OpenAI can fix the specific Codex behavior. SQLite WAL is not inherently bad. Write-ahead logging is a normal durability design. Local apps have used SQLite successfully for years. A scary write-rate estimate in a GitHub issue should not turn into "SQLite is broken" or "Codex will destroy your SSD."
The better critique is narrower: local agent products need bounded failure modes.
If a diagnostic sink goes noisy, it should rotate. If a WAL grows, it should checkpoint or alert. If deleted files are held open by suspended processes, the app should surface that. If background agents are still running, the user should be able to see and stop them. If telemetry is high volume by design, the product should explain the retention policy and disk budget.
That is why this belongs next to the permissions, logs, and rollback loop. Logs are only helpful when they are designed as operational receipts. When logs become unbounded side effects, they stop being observability and become another production incident.
Token spend is easy to talk about because it maps to money. Disk and I/O budgets are easier to ignore because they feel like local machine details.
That separation breaks once agents run for hours.
A serious local coding agent now has:
| Resource | Failure Mode | What The User Needs |
|---|---|---|
| Tokens | quota exhaustion, surprise bills | per-run spend, cached vs uncached input, stop caps |
| Disk | log growth, state bloat, failed startup | path, size, retention, cleanup command |
| I/O | laptop stalls, SSD wear, battery drain | write rate, idle writes, hot files |
| Processes | orphaned agents, stuck file descriptors | process list, run owner, stop button |
| Network | runaway browsing, repeated API calls | domain log, request budget, retry caps |
| CI | queue floods, flaky reruns | job budget, run ledger, merge gate |
| Human review | PR backlog, ambiguous diffs | receipts, scope summary, rollback path |
The Codex changelog shows how quickly the product surface has expanded: browser use, hooks, automations, mobile review, Computer Use, and Sites. That is useful product velocity. It also means Codex is no longer just a command that exits. It is a local runtime with state.
Local runtimes need runtime controls.
The minimum viable fix is not a beautiful dashboard. It is a boring doctor command that tells the truth.
agent doctor resources
It should report:
state directory: ~/.codex
database files: 842 MB
wal files: 1.7 GB
largest hot file: logs_2.sqlite-wal
current write rate: 0.0 MB/s idle, 3.2 MB/s active
active agent processes: 2
deleted files still held open: 0
log retention: 7 days or 2 GB
last checkpoint: 2026-06-22 14:12
safe cleanup: agent doctor resources --compact
Then add hard limits:
[resources]
max_log_bytes = "2gb"
max_wal_bytes = "512mb"
max_idle_write_rate = "1mb/min"
max_background_processes = 4
warn_at_disk_free = "10gb"
And wire those limits into the agent loop:
This is the same argument behind long-running agent harnesses. A harness is not just "keep trying until green." A harness owns the budget envelope around the work.
Until agent CLIs expose better resource controls, treat local agent state like build artifacts: useful, inspectable, and disposable only when you understand what you are deleting.
Practical steps:
~/.codex, but verify on your machine and platform.lsof, or platform equivalents when disk appears full after deleting logs.The goal is not to babysit every CLI. The goal is to make abnormal resource use visible enough that you can stop it before it becomes a machine problem.
The agent tools that win will not only generate better code. They will make their side effects legible.
That includes:
This is why terminal agents need a portable runtime surface. Once a terminal agent becomes a persistent work environment, it needs the boring controls that mature runtimes have: health checks, limits, rotation, compaction, and receipts.
Codex is moving fast. That is good. The point of writing about this bug is not to dunk on the product. It is to name the next layer of maturity for every coding agent, Codex included.
Token budgets were the first obvious meter. Resource budgets are next.
The public GitHub issues are open user reports, not an OpenAI postmortem. The reports are still useful because several independent issues describe related local SQLite, WAL, disk-growth, and I/O symptoms.
No. SQLite is a reasonable local-state store. The issue is not SQLite itself; it is unbounded write volume, WAL growth, checkpoint behavior, process lifecycle, and missing user-facing resource controls.
~/.codex/logs_2.sqlite-wal?Do not blindly delete live SQLite or WAL files while Codex processes are running. Fully quit Codex first, verify no related processes are holding file descriptors, and prefer an official cleanup or compaction command when available.
At minimum: state directory, database size, WAL size, current write rate, active process count, log retention policy, last checkpoint time, and a safe cleanup command.
Token cost is only one budget. Long-running local agents also consume disk, CPU, I/O, battery, network calls, CI capacity, and human review time. Serious agent workflows need visibility across all of them.
goals_1.sqlite write amplification on long-running sessionslogs_2.sqlite-wal grows without bound into tens of GBlogs_2.sqlite-wal grows indefinitely and remains allocated after deletionRead next
The Codex changelog from April through June 2026 covers GPT-5.5, Goal mode going stable, Sites, a Chrome extension, Amazon Bedrock support, and mobile access from iOS. Here is what actually shipped and what it means in practice.
9 min readThe latest Claude Code cache-burn debate is not just a quota complaint. It is a reminder that coding agents need cache-hit telemetry, spend ceilings, and repro-grade usage logs.
8 min readAI coding agents become safer when permissions, logs, and rollback are designed as one system. Here is the operating loop I would put around any agent that can edit code, run tools, or open pull requests.
9 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 coding agent for terminal, cloud, IDE, GitHub, Slack, and Linear workflows. Reads repos, edits files, runs comm...
View ToolOpenAI's open-source terminal coding agent built in Rust. Runs locally, reads your repo, edits files, and executes comma...
View ToolMac app for running parallel Claude Code, Codex, and Cursor agents in isolated workspaces. Watch every agent work at onc...
View ToolGoogle's open-source coding CLI. Free tier with Gemini 2.5 Pro. Supports tool use, file editing, shell commands. 1M toke...
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 StartedStep-by-step guide to building an MCP server in TypeScript - from project setup to tool definitions, resource handling, testing, and deployment.
AI AgentsExtended context window for Opus and Sonnet on supported plans.
Claude Code
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...

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...

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 Codex changelog from April through June 2026 covers GPT-5.5, Goal mode going stable, Sites, a Chrome extension, Amaz...

The latest Claude Code cache-burn debate is not just a quota complaint. It is a reminder that coding agents need cache-h...

AI coding agents become safer when permissions, logs, and rollback are designed as one system. Here is the operating loo...

As coding agents get easier to delegate to, the scarce resource shifts from code generation to review capacity, CI minut...

A long-running coding agent is only useful if the environment around it can queue tasks, capture logs, checkpoint state,...

DeepSeek-TUI is trending because developers want Claude Code-shaped workflows with different models. The real story is p...

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