Summary
On Windows, Codex Desktop continuously writes high-frequency TRACE logs into ~/.codex/logs_2.sqlite, mainly from websocket/tungstenite internals, even though RUST_LOG=warn and analytics/OTel export are disabled in ~/.codex/config.toml.
This causes persistent SQLite/WAL writes and database growth.
Environment
- OS: Windows
- Codex app package:
OpenAI.Codex_26.616.6631.0_x64__2p2nqsd0c76g0
- Codex app-server process:
codex.exe app-server --analytics-default-enabled
- Database:
C:\Users\<user>\.codex\logs_2.sqlite
- WAL mode with
logs_2.sqlite-wal
Relevant config
~/.codex/config.toml includes:
[analytics]
enabled = false
[otel]
exporter = "none"
Environment variable checks:
RUST_LOG Process = warn
RUST_LOG User = unset
RUST_LOG Machine = unset
Observed behavior
After fully restarting Codex Desktop, logs_2.sqlite continues to receive high-frequency writes.
A 28-second sample after restart showed:
max(id) increased by 573
logs_2.sqlite-wal continued updating
row count stayed constant, indicating new rows are inserted while older rows are deleted
Recent 1000 inserted ids were dominated by:
TRACE log 839 rows
INFO codex_otel.log_only 41 rows
INFO codex_otel.trace_safe 40 rows
TRACE codex_api::endpoint::responses_websocket 40 rows
TRACE codex_api::sse::responses 40 rows
Latest TRACE log bodies include low-level websocket/tungstenite messages such as:
tokio-tungstenite ... compat.rs ... Read.with_context read -> poll_read
tokio-tungstenite ... lib.rs ... WebSocketStream.with_context
Parsed headers [...]
WouldBlock
Impact
- Continuous disk writes to SQLite/WAL
logs_2.sqlite growth and churn
- Extra local storage usage
- Potential performance and SSD wear concern
- TRACE-level logs may capture more detailed internal request/response metadata than expected
Before manual maintenance, the database was approximately:
logs_2.sqlite before VACUUM: 199,499,776 bytes
logs_2.sqlite after VACUUM: 75,206,656 bytes
After reopening Codex, WAL growth resumed:
logs_2.sqlite-wal around 5 MB and still updating
Expected behavior
With RUST_LOG=warn, [analytics].enabled = false, and [otel].exporter = "none", Codex should not continuously persist high-volume TRACE websocket/tungstenite logs to the local SQLite log store during normal use.
If local SQLite diagnostics intentionally retain TRACE records, there should be a documented configuration option to disable or reduce this verbosity.
Reproduction steps
- Start Codex Desktop on Windows.
- Ensure:
RUST_LOG=warn
[analytics].enabled = false
[otel].exporter = "none"
- Open or continue a Codex thread.
- Inspect
~/.codex/logs_2.sqlite and ~/.codex/logs_2.sqlite-wal.
- Sample
max(id), level, target, and WAL modification time over 20-30 seconds.
- Observe continuous inserts of
TRACE log, codex_api::endpoint::responses_websocket, and codex_api::sse::responses.
Notes
I avoided attaching the SQLite database directly because it may contain sensitive local diagnostic/session details.
Summary
On Windows, Codex Desktop continuously writes high-frequency
TRACElogs into~/.codex/logs_2.sqlite, mainly from websocket/tungstenite internals, even thoughRUST_LOG=warnand analytics/OTel export are disabled in~/.codex/config.toml.This causes persistent SQLite/WAL writes and database growth.
Environment
OpenAI.Codex_26.616.6631.0_x64__2p2nqsd0c76g0codex.exe app-server --analytics-default-enabledC:\Users\<user>\.codex\logs_2.sqlitelogs_2.sqlite-walRelevant config
~/.codex/config.tomlincludes:Environment variable checks:
Observed behavior
After fully restarting Codex Desktop,
logs_2.sqlitecontinues to receive high-frequency writes.A 28-second sample after restart showed:
Recent 1000 inserted ids were dominated by:
Latest
TRACE logbodies include low-level websocket/tungstenite messages such as:Impact
logs_2.sqlitegrowth and churnBefore manual maintenance, the database was approximately:
After reopening Codex, WAL growth resumed:
Expected behavior
With
RUST_LOG=warn,[analytics].enabled = false, and[otel].exporter = "none", Codex should not continuously persist high-volumeTRACEwebsocket/tungstenite logs to the local SQLite log store during normal use.If local SQLite diagnostics intentionally retain TRACE records, there should be a documented configuration option to disable or reduce this verbosity.
Reproduction steps
RUST_LOG=warn[analytics].enabled = false[otel].exporter = "none"~/.codex/logs_2.sqliteand~/.codex/logs_2.sqlite-wal.max(id),level,target, and WAL modification time over 20-30 seconds.TRACE log,codex_api::endpoint::responses_websocket, andcodex_api::sse::responses.Notes
I avoided attaching the SQLite database directly because it may contain sensitive local diagnostic/session details.