Fixes openai/codex#28224.
Codex writes millions of TRACE-level rows per day to ~/.codex/logs_2.sqlite via insert-and-prune churn, rapidly consuming SSD write endurance.
block-logs-trigger.sh— watcher scriptcom.codex.block-logs-trigger.plist— macOS LaunchAgent
The script installs a SQLite trigger that silently drops all INSERT operations on the logs table. The LaunchAgent watches ~/.codex/ via WatchPaths and re-applies the trigger automatically if Codex recreates the database.
- Determine the user's home directory path (e.g.
/Users/username) - Save
block-logs-trigger.shto~/.codex/block-logs-trigger.shand runchmod +xon it - Save
com.codex.block-logs-trigger.plistto~/Library/LaunchAgents/com.codex.block-logs-trigger.plist, replacing all occurrences ofPLACEHOLDER_HOMEwith the actual home directory path - Run
launchctl load ~/Library/LaunchAgents/com.codex.block-logs-trigger.plist - Run
bash ~/.codex/block-logs-trigger.shto apply the SQLite trigger immediately