Introduction

The Web UI of DeepSeek Harness (DSH) provides plugin extensibility. When developing with OpenAI Codex, monitoring API quotas (Rate Limits) is a routine need. The dsh-codex-usage plugin addresses this need by adding a native-styled ring indicator to the right side of the DSH settings line. Through a lightweight polling mechanism, it displays detailed Codex quota usage without leaking credentials.

Core Features

The plugin implements the following capabilities:
* Native visual presentation: Uses DSH design tokens and the 28px geometry standard to reproduce the visual effect of the conversation context billing ring.
* Detailed quota display: Provides complete details for each Codex limit bucket, including rolling windows, usage percentage, reset time, plan type, credits, and consumption controls.
* Intelligent polling and caching: Polls every 5 minutes by default and supports configuration adjustments; refreshes data with 250ms debounce on mouse hover; includes failure throttling and a “last known good” data fallback mechanism.
* Security: Runs entirely locally, does not read ~/.codex/auth, and does not handle OAuth tokens; API routes only accept local (loopback) GET requests, and responses do not include sensitive fields such as email, ID, or tokens.
* Cross-platform support: Supports command-line startup on Windows, macOS, and Linux.

Installation and Activation

Before use, ensure that the environment meets the requirements (see the notes below).

  1. Log in to Codex:
    Run the following command in the terminal to log in to Codex via a ChatGPT plan:
    codex login
  1. Add the plugin:
    In the plugin source directory, run the DSH plugin installation command:
    dsh plugin --profile web add .

Configuration and Usage

After enabling the plugin, go to the DSH settings interface.

  1. Open the configuration page:
    The path is Settings → Plugins → Codex usage.

  2. Configure the refresh interval:
    The plugin supports adjusting the following parameters in the configuration file (default values are as follows):

    - id: codex-usage
      name: dsh-codex-usage
      config:
        refreshIntervalMs: 300000      # 后台轮询间隔(毫秒),最小 60 秒
        hoverRefreshMinAgeMs: 30000    # 悬停刷新的最小间隔(毫秒),最小 5 秒
        requestTimeoutMs: 15000        # 单个请求超时时间(毫秒)
        codexCommand: codex             # Codex 可执行文件名或绝对路径
After modifying and saving the configuration, there is no need to restart DSH; the settings take effect immediately.

Notes and Requirements

This plugin has specific runtime dependencies and involves security policies.

  • Version dependencies:

    • Node.js 20 or a newer version
    • pnpm 10
    • DeepSeek Harness 0.1.2-alpha.2 or a compatible version
    • OpenAI Codex CLI 0.149.0 (must include the stable app-server API)
  • Security mechanisms:

    • The plugin does not read the user’s ~/.codex/auth.json file and does not directly handle OAuth tokens.
    • All credential management, token refresh, and account selection are handled by the official Codex app-server process.
    • The Web API route only allows local loopback requests and validates Origin, Referer, and Fetch Metadata, rejecting cross-site requests.
  • Ecosystem notes:

    • The plugin follows the MIT license, and details can be found in community directories such as SkillHub.
    • The plugin runs with the permissions of the current DSH process; reviewing the source code before installation is recommended.

References