You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
logs_2.sqlite: rmcp::service TRACE rows (~1.3 MB ListToolsResult dumps) bypass the noisy-target filter — 50-68 MB/day with a large MCP catalog #34291
CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversperformance
After the #28224 fixes landed (#29432, #29457, #29599 — big improvement, thank you), one high-volume emitter still reaches the persistent sqlite feedback log (logs_2.sqlite): target rmcp::service, level TRACE, whose bodies are full JSON-RPC PeerMessage dumps from app_server.request{...}:initialize:serve_inner — most notably complete ListToolsResult payloads. With a large MCP tool catalog (~180 tools/connectors in our deployment), each such row is ~1.28 MB.
Measurements (read-only queries against logs_2.sqlite)
codex-cli 0.144.3, linux x86_64, app-server mode over stdio (embedded in a gateway product)
290 rmcp::service rows >1 MB totaling 371 MB = 49% of a 751 MB file
Include rmcp::service (or rmcp*) in the persistent-log noisy-target filter introduced in #29457, and/or cap per-row payload size for the sqlite sink. A documented level/off knob for the sqlite sink would also serve (the sqlite_logs_enabled escape hatch discussed in #28224 was never merged).
Stable 0.166.0 source follow-up, separating the original filter issue from the remaining opt-out request.
I checked the strict stable tag rust-v0.166.0, peeled commit 6ff1e1ca3b30fc8b914720681fcf5fe62e95f856 (npm latest agrees). Its SQLite sink filter already limits rmcp to INFO and includes several other noisy-target filters. Therefore this comment does not claim that the original rmcp::service TRACE bypass remains reproducible on 0.166.0. I have not measured fresh stock-0.166 write amplification or hardware damage.
The separate user-control request remains relevant: I found no sqlite_logs_enabled configuration field in that fixed snapshot, and the app-server sink setup still attaches the diagnostic sink whenever its state runtime is available. This is distinct from disabling conversation/state persistence.
Our existing local 0.165 mitigation provides an explicit diagnostic-sink switch, defaults to enabled, and leaves thread/state databases, rollout history, feedback handling and ordinary file/stderr logging intact. A prior isolated A/B verification of that local patched build recorded 41 diagnostic rows when enabled and zero when disabled; both database quick_check results were ok. These are not results from stock 0.166.0, and disabling future sink writes does not reclaim existing database/WAL files.
Would a documented diagnostic-only opt-out be an acceptable upstream direction, alongside the existing default filters? Useful acceptance checks would cover the default-enabled behavior, disabled app-server and TUI sinks, and unchanged thread/state persistence. I am adding this to the existing issue rather than duplicating the original write-growth report. No raw logs, session contents, credentials or account identifiers are attached.
Additional stable-0.166 source checks (read-only, no stress test): the sink has a bounded 2,048-event queue, 512-event batches and a 10-second flush interval; full queues drop new events instead of blocking producers. Retained partition/age/occupied-page budgets are useful, but they are not a disk-write-rate cap: insertion precedes pruning, and oversized records are not rejected before insertion. See queue and filters and insert/prune.
There is also a distinct startup-availability concern, related to #27741: state-runtime initialization still propagates an unrecovered logs-DB open/migration failure after closing the state pool. A sink-write opt-out alone is not proof of nonfatal log-DB initialization. No physical SSD damage, current device endurance consumption, or fresh stock-0.166 failure rate was measured in this review.
Reference review packet (2026-10-31)
Existing patches, sanitized execution evidence and a concrete review checklist are now available. The patch exports are existing 0.165.0 reference diffs, not a completed 0.166.0 port or installer. Original and export hashes are recorded separately; all nine published files were read back and matched byte-for-byte. No private logs, sessions, databases or credentials are included.
A newer isolated A/B on the same repaired 0.165 CLI recorded 80 enabled diagnostic rows / 0 disabled, normal initialize/thread-list responses, clean exits and four quick_check=ok results. The earlier 41/0 result above remains a separate historical run. Please review whether the diagnostic-only opt-out contract and existing diff/test scope are appropriate, or identify an upstream-equivalent supported mechanism. The checklist requests source/version-specific technical feedback; no reviewer, newer build, or delivery commitment is claimed.
Source follow-up for Codex 0.169.0, at the peeled release commit d32063f96c2dff1dc96af839b3952abb6acfeda4.
One correction to the 0.166.0 note above: #60466 is in this stable release. For non-corruption errors opening or migrating the diagnostic database, state initialization now keeps the thread state available without a logs pool and retains the diagnostic error. Corruption still goes through the existing recovery path. The release's app-server regression also checks that thread deletion is rejected before losing saved conversation data in this condition.
This is separate from the remaining request for an explicit user setting to disable only the SQLite diagnostic sink while keeping thread state and history. The app-server attachment still has no such setting. The original rmcp::service TRACE filter issue was addressed separately; I am not reporting it as a new reproduction.
Evidence here is pinned source and the shipped regression definition, not a new local execution or a new write-volume measurement.
Same pattern, still present on newer builds: codex-cli 0.166.0 (interactive TUI connected to the shared app-server) and app-server daemon 0.169.0 (codex app-server --listen unix://), linux x86_64, 9 MCP servers configured (user plus project config).
Read-only measurements, 2026-11-14:
Write volume: one TUI process wrote 33 GB (/proc/<pid>/iowrite_bytes) in 2.8 h. The only regular files it held open were logs_2.sqlite, -wal and -shm. The daemon wrote 0.72 GB in one active minute, with idle minutes at about 0.
Retention is minutes, not days:logs_2.sqlite held only about 50 minutes of rows (13k rows, max(id) about 11.7 M), so nearly all of that volume is insert-and-prune churn, with the WAL at about 350 MB.
Top targets by body bytes over 10 min:rmcp::service (176 KB), feedback_tags (154 KB), codex_http_client::client (77 KB), codex_core::stream_events_utils (56 KB), codex_tui::chatwidget::protocol_requests (53 KB, DEBUG, about 70 KB per row).
Effect beyond SSD wear: on a VM whose disk sits on a shared HDD-backed pool, the disk ran about 1,000 small writes/s at about 15 MB/s, with the Codex app-server as the top writer by write_bytes. Earlier, a 32-minute window in which the daemon wrote about 12 GB, mostly to thread_history_1.sqlite and its WAL, ended in a 76 s filesystem commit stall that blocked unrelated SQLite users on the same disk. So the churn is not only in logs_2.sqlite.
A separate observation from the same session, in case it is related (no child processes involved): that TUI's RSS grew from about 4.8 GB to 11.7 GB, plus 2.7 GB swapped, over about 2 h, and stayed there until it was closed. I can open a separate issue if that is unrelated to the log sink.
The ask in #43378 (make the sqlite sink's level configurable, or honour RUST_LOG) would let installs like this one turn the sink down without symlinking the database to tmpfs.
Correction to my comment above, from a closer measurement.
The app-server daemon's heavy writes do not go to its SQLite databases. Over 23 active minutes, the daemon's /proc/<pid>/iowrite_bytes added up to about 7 GB, 7–12 MB/s in busy minutes. Over the same minutes, the WAL plus checkpoint traffic of logs_2, thread_history_1 and state_5 was close to zero. I measured it from each database's -shm WAL-index header (mxFrame and nBackfill per minute), and the method reads a known 10.9 MB WAL write back correctly.
So the line saying the daemon wrote "mostly to thread_history_1.sqlite and its WAL" is not supported: I had inferred it from open file handles. Where the daemon's writes actually go is still unidentified. The interactive TUI numbers above stand: its only open regular files were logs_2.sqlite and its WAL/SHM.
CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serversperformance
Activity
github-actions commentedon Jul 20, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Campione01 commentedon Oct 31, 2026
Stable 0.166.0 source follow-up, separating the original filter issue from the remaining opt-out request.
I checked the strict stable tag
rust-v0.166.0, peeled commit6ff1e1ca3b30fc8b914720681fcf5fe62e95f856(npmlatestagrees). Its SQLite sink filter already limitsrmcpto INFO and includes several other noisy-target filters. Therefore this comment does not claim that the originalrmcp::serviceTRACE bypass remains reproducible on 0.166.0. I have not measured fresh stock-0.166 write amplification or hardware damage.The separate user-control request remains relevant: I found no
sqlite_logs_enabledconfiguration field in that fixed snapshot, and the app-server sink setup still attaches the diagnostic sink whenever its state runtime is available. This is distinct from disabling conversation/state persistence.Our existing local 0.165 mitigation provides an explicit diagnostic-sink switch, defaults to enabled, and leaves thread/state databases, rollout history, feedback handling and ordinary file/stderr logging intact. A prior isolated A/B verification of that local patched build recorded 41 diagnostic rows when enabled and zero when disabled; both database
quick_checkresults wereok. These are not results from stock 0.166.0, and disabling future sink writes does not reclaim existing database/WAL files.Would a documented diagnostic-only opt-out be an acceptable upstream direction, alongside the existing default filters? Useful acceptance checks would cover the default-enabled behavior, disabled app-server and TUI sinks, and unchanged thread/state persistence. I am adding this to the existing issue rather than duplicating the original write-growth report. No raw logs, session contents, credentials or account identifiers are attached.
Additional stable-0.166 source checks (read-only, no stress test): the sink has a bounded 2,048-event queue, 512-event batches and a 10-second flush interval; full queues drop new events instead of blocking producers. Retained partition/age/occupied-page budgets are useful, but they are not a disk-write-rate cap: insertion precedes pruning, and oversized records are not rejected before insertion. See queue and filters and insert/prune.
There is also a distinct startup-availability concern, related to #27741: state-runtime initialization still propagates an unrecovered logs-DB open/migration failure after closing the state pool. A sink-write opt-out alone is not proof of nonfatal log-DB initialization. No physical SSD damage, current device endurance consumption, or fresh stock-0.166 failure rate was measured in this review.
Reference review packet (2026-10-31)
Existing patches, sanitized execution evidence and a concrete review checklist are now available. The patch exports are existing 0.165.0 reference diffs, not a completed 0.166.0 port or installer. Original and export hashes are recorded separately; all nine published files were read back and matched byte-for-byte. No private logs, sessions, databases or credentials are included.
A newer isolated A/B on the same repaired 0.165 CLI recorded 80 enabled diagnostic rows / 0 disabled, normal initialize/thread-list responses, clean exits and four
quick_check=okresults. The earlier 41/0 result above remains a separate historical run. Please review whether the diagnostic-only opt-out contract and existing diff/test scope are appropriate, or identify an upstream-equivalent supported mechanism. The checklist requests source/version-specific technical feedback; no reviewer, newer build, or delivery commitment is claimed.Campione01 commentedon Nov 13, 2026
Source follow-up for Codex 0.169.0, at the peeled release commit
d32063f96c2dff1dc96af839b3952abb6acfeda4.One correction to the 0.166.0 note above: #60466 is in this stable release. For non-corruption errors opening or migrating the diagnostic database, state initialization now keeps the thread state available without a logs pool and retains the diagnostic error. Corruption still goes through the existing recovery path. The release's app-server regression also checks that thread deletion is rejected before losing saved conversation data in this condition.
This is separate from the remaining request for an explicit user setting to disable only the SQLite diagnostic sink while keeping thread state and history. The app-server attachment still has no such setting. The original
rmcp::serviceTRACE filter issue was addressed separately; I am not reporting it as a new reproduction.Evidence here is pinned source and the shipped regression definition, not a new local execution or a new write-volume measurement.
WingedGuardian commentedon Nov 15, 2026
Same pattern, still present on newer builds: codex-cli 0.166.0 (interactive TUI connected to the shared app-server) and app-server daemon 0.169.0 (
codex app-server --listen unix://), linux x86_64, 9 MCP servers configured (user plus project config).Read-only measurements, 2026-11-14:
/proc/<pid>/iowrite_bytes) in 2.8 h. The only regular files it held open werelogs_2.sqlite,-waland-shm. The daemon wrote 0.72 GB in one active minute, with idle minutes at about 0.logs_2.sqliteheld only about 50 minutes of rows (13k rows,max(id)about 11.7 M), so nearly all of that volume is insert-and-prune churn, with the WAL at about 350 MB.rmcp::service(176 KB),feedback_tags(154 KB),codex_http_client::client(77 KB),codex_core::stream_events_utils(56 KB),codex_tui::chatwidget::protocol_requests(53 KB, DEBUG, about 70 KB per row).write_bytes. Earlier, a 32-minute window in which the daemon wrote about 12 GB, mostly tothread_history_1.sqliteand its WAL, ended in a 76 s filesystem commit stall that blocked unrelated SQLite users on the same disk. So the churn is not only inlogs_2.sqlite.A separate observation from the same session, in case it is related (no child processes involved): that TUI's RSS grew from about 4.8 GB to 11.7 GB, plus 2.7 GB swapped, over about 2 h, and stayed there until it was closed. I can open a separate issue if that is unrelated to the log sink.
The ask in #43378 (make the sqlite sink's level configurable, or honour
RUST_LOG) would let installs like this one turn the sink down without symlinking the database to tmpfs.WingedGuardian commentedon Nov 15, 2026
Correction to my comment above, from a closer measurement.
The app-server daemon's heavy writes do not go to its SQLite databases. Over 23 active minutes, the daemon's
/proc/<pid>/iowrite_bytesadded up to about 7 GB, 7–12 MB/s in busy minutes. Over the same minutes, the WAL plus checkpoint traffic oflogs_2,thread_history_1andstate_5was close to zero. I measured it from each database's-shmWAL-index header (mxFrame and nBackfill per minute), and the method reads a known 10.9 MB WAL write back correctly.So the line saying the daemon wrote "mostly to
thread_history_1.sqliteand its WAL" is not supported: I had inferred it from open file handles. Where the daemon's writes actually go is still unidentified. The interactive TUI numbers above stand: its only open regular files werelogs_2.sqliteand its WAL/SHM.