Repository navigation
Windows Codex 26.623.5546.0 still persists high-frequency TRACE logs to logs_2.sqlite WAL #30405
Description
Summary
On Windows, Codex Desktop 26.623.5546.0 still persists high-frequency TRACE logs into the local SQLite feedback log database (logs_2.sqlite) and its WAL during normal active use.
This appears related to existing reports such as #17320, #28224, #29532, #29832, and #30236, but I am filing this with fresh Windows data from 26.623.5546.0.
Environment
- OS: Microsoft Windows NT 10.0.26200.0, x64
- Codex app package:
OpenAI.Codex_26.623.5546.0_x64__2p2nqsd0c76g0 - App-server command:
codex.exe app-server --analytics-default-enabled - Observed command runner:
codex-command-runner-0.142.3.exe - Files observed:
C:\Users\<user>\.codex\logs_2.sqliteC:\Users\<user>\.codex\logs_2.sqlite-walC:\Users\<user>\.codex\state_5.sqlite-wal
- Current shell environment had
RUST_LOG=warn; no user/machineRUST_LOGoverride was found.
Observed behavior
A 30-second local sample during normal Codex use showed continuous insert/prune churn in logs_2.sqlite:
logs.max(id): 21,156,392 -> 21,181,109
Delta ids: +24,717 in 30 seconds
Approx rate: ~824 inserted log ids/sec
Retained rows: 44,757 -> 44,852
Delta rows: +95
Recent persisted rows after the sample were entirely TRACE-level:
Recent 1000 rows by level:
TRACE 1000
Recent 1000 rows by target:
TRACE log 949
TRACE codex_app_server::outgoing_message 51
File sizes and mtimes at the same point:
logs_2.sqlite 147,492,864 bytes
logs_2.sqlite-wal 25,206,192 bytes
state_5.sqlite-wal 4,243,632 bytes
A separate 30-second mtime sample showed logs_2.sqlite-wal, logs_2.sqlite, and state_5.sqlite-wal modification times advancing repeatedly while the .sandbox text log did not continue growing. This suggests the ongoing write pressure is mostly SQLite/WAL churn rather than simple text-log append growth.
Representative TRACE bodies were not included because they may contain private local/session data. Sanitized inspection showed low-level websocket/tokio/tungstenite style entries such as poll_read, poll_next, WouldBlock, frame metadata, and large frame payload logging.
Disk write / SSD endurance concern
A Windows Performance Counter sample over the same 30-second window reported the codex process at approximately:
Average process IO Write Bytes/sec: ~1,346,401 B/s (~1.35 MB/s)
Max process IO Write Bytes/sec: ~15,324,126 B/s (~15.3 MB/s)
I understand Windows process IO counters are not identical to physical NAND writes and may include non-disk IO. The physical disk counter is also system-wide, not Codex-only. Still, the SQLite evidence above confirms that a large part of the churn is local persistence.
If the measured ~1.35 MB/s write rate were sustained, it would be approximately:
~116 GB/day
~42.5 TB/year
That is a meaningful fraction of common consumer SSD endurance ratings:
150 TBW drive: ~28% of warranty TBW/year
300 TBW drive: ~14% of warranty TBW/year
600 TBW drive: ~7% of warranty TBW/year
1200 TBW drive: ~3.5% of warranty TBW/year
Short bursts at the observed peak are not equivalent to sustained writes, but the issue is concerning because the churn is mostly diagnostic TRACE data and can recur throughout long Codex sessions.
Expected behavior
Production Codex Desktop builds should not persist high-frequency frame-level / dependency-level TRACE logs into logs_2.sqlite by default, especially when RUST_LOG=warn is in effect.
Expected improvements:
- The SQLite log sink should honor the same effective log-level filter as the runtime logger, or have its own documented configuration.
- Low-value
TRACE target=logand websocket/tungstenite frame logs should be suppressed, sampled, summarized, or bounded. - Local diagnostic logs should have clear size/write caps, rotation, and WAL checkpoint/truncation behavior.
- Users should have a documented option to disable or reduce persistent local diagnostic logging without disabling durable thread/state data.
Privacy note
I am not attaching logs_2.sqlite or raw feedback_log_body values because they may contain private session text, local paths, tool output, or protocol payload fragments.
Activity
github-actions commentedon Jun 28, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Nicolas0315 commentedon Jun 28, 2026
Additional 2026-06-29 JST sample after reducing active session JSONL load with official
codex archive:26.623.5546.00.142.3~/.codex/config.tomlalready has:[analytics] enabled = false[feedback] enabled = false[otel] exporter = "none"[otel] metrics_exporter = "none"[otel] trace_exporter = "none"[otel] log_user_prompt = falsefeedback_log_body:logs.iddelta: 1,037 rowsTRACE log: 352 rows, estimated 352,063 bytesDEBUG log: 140 rows, estimated 65,131 bytesTRACE hyper_util::client::legacy::pool: 120 rowsTRACE hyper_util::client::legacy::client: 78 rowsTRACE codex_app_server::outgoing_message: 53 rowsSo session JSONL load can be mitigated separately, but high-frequency TRACE/DEBUG persistence remains observable even with analytics/feedback/otel disabled in config.
Nicolas0315 commentedon Jun 28, 2026
Follow-up from the same Windows Codex Desktop profile (Codex Desktop 26.623.5546.0, CLI 0.142.3; 2026-06-29 03:40 JST):
Config/docs check:
~/.codex/config.tomlhas[analytics] enabled=false,[feedback] enabled=false,[otel] exporter="none",metrics_exporter="none",trace_exporter="none",log_user_prompt=falseRUST_LOG=warn; HKCU persistent user env has noRUST_LOG[analytics],[feedback],[otel], andRUST_LOG, but I did not find a documented knob specifically disabling locallogs_2.sqliteTRACE persistence/retention beyond those settingsresources\codex.exe app-server --analytics-default-enabledRead-only
logs_2.sqliteaggregate, no log body/prompt fields read:TRACE log973;TRACE codex_mcp::connection_manager494;TRACE codex_api::sse::responses117;DEBUG codex_core::stream_events_utils89So TRACE persistence is still happening in normal Desktop usage even with analytics/feedback/OTel disabled in config. This continues to push the log DB past the local soft cap and adds SQLite/WAL pressure while the app is open.
Nicolas0315 commentedon Jun 28, 2026
Additional local mitigation to test on next Desktop restart (2026-06-29 04:19 JST):
Even after stopping idle MCP/plugin/node_repl helper processes, a 30s metadata-only sample still showed
logs_2.sqlitewrites at about 4.9 rows/s, led byTRACE logrows. The current shell hadRUST_LOG=warn, but Codex Desktop launches app-server viaCodex.exe, so the app-server likely did not inherit that transient shell env.I persisted user-scope
RUST_LOG=warnunderHKCU:\Environmentwith restore metadata. Previous user value was absent. This should only take effect for future Codex Desktop/app-server launches. I will treat this as unverified until after a Desktop restart and anotherlogs_2.sqlitewrite-rate sample.Rollback is removing user
RUST_LOG. If TRACE rows continue after restart, the local SQLite TRACE persistence is not controlled byRUST_LOGand needs product-side filtering/retention.martinrodriguezr93-cloud commentedon Jun 28, 2026
Additional affected Windows machine data point from Codex Desktop
26.623.5546.0.Environment:
OpenAI.Codex_26.623.5546.0_x64__2p2nqsd0c76g0resources\codex.exe app-server --analytics-default-enabledcodex-command-runner-0.142.3.exerust-v0.143.0-alpha.29separately:codex-cli 0.143.0-alpha.29codex.exe:EEA11264DFA89B7E6C4ECF45C0DC159D638929218DAF035D3EC31485CAC1555ASSD / SMART context:
Data Units Written:5,583,4452.859 TBdecimal /2.60 TiB225Percentage Used:00Before local mitigation, metadata-only SQLite samples against
C:\Users\<user>\.codex\logs_2.sqliteshowed continuing insert/prune churn:Recent retained rows were still dominated by
TRACE, with top pairs including:Windows process I/O counters during the affected run also showed large cumulative Codex writes since process start:
I understand process I/O counters are not the same as physical NAND writes, but the SQLite metadata confirms real local persistence churn.
Local workaround applied:
logs_2.sqlite,logs_2.sqlite-wal, andlogs_2.sqlite-shmPRAGMA wal_checkpoint(TRUNCATE)After workaround:
Conclusion:
Codex Desktop
26.623.5546.0on Windows still appears to persist or attempt high-frequency diagnosticTRACErows intologs_2.sqliteduring ordinary Desktop use. The local trigger stops SQLite inserts, but this is only a defensive workaround. The product still needs an upstream fix: production Desktop should not persist high-frequency TRACE/DEBUG transport/dependency logs by default, and there should be a documented user-facing kill switch or bounded persistent-log policy for local diagnostic SQLite logs.Privacy note: I did not attach
logs_2.sqliteor rawfeedback_log_bodyvalues because they may contain private prompts, local paths, tool output, or protocol payload fragments.martinrodriguezr93-cloud commentedon Jun 28, 2026
Follow-up from the same Windows machine after testing the official alpha binary:
lvchongjun123-bot commentedon Sep 6, 2026
Follow-up:
codex_app_server::outgoing_messagestill floods SQLite logsWindows desktop
0.150.0-alpha.12.2still persists high-frequency TRACE fromcodex_app_server::outgoing_messageintologs_2.sqlite.Measured on 2026-09-06:
codex_app_server::outgoing_messagein a 21-second sampleMAX(id): 1,758,524logs_2.sqlite: about 101 MB, WAL about 4 KBRUST_LOG=warndoes not affect itwork still occur, so typing/UI latency persists during streaming deltas
The missing change is in
codex-rs/state/src/log_db.rsdefault_filter():Prepared patch:
https://gist.github.com/lvchongjun123-bot/66602393eda44001a6e426ff9132b246
Related Windows directory-scan symptom:
#33737
terryclarkeperth1 commentedon Sep 22, 2026
I reproduced persistent SQLite TRACE churn on Windows Desktop and prepared a focused source patch: commit 113250b.
In a one-hour live sample,
logs_2.sqliterecorded 1,743codex_app_server::outgoing_message, 273codex_core::session::world_state, and 247codex_core::session::turnTRACE messages. The currentcodex-rs/state/src/log_db.rsfilters other noisy targets, but not these three. The patch adds DEBUG sink thresholds for them, keeping DEBUG and higher messages. The added regression test checks both sides of that threshold.Verification:
cargo +stable test -p codex-statepassed (199 unit tests and 1 doc test),cargo +stable fmt --all -- --checkpassed, andgit diff --checkpassed. I attempted an upstream PR, but GitHub rejected it; the current contribution guide says external PRs are not accepted. The linked commit is ready for the Codex maintainers to apply or adapt.