{"slug": "show-hn-pulse-give-your-ai-harnesses-subscription-usage-context", "title": "Show HN: Pulse – Give your AI harnesses subscription usage context", "summary": "A developer released Pulse, an MIT-licensed Rust CLI that reports subscription quota usage, reset times, observed burn rates and estimated runway for Claude, Codex, OpenCode Go and Grok Build from the terminal. Pulse installs via `cargo install --git https://github.com/ashwnn/pulse --locked pulse-quota`, defaults to an 80% alert threshold, and ships plugins for Claude Code, Codex and OpenCode that inject a quota warning into the model's context when a window reaches 80%. Pulse sends credentials only to each provider's HTTPS usage endpoint, stores quota snapshots plus a SHA-256 credential fingerprint in `${XDG_CACHE_HOME:-~/.cache}/pulse`, and does not refresh or modify tokens.", "body_md": "Check your coding subscription quotas from the terminal. Pulse shows usage, reset times, observed burn rates, and estimated runway for Claude, Codex, OpenCode Go, and Grok Build.\n\nYou need Rust and Cargo. Install the CLI first, and make sure Cargo's bin directory is on your PATH:\n\n```\ncargo install --git https://github.com/ashwnn/pulse --locked pulse-quota\npulse --help\npulse                     # all available providers\npulse grok                # one provider\npulse codex --json        # machine-readable output\npulse --alert --threshold 90\n```\n\nThe default alert threshold is 80% used. Alert mode prints only matching windows and exits successfully if a provider is unavailable. Normal mode reports errors and exits successfully if at least one provider returned a window.\n\nBurn is the change in quota used, in percentage points per hour, between two readings at least one minute apart. Runway estimates time to 100% at that rate. These are estimates, not token costs or guarantees. Pulse does not compare readings across different reset times or credentials. After a reset, token change, or first reading, it needs another sample. A zero burn rate has no runway estimate.\n\nPulse sends credentials only to the respective provider's HTTPS usage endpoint and does not refresh or modify them. It reads:\n\n- Claude: `CLAUDE_CODE_OAUTH_TOKEN` , or`$CLAUDE_CONFIG_DIR/.credentials.json` (default`~/.claude/.credentials.json` ).\n- Codex: `PULSE_CODEX_TOKEN` , or`$CODEX_HOME/auth.json` (default`~/.codex/auth.json` ).\n- OpenCode Go: `PULSE_OPENCODE_TOKEN` , a Console OAuth access token. Other OpenCode providers are not currently supported.\n- Grok Build: `PULSE_GROK_TOKEN` , or the xAI OAuth entry in`$GROK_HOME/auth.json` (default`~/.grok/auth.json` ). Pulse reads the shared credit usage percentage from the Grok Build billing endpoint. It does not infer a quota from per-product usage or API keys.\n\nClaude installations using a system keychain require the environment variable. If a token expires, sign in again through the relevant client. Subscription endpoints and their response formats may change. API-key billing is not represented by these subscription windows.\n\nPulse stores quota snapshots and a SHA-256 credential fingerprint in `${XDG_CACHE_HOME:-~/.cache}/pulse`. The cache contains no token. Alert checks reuse a snapshot for up to two minutes, unless its reset has passed. Normal CLI checks fetch a fresh reading. Delete the cache directory to clear history.\n\nInstall the binary first. Each integration adds a quota warning to the model's context when a window reaches 80%. The model can account for remaining quota as it works. These are not desktop notifications, and a warning does not guarantee that the agent will mention it to you. Checks fail open and run only when the harness invokes the hook.\n\nIn Claude Code, run:\n\n```\n/plugin marketplace add ashwnn/pulse\n/plugin install pulse@pulse\n```\n\nThe plugin uses `UserPromptSubmit`. Restart Claude Code after installation.\n\n```\ncodex plugin marketplace add ashwnn/pulse\ncodex plugin add pulse@pulse\n```\n\nAlternatively, install Pulse from the local marketplace in the Codex desktop app. Review and trust its hook in `/hooks`. The hook runs on `UserPromptSubmit`. Plugin hooks require a Codex version that supports lifecycle hooks.\n\nFor OpenCode's current plugin API, clone the repository and add the absolute path of its `opencode` directory to `~/.config/opencode/opencode.jsonc`:\n\n```\n{\"plugins\": [\"/absolute/path/to/pulse/opencode\"]}\n```\n\nRestart the OpenCode service. The plugin adds alerts to model context. It requires the OpenCode version with the `@opencode/plugin` API.\n\nMIT. See [LICENSE](https://github.com/ashwnn/pulse/blob/main/LICENSE).", "url": "https://wpnews.pro/news/show-hn-pulse-give-your-ai-harnesses-subscription-usage-context", "canonical_source": "https://github.com/ashwnn/pulse", "published_at": "2026-12-05 05:36:30+00:00", "updated_at": "2026-12-05 05:43:18.137561+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "large-language-models"], "entities": ["Pulse", "Claude", "Claude Code", "Codex", "OpenCode", "Grok Build", "xAI", "Rust"], "also_reported_by": [], "takeaway": "Pulse's Claude Code and Codex plugins hook `UserPromptSubmit` to add a quota warning to model context at 80% usage, but checks fail open and run only when the harness invokes the hook, so the agent may not surface the warning.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-pulse-give-your-ai-harnesses-subscription-usage-context", "markdown": "https://wpnews.pro/news/show-hn-pulse-give-your-ai-harnesses-subscription-usage-context.md", "text": "https://wpnews.pro/news/show-hn-pulse-give-your-ai-harnesses-subscription-usage-context.txt", "jsonld": "https://wpnews.pro/news/show-hn-pulse-give-your-ai-harnesses-subscription-usage-context.jsonld"}}