Repository navigation
v0.1.5
Fix: Codex CLI detection and SQLite WAL read
Two issues prevented Codex from being detected as active:
1. CLI sessions were invisible
Codex polling only checked for the GUI app via lsappinfo. Terminal-only codex sessions (e.g. codex, codex exec, codex review) were never recognised, so caffeinate / pmset never activated when the GUI was closed.
Added CLI process detection using ps with a denylist of non-interactive subcommands (app-server, mcp-server, completion, help, etc.).
2. SQLite WAL journal was not read
sqlite_single_line opened databases with immutable=1, which skips the WAL journal entirely. Both Codex and OpenCode use WAL mode, so updated_at timestamps lagged behind by minutes until a checkpoint occurred — making active sessions appear stale and idle.
Switched to mode=ro so the WAL is read on every poll.
Changes
codex.rs: addcodex_cli_session_running()withis_interactive_codex_invocation()parser and 15 unit testsmod.rs: dropimmutable=1from SQLite URI, remove unusedgui_runtime_detail
Full Changelog: v0.1.4...v0.1.5