Skip to content

Log level not configurable - logs_2.sqlite grows to 1.4GB with hardcoded TRACE #31132

Open

Description

@wu350891451-jpg

logs_2.sqlite grows to 1.4GB with TRACE-level logs (66.8% of rows). config.toml has no log_level field, RUST_LOG env var is not read (no from_default_env in binary), [otel] enabled=false doesn't stop local tracing. Only [feedback] max_bytes (undocumented) limits growth via auto-prune. Please expose log level as a configurable option.

Activity

  1. added
    bug
    CLI
    config
    on Jul 4, 2026
  2. darlingm commented on Jul 5, 2026

    @darlingm
    Contributor

    100% agreed. See #28224 (comment) for a workaround to block the writes. Combine with starting over with new sqlite files to reclaim space if that's an issue.

  3. Loong0x00 commented on Jul 19, 2026

    @Loong0x00

    This is still reproducible with codex-cli 0.144.5, and the same persistent TRACE behavior remains in the 0.144.6 source.

    Local measurements from a Linux system:

    • ~/.codex/logs_2.sqlite is about 400 MiB.
    • sqlite_sequence is at ~14.9 million while only ~208k rows are retained, so roughly 14.7 million rows have already been inserted and pruned.
    • In a 30-second active sample, Codex inserted 131 log rows containing ~803 KiB of payload; 84 TRACE rows accounted for ~759 KiB.
    • A separate 30-second WAL-index sample observed 1,227 WAL frames (~5.06 MiB) and one WAL reset. At the same activity level, WAL traffic alone extrapolates to ~13.6 GiB/day, before main-database checkpoint and filesystem overhead.
    • RUST_LOG=off together with --disable sqlite still created and populated logs_2.sqlite (including TRACE rows). The sqlite feature is marked removed/no-op.

    The catastrophic WebSocket/OTel flood from #28224 appears fixed, but the remaining hard-coded persistent TRACE sink is still an unnecessary continuous write stream. It also persists prompt/tool/network content without a supported opt-out. Users should not have to patch Codex or move all SQLite-backed state to volatile storage to stop diagnostic TRACE logging. This remains a product bug, not a user configuration problem.

  4. darlingm commented on Jul 19, 2026

    @darlingm
    Contributor

    This is still reproducible with codex-cli 0.144.5, and the same persistent TRACE behavior remains in the 0.144.6 source.

    Yep, for whatever reason, using up customers' SSD endurance on massive scales when you consider the number of active Codex users hasn't been a high enough priority to issue a 0.144.x fix. With the other issue on this and its history and activity, you have to figure out how to laugh at this situation or join a betting pool for when it'll get released. Or, you'll drive yourself crazy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugconfig

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions