Media
- Last updated
- Jun 3, 2026
- Original upload
- May 31, 2026
- Language
- Rust
- License
- MIT
- Type
- Tool
About this project
Discord Rich Presence for Codex CLI, Codex VS Code Extension, and Codex App.
Codex Discord Rich Presence
First-class pricing, model label, and ⚡ Fast mode visibility for both GPT-5.5 and GPT-5.5 Pro — official OpenAI rates applied the moment Codex switches models, no config touch required.
Local-first by design: the runtime reads your Codex session files on disk, talks to Discord over local IPC. Nothing is stored in the cloud.
Overview
Codex Discord Rich Presence reads local Codex session telemetry, detects the active Codex surface, renders a live terminal dashboard, and publishes a clean Discord presence with activity, model, Fast mode, reasoning effort, account plan, token usage, cost, context window, and quota visibility.
What it shows
| Signal | Example | Notes |
|---|---|---|
| Surface | Codex App / Codex CLI | Auto-routed from session_meta.originator and session_meta.source |
| Activity | Reading session.rs | Derived from response items, tool calls, and commentary signals |
| Model | ⚡ GPT-5.5 (Extra High) | Fast mode adds the lightning prefix; reasoning effort adds the suffix |
| Plan | Pro ($200/month) | Auto-detected from telemetry or forced manually from the TUI/config |
| Live context | Ctx 64% left | Derived from active-turn usage and model context window |
| Limits | 5h 100% • 7d 100% | Tracks global account quota freshness and remaining percentages |
| Cost | $7.13 | Uses pricing aliases and overrides from local config |
Highlights
- Surface-aware Discord profile switching for Codex CLI / VS Code and Codex App.
- Fast mode visibility driven by Codex global state, with a lightning-marked model label.
- Reasoning effort visibility from live
turn_contexttelemetry, includingExtra High. - Full-screen plan selector in the TUI, with instant save to config.
- Stable activity interpretation for long sessions, commentary turns, waiting states, and idle transitions.
- Deterministic active-session ranking when multiple Codex sessions are open at once.
- Compact but information-dense Discord payload formatting that stays within Discord limits.
- Local build and release layout that keeps Cargo cache under
.build/targetand final artifacts underreleases/<platform>/.
Quick Start
1. Configure Discord assets
Create or update your Discord Developer applications with the image keys used by the runtime:
- Codex CLI / VS Code profile:
codex-logoopenai
- Codex App desktop profile:
codex-appopenai
2. Build
- Windows:
./scripts/build-release.ps1
- Linux / macOS:
./scripts/build-release.sh
Or build directly with Cargo:
cargo build --release
3. Run
codex-discord-presence
4. Use the TUI
While the terminal UI is open:
- Press
Pto open the full-screen account plan selector. - Use arrow keys or
1-7to select:Auto DetectFreeGoPlusProBusinessEnterprise
- Press
Enterto apply and save immediately. - Press
PorEscto close without changing the current plan. - Press
qorCtrl+Cto quit the runtime.
5. Validate health
codex-discord-presence status
codex-discord-presence doctor
Feature Spotlight
Fast mode visibility
The runtime reads ~/.codex/.codex-global-state.json and checks:
electron-persisted-atom-state.default-service-tier
If the value is fast, the model is shown with a lightning prefix:
⚡ GPT-5.5
Reasoning effort visibility
Reasoning effort is resolved from the active session in this order:
turn_context.payload.effortturn_context.payload.collaboration_mode.settings.reasoning_effort
Rendered examples:
GPT-5.5 (Low)
GPT-5.5 (High)
⚡ GPT-5.5 (Extra High)
Interactive plan selector
Plan display supports both automatic detection and manual override.
Auto Detectuses session telemetry, in-memory cache, and persisted cache fallback.- Manual mode writes the selected plan to
~/.codex/discord-presence-config.json. - The selector is designed for live correction when Codex telemetry says
Unknown, lags behind, or you simply want Discord/TUI to reflect the plan you actually use.
Example Discord state
A typical compact presence state can look like:
⚡ GPT-5.5 (Extra High) | Pro ($200/month) • $7.13 • 31.5M tok • Ctx 64% left • 5h 100% • 7d 100%
Surface Routing
| Active Surface | Discord App Profile | Client ID Field | Main Large Asset |
|---|---|---|---|
| Codex CLI / Codex VS Code Extension | Codex | discord_client_id | codex-logo |
| Codex App Desktop | Codex App | discord_client_id_desktop | codex-app |
Detection priority:
session_meta.originatorcontainsdesktop- fallback:
session_meta.sourcecontainsdesktop - otherwise: Codex CLI / Codex VS Code Extension profile
Command Reference
| Command | Purpose |
|---|---|
codex-discord-presence | Starts the runtime, TUI, and Discord IPC loop |
codex-discord-presence codex [args...] | Runs as a Codex passthrough wrapper while keeping presence active |
codex-discord-presence status | Prints health, active session state, limits source, model label, plan, Fast mode, and reasoning effort |
codex-discord-presence doctor | Runs diagnostics for session roots, config, Discord IDs, and command availability |
Configuration
Config file location:
~/.codex/discord-presence-config.json
Essential defaults:
| Key | Value |
|---|---|
schema_version | 8 |
discord_client_id | 1470480085453770854 |
discord_client_id_desktop | 1478395304624652345 |
display.large_image_key | codex-logo |
display.desktop_large_image_key | codex-app |
display.desktop_large_text | Codex App |
display.small_image_key | openai |
privacy.show_cost | true |
openai_plan.mode | auto |
openai_plan.tier | pro |
openai_plan.show_price | true |
poll_interval_seconds | 2 |
Example:
{
"schema_version": 8,
"discord_client_id": "1470480085453770854",
"discord_client_id_desktop": "1478395304624652345",
"poll_interval_seconds": 2,
"privacy": {
"show_cost": true
},
"openai_plan": {
"mode": "auto",
"tier": "pro",
"show_price": true
}
}
Plan and model display notes:
openai_plan.mode = "manual"makesopenai_plan.tierthe displayed account plan.openai_plan.mode = "auto"keeps telemetry and cache-based plan detection enabled.- The TUI plan selector writes the same config file used at startup.
- Fast mode is derived from
~/.codex/.codex-global-state.json. - Reasoning effort is derived from live
turn_contexttelemetry.
Environment overrides:
CODEX_DISCORD_CLIENT_IDCODEX_DISCORD_CLIENT_ID_DESKTOPCODEX_PRESENCE_STALE_SECONDSCODEX_PRESENCE_POLL_SECONDSCODEX_PRESENCE_ACTIVE_STICKY_SECONDSCODEX_HOME
Build and Artifacts
Published binaries are available in GitHub Releases.
Local Cargo build cache is stored under .build/target and final release binaries are copied into releases/<platform>/.
Expected artifact layout:
releases/windows/codex-discord-rich-presence.exereleases/linux/codex-discord-rich-presencereleases/macos/codex-discord-rich-presencereleases/macos/codex-discord-rich-presence-x64releases/macos/codex-discord-rich-presence-arm64
Windows executable icon source:
assets/branding/codex-app.png
Documentation
Security and Privacy
- Reads local Codex session files only.
- Uses Discord local IPC for activity publishing.
- Does not add an external telemetry backend.
- See PRIVACY.md and SECURITY.md.
Credits
OpenAI Brand Note
OpenAI marks and logos are trademarks of OpenAI.
Follow official brand policy: https://openai.com/brand/
License
MIT (LICENSE)