Codex Win Widget is a small Windows tray app that shows your remaining Codex limits from the taskbar.
It was built to feel like a native Windows flyout, not like a separate dashboard. Click the tray icon and a compact panel opens above the taskbar with the current remaining percentage, weekly remaining percentage, used percentage, reset time, credits, and token usage. Move the mouse away and it disappears.
- Shows the current Codex limit as a tray icon.
- Opens a native-looking flyout from the taskbar.
- Puts the remaining percentage first, because that is the number you usually need.
- Shows weekly remaining, used percentage, reset time, credits, daily tokens, lifetime tokens, and streak when Codex provides those values.
- Refreshes automatically every 60 seconds.
- Uses a 60-second in-memory cache, so opening the panel repeatedly does not keep calling Codex.
- Avoids the visible console flash by resolving Codex in-process and skipping shell wrappers when it can launch the underlying
codex.jsscript directly. - Provides a right-click menu for refresh, opening Codex, copying the current status, starting with Windows, and quitting the app.
This project is independent and is not made by, endorsed by, sponsored by, or affiliated with OpenAI.
Codex is used here only to describe compatibility with OpenAI's Codex CLI. OpenAI, ChatGPT, GPT, and related names or marks are the property of OpenAI. OpenAI publishes its current trademark guidance in its brand guidelines.
This app does not include Codex, does not redistribute the Codex CLI, and does not provide access to OpenAI services by itself. You need your own Codex installation and your own valid OpenAI/Codex access.
- Windows 10 or Windows 11.
- Rust with Cargo.
- The Codex CLI installed and available on
PATH. - A working Codex login in the same Windows user account that runs the widget.
The app talks to the local Codex CLI through codex app-server. It does not call a separate web API directly, and it does not store your account data.
cargo build --releaseThe executable is written to:
target\release\codex-win-widget.exe
.\target\release\codex-win-widget.exeOnce it starts, the app lives in the Windows notification area. There is no main window.
Left click the tray icon to show the limits panel.
Right click the tray icon to open the menu:
Show limitsopens the flyout.Refresh nowforces a fresh Codex read.Open Codexopens Codex in the browser.Copy statuscopies a short status summary to the clipboard.Start with Windowsturns launch-at-login on or off for the current user.Quitexits the app.
The flyout also closes when it loses focus, when you press Esc, or when the mouse leaves the panel.
Use Start with Windows in the tray menu if you want the widget to open when you sign in.
The setting is stored for the current Windows user under:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
It does not need administrator permissions. Turn the same menu item off to remove the startup entry.
By default, the widget looks for Codex in this order:
codex.cmdcodex.execodex
The lookup is done inside the widget. It does not call where.exe, cmd.exe, PowerShell, or another helper process just to find Codex.
If codex.cmd comes from an npm install, the widget skips the batch file and launches Node directly with the installed Codex script. That avoids the short console window that Windows normally shows when a batch file starts. The resolved command is cached, so later refreshes do not repeat the PATH scan.
You can point the widget at a specific Codex command with:
$env:CODEX_WIN_WIDGET_CODEX = "C:\Users\you\AppData\Roaming\npm\codex.cmd"
.\target\release\codex-win-widget.exeThe override can point to:
codex.cmd, when it is the npm wrapper next tonode_modules\@openai\codex\bin\codex.js.codex.exe, when you have a native executable launcher.codex.js, when you want the widget to launch the Codex script throughnode.exe.
The widget does not run unknown .cmd, .bat, or .ps1 wrappers directly. If the wrapper layout is not recognized, the flyout shows an error instead of opening a flashing shell window.
The project is intentionally small:
src/app_server.rsresolves Codex without shell helpers, startscodex app-server, sends the account and rate-limit requests over stdin, and reads JSON responses from stdout.src/model.rsturns Codex account, limit, credit, and usage data into the compact view model used by the tray and flyout.src/native.rsowns the Win32 tray icon, popup window, drawing code, clipboard integration, menu actions, refresh timer, and mouse-leave behavior.src/main.rskeeps the binary Windows-only.
The UI is drawn with Win32 and GDI. There is no webview, no background service, and no extra runtime beyond the app itself and the Codex CLI it talks to.
The widget refreshes in three situations:
- When the app starts.
- On the 60-second timer.
- When you choose
Refresh now.
Opening the flyout also asks for data, but it respects the 60-second cache. If the last refresh is still fresh, the panel opens immediately with the cached snapshot.
The Codex command itself is resolved once per app session and reused after that. This keeps refreshes quiet and avoids repeating PATH work every time the panel opens.
Run these before committing changes:
cargo fmt --check
cargo test
cargo clippy --all-targets --all-features -- -D warnings
cargo build --releaseThere is also an ignored integration test that talks to the local Codex app-server:
cargo test fetches_local_app_server_snapshot -- --ignored --nocaptureThat test requires a working Codex installation and login.
This is a local Windows utility for Codex users. It depends on the Codex CLI exposing the local app-server interface and on the response shape used by the installed CLI version.
If Codex is not installed, not logged in, or not reachable through the local app-server, the widget stays open. The flyout and tooltip show a short error.
This project is released under the PolyForm Noncommercial License 1.0.0.
The source is public so people can inspect it, learn from it, run it for personal use, and adapt it for noncommercial work. Commercial use is not allowed unless the copyright holder gives separate written permission.
In plain terms: do not sell this app, bundle it into a paid product, use it as part of a commercial service, or repackage it for commercial distribution without permission.