Wangnov/codex-threadripper

Keep Codex thread history aligned to one provider bucket.

codex‑threadripper – keep all Codex chat threads visible across providers

What it does

  • Codex (the desktop app for OpenAI‑style chat) stores each conversation (“thread”) in a SQLite DB and a rollout JSONL log. The model_provider field on each thread determines which provider’s UI list the thread appears under.
  • When you switch the model_provider in Codex, threads created under the previous provider disappear from the UI, even though the data is still on disk.
  • codex‑threadripper rewrites those model_provider entries so that all threads are associated with the currently‑active provider, making the full history visible again.

Who should use it

  • Anyone who works with a single Codex installation but frequently toggles between different model providers (e.g., OpenAI, Anthropic, Azure, etc.).
  • Users who want their conversation history to follow them automatically instead of being hidden after each provider switch.
  • People who prefer an automated background service rather than manually editing the database.

How it works

  1. SQLite sync – updates the model_provider column in state_5.sqlite (the Codex state DB). A timestamped backup is written to a backups/ folder before any change.
  2. Rollout JSONL patch – modifies the first line of each rollout log file to match the target provider, only when the change can be done without expanding the line (to avoid corrupting files that Codex may still be writing). The original file timestamps are restored so the UI’s “recent threads” order isn’t disturbed.
  3. Watch mode – continuously watches config.toml for provider changes and periodically reconciles any newly‑created threads.
  4. Background service – installs a platform‑specific daemon (launchd on macOS, systemd user unit on Linux, hidden VBS launcher on Windows) that runs the watch loop automatically at login.

Key commands

Command Purpose
status Shows the active provider, per‑provider thread counts from the SQLite DB, and whether the background service is running.
sync Performs a one‑off reconciliation (backup + SQLite + JSONL patch).
bucket switch <provider> Forces all history into the specified provider bucket.
bucket prepare Checks whether rollout files have enough padding for an in‑place patch; skips those that would need line growth.
watch Runs in the foreground, polling config.toml (default every 500 ms) and reconciling new threads as they appear.
install-service / uninstall-service Installs or removes the platform‑specific background daemon.
print-service-config Dumps the generated launchd plist, systemd unit, or VBS launcher without installing it.

Legacy aliases (print-plist, install-launchd, uninstall-launchd) are still accepted.

Installation options

  • Homebrew: brew tap wangnov/tap && brew install codex-threadripper
  • npm (global): npm i -g codex-threadripper
  • Cargo: cargo install codex-threadripper or cargo binstall codex-threadripper
  • Direct binary: download the appropriate archive/installer from the GitHub releases page.

Supported platforms

  • macOS (Apple Silicon & Intel) – service via launchd
  • Linux (x64 & ARM64) – service via systemd --user with fallback to a detached process
  • Windows (x64) – service via a hidden VBS launcher in the Startup folder

Running from source

cargo run -- --help   # shows the full CLI help

Why it matters Without codex‑threadripper, switching providers in Codex fragments your conversation history across hidden “buckets,” making it hard to resume work or review past chats. This tool restores a unified view with minimal risk (automatic backups) and can run silently in the background, so you never lose track of a thread again.


All details are taken directly from the repository’s README; no additional features are inferred.

Related

  • Project
  • Project
  • Project
  • Project
  • Project