Codex-Discord-Rich-Presence

Discord Rich Presence for Codex CLI, Codex VS Code Extension, and Codex App.

MIT·Rust·cli / codex / discord
6
Stars
1
Forks

Media

Last updated
Jun 17, 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.

Report
Description

Codex Discord Rich Presence

What It Shows

SignalExampleSource
ActivityRunning command cargo testCodex JSONL or OpenCode SQLite parts
SurfaceCodex AppCodex/OpenCode host detection
Model⚡ GPT-5.5Session model plus Fast mode
PlanPro ($200/month)Codex telemetry or local override
Tokens31.5M tokLocal token events
Cost$7.13Local pricing catalog
ContextCtx 19% usedActive context-window snapshot
Limits5h 100% • 7d 100%Codex quota envelopes

Discord state example:

⚡ GPT-5.5 | Pro ($200/month) • $7.13 • 31.5M tok • Ctx 19% used • 5h 100% • 7d 100%

Presence Priority

Codex wins the Discord activity stack. The runtime republishes the active Codex payload every two seconds, so browser presences such as PreMiD can appear only until the next Codex tick. The session start timestamp stays stable, so elapsed time still reads correctly.

Identity

Only Codex identities publish.

SurfaceDiscord appClient IDLarge asset
Codex CLICodex1470480085453770854codex-logo
Codex VS CodeCodex1470480085453770854codex-logo
Codex AppCodex App1478395304624652345codex-app
OpenCode hostCodex App1478395304624652345codex-app

Persisted non-Codex IDs and assets are normalized before publish.

Install

Download Windows, Linux, or macOS binaries from GitHub Releases.

Windows local artifact:

.\releases\windows\codex-discord-rich-presence.exe

Health checks:

codex-discord-presence status
codex-discord-presence doctor

Build

Prerequisite: Rust stable.

cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
cargo build --release

Windows package:

pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/build-release.ps1

Release outputs:

PlatformArtifact
Windows x64releases/windows/codex-discord-rich-presence.exe
Linux x64releases/linux/codex-discord-rich-presence
macOS x64releases/macos/codex-discord-rich-presence-x64
macOS arm64releases/macos/codex-discord-rich-presence-arm64

Config

Config lives at ~/.codex/discord-presence-config.json.

VariablePurpose
CODEX_HOMEAlternate Codex home
CODEX_PRESENCE_POLL_SECONDSPoll interval
CODEX_PRESENCE_STALE_SECONDSSession stale cutoff
CODEX_PRESENCE_ACTIVE_STICKY_SECONDSActive-session stickiness window

OpenCode data is read from ~/.local/share/opencode/opencode*.db, including channel-specific databases such as opencode-prod.db.

Project Map

PathPurpose
src/Runtime, Discord IPC, TUI, parsers, pricing, telemetry
tests/Cross-module regressions and test map
docs/Runtime, database, and UI contracts
scripts/Release build scripts
assets/branding/Codex/OpenAI app assets

Docs start at docs/index.md. Tests start at tests/index.md.

License

MIT. See LICENSE.