high-frequency SQLite/WAL writes dominated by TRACE logs
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- rust, sqlite
- Domain
- databases, observability
Research direction
Start with ~/.codex/logs_2.sqlite and the reported sources codex_api::sse::responses and codex_app_server::outgoing_message. Reproduce the 20-second measurement during Codex streaming and compare TRACE volume, WAL changes, and write operations. The issue gives no expected behavior, so the completion criterion needs clarification before implementation.
Written by the indexing model from the issue text.
Description
What version of Codex CLI is running?
codex cli 0.146.0
What subscription do you have?
Plus
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Windows
What terminal emulator and version are you using (if applicable)?
Powershell 7
Codex doctor report
What issue are you seeing?
es, there are high-frequency SQLite/WAL writes dominated by TRACE logs during the current Codex session, but it is not non-stop continuous writing 24 hours a day.
Detection time: 2026-08-05 09:52-09:55
Database: ~/.codex/logs_2.sqlite
Main DB size: 713.5 MiB
WAL size: 5.13 MiB
Log sequence number reached: 9,453,772
Within a continuous 20 seconds: 1684 TRACE entries, averaging 84.2 entries/sec
Single-second peak: 276 TRACE entries
TRACE accounts for approx: 99.2% of the logs in this window
WAL modification time changed 9 times within 15.6 seconds
Two codex.exe processes combined for approx. 6.95 MiB of write I/O and 5759 write operations in 20.7 seconds
Main sources: codex_api::sse::responses, codex_app_server::outgoing_message
The WAL size is not growing because it is currently overwriting in a circular manner within a fixed size, which does not mean there are no writes.
In the past 24 hours, there were about 15,131 TRACE entries, but they are distributed across only 734 active seconds, and there are long gaps during the night. Therefore, the accurate conclusion is: there is continuous high-frequency writing during Codex activity or streaming output responses, but it is not 24/7 continuous writing when idle.
Additionally, no explicit RUST_LOG=trace or log level configuration was found in config.toml, the current process environment, or the user/system environments. This looks more like the current Codex internal diagnostic database defaults to recording TRACE, rather than it being enabled by user configuration.
The database also has about 180.5 MiB of free pages, indicating significant un-reclaimed space in the current 713.5 MiB file. This detection was completely read-only, and neither the database nor the configuration was modified.
What steps can reproduce the bug?
use Codex for a long time >1 weeks
then its will auto reproduce this bug again
What is the expected behavior?
No response
Additional information
No response
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.5k
- Avg merge
- 1m
- Merged PRs (30d)
- 1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openai/codex
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
bug CLI windows-os
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
macOS sandbox blocks hw.optional.arm64 sysctl, causing Flutter to misdetect Apple Silicon as x64 Openbug CLI sandbox
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug CLI TUI
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
CLI config enhancement skills
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
A-linter
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxc-project/oxc#26863 ·