Utilities for inspecting and maintaining local Codex app state on macOS.
The toolkit is distributed as macOS arm64 binaries attached to GitHub Releases. Each Release Asset contains one Utility binary.
Open the GitHub Releases page and download the archive for the utility you want to run:
thread-archiver_<version>_darwin_arm64.tar.gzcodex-db-state_<version>_darwin_arm64.tar.gz
The release also includes SHA256SUMS. Download it into the same directory as
the archive and verify the selected archive checksum:
grep 'thread-archiver_<version>_darwin_arm64.tar.gz' SHA256SUMS | shasum -a 256 -c -Then unpack the selected archive:
tar -xzf thread-archiver_<version>_darwin_arm64.tar.gz
cd thread-archiver_<version>_darwin_arm64Use the matching codex-db-state_<version>_darwin_arm64.tar.gz name in these
commands when downloading codex-db-state. Run the binary from the unpacked
directory.
- macOS on Apple Silicon.
- A local Codex home directory, normally
~/.codex. codexonPATHwhen runningthread-archiver --dry-run=false.lsofonPATHwhen runningcodex-db-state.
Archives selected active Codex threads through the official
codex app-server JSON-RPC API and writes an incremental JSON manifest. The
default mode is a dry run.
./thread-archiver
./thread-archiver --dry-run=falseSee cmd/thread-archiver/README.md for selection rules, validation behavior, manifest fields, and operational notes.
Shows a read-only terminal UI summary of Codex state_5.sqlite and
logs_2.sqlite, including database file sizes, thread/log counts, time ranges,
and open file handles.
./codex-db-state
./codex-db-state --codex-home ~/.codexSee cmd/codex-db-state/README.md for the database layout and read-only behavior.
These tools inspect or request changes to local Codex state. Review the selected Codex home and database path before running them against real data.
codex-db-stateis read-only. It opensstate_5.sqliteandlogs_2.sqlitein SQLite read-only mode to run integrity checks and summary queries.thread-archiverdoes not write SQLite directly, but with--dry-run=falseit askscodex app-serverto archive selected threads.- Hidden fallback behavior is not used. Missing files, missing commands, failed checks, or unexpected archive validation results are reported as errors.
Dangerous maintenance scripts are documented separately in docs/maintenance.md.
Development, testing, linting, and release-build notes live in docs/development.md.
This project is licensed under the MIT License. See LICENSE.