hermes - 💡(How to fix) Fix Add `hermes usage` CLI command and agent-accessible quota tool [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Then expose this to the agent as a tool, so it can proactively check quota before large tasks and warn/split/wait before beginning expensive work.

Fix Action

Fixed

RAW_BUFFERClick to expand / collapse

Feature Description

Expose the same live token/account quota information currently available via the gateway /usage slash command through:

  1. a CLI command: hermes usage
  2. optionally an agent-accessible tool: get_usage / quota_status

The command should report current session usage, context usage, token counts, API calls, cost if available, and provider account limits such as session/weekly remaining percentages and reset times.

Motivation

In Telegram/gateway sessions, /usage can show useful live limits for providers such as openai-codex (Plus), including:

  • Session remaining / used percentage
  • Session reset time
  • Weekly remaining / used percentage
  • Weekly reset time
  • Context usage
  • Input/output/cache-read tokens
  • API calls

However, the agent cannot currently query this information directly through tools or CLI. Before starting large tasks — repo analysis, coding features, subagents, long research, large file/log reads — the agent has to ask the user to manually run /usage and paste the result.

This makes quota-aware autonomous task planning harder and increases the chance of exhausting limits halfway through a task.

Proposed Solution

Add:

bash hermes usage

with output equivalent to /usage.

Also add a structured machine-readable mode:

bash hermes usage --json

Example JSON fields:

json { "model": "gpt-5.5", "provider": "openai-codex", "plan": "Plus", "tokens": { "input": 137182, "cache_read": 846336, "output": 7985, "total": 991503 }, "api_calls": 28, "context": { "used": 75247, "limit": 272000, "percent": 28 }, "limits": { "session": { "remaining_percent": 86, "used_percent": 14, "resets_at": "2026-05-08T14:00:00Z" }, "weekly": { "remaining_percent": 97, "used_percent": 3, "resets_at": "2026-05-12T06:50:00Z" } } }

Then expose this to the agent as a tool, so it can proactively check quota before large tasks and warn/split/wait before beginning expensive work.

Alternatives Considered

  • Keep using /usage manually in gateway chats.
  • Use hermes insights, but this is retrospective and does not expose live account remaining limits.
  • Use provider dashboards, but this is provider-specific and not accessible to the agent.

Benefits

  • Better quota-aware planning.
  • Fewer interrupted long-running tasks.
  • Easier automation.
  • Better UX across CLI and gateway.
  • Enables agent policies like “check quota before large tasks”.

Related work / context

There are existing quota-related issues such as #9085, #6564, #6589, and #15167. This request is specifically about exposing the live /usage-style information through a CLI command and ideally a structured agent/tool interface, so agents can perform quota checks autonomously before large tasks.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix Add `hermes usage` CLI command and agent-accessible quota tool [1 pull requests]