prime-openai-codex-status

Show OpenAI Codex subscription usage in Prime Agent with /status and a live weekly widget

Packages

Package details

extension

Install prime-openai-codex-status from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:prime-openai-codex-status
Package
prime-openai-codex-status
Version
0.1.0
Published
Aug 6, 2026
Downloads
187/mo · 16/wk
Author
nxcop
License
MIT
Types
extension
Size
20.4 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

prime-openai-codex-status

See your OpenAI Codex subscription usage inside Prime Agent, with an in-chat /status report and a small live weekly-usage widget.

This is the Prime Agent edition of pi-openai-codex-status.

Install

From npm

prime-agent package install npm:prime-openai-codex-status

From GitHub

prime-agent package install git:github.com/NxcOP1891/prime-openai-codex-status

From a local checkout

git clone https://github.com/NxcOP1891/prime-openai-codex-status.git
cd prime-openai-codex-status
prime-agent package install "$PWD"

Start a new Prime Agent session after installation.

Usage

  1. Run /login and choose OpenAI Codex.
  2. Use an openai-codex model.
  3. Run /status for the complete usage report.

While an OpenAI Codex model is active, the widget below the editor shows the weekly percentage remaining and reset time. It refreshes when a session starts, the model changes, /status runs, or an agent loop finishes.

Features

  • Shows primary, secondary, and additional rate-limit windows.
  • Includes plan, allowance, reset, and credit information when available.
  • Posts /status as a plain in-chat report that works through Prime Agent's daemon UI bridge.
  • Keeps a 60-second cache and shares concurrent requests to avoid repeatedly querying the endpoint.
  • Hides the widget when the active model is not from openai-codex.

Why it differs from the Pi edition

Pi can display the report in a custom overlay. Prime Agent's daemon-backed UI does not bridge arbitrary extension overlays, so this edition uses an in-chat report and a small widget instead.

Compatibility

Version 0.1.x is developed and tested with Prime Agent 0.7.x and Node.js 22.8 or later.

The extension uses Prime Agent's built-in OpenAI Codex authentication. It is intended for ChatGPT Plus/Pro accounts with Codex access.

Privacy and notes

  • Usage is requested directly from https://chatgpt.com/backend-api/wham/usage.
  • The existing OpenAI Codex access token and account ID are sent only to that official endpoint.
  • No credentials or usage data are sent to this project or another third party.
  • The endpoint and response format are internal OpenAI interfaces and may change.
  • Visit https://chatgpt.com/codex/settings/usage for the authoritative status.

Acknowledgements

Based on pi-openai-codex-status, adapted for Prime Agent's daemon-backed interface.

License

MIT — see LICENSE.