hermes - ✅(Solved) Fix Show provider account limits in the TUI status bar [2 pull requests, 1 participants]

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…
GitHub stats
NousResearch/hermes-agent#16643Fetched 2026-04-28 06:51:59
View on GitHub
Comments
0
Participants
1
Timeline
6
Reactions
0
Author
Participants
Timeline (top)
labeled ×4cross-referenced ×2

Error Message

  • Use color to signal warn/critical levels and keep the text compact.

Fix Action

Fixed

PR fix notes

PR #16644: feat(tui): show account limits in status bar

Description (problem / solution / changelog)

Summary

  • add provider-agnostic account usage snapshots and compact account-limit summaries
  • fetch OpenAI Codex session/weekly usage with the active runtime credential
  • expose cached account limits through the TUI gateway session info and turn-complete events
  • render compact remaining quota windows in the Ink status bar, including the safe pooled credential label

Closes #16643

Test plan

  • venv/bin/python -m pytest tests/test_account_usage.py tests/test_tui_gateway_server.py -q -o 'addopts='
  • npm exec eslint -- src/components/appChrome.tsx src/components/appLayout.tsx src/app/createGatewayEventHandler.ts src/__tests__/createGatewayEventHandler.test.ts src/gatewayTypes.ts src/types.ts
  • npm run type-check from ui-tui/
  • npm run test -- src/__tests__/createGatewayEventHandler.test.ts from ui-tui/
  • npm run build from ui-tui/

Changed files

  • agent/account_usage.py (modified, +152/-17)
  • tests/test_account_usage.py (modified, +148/-16)
  • tests/test_tui_gateway_server.py (modified, +63/-0)
  • tui_gateway/server.py (modified, +76/-1)
  • ui-tui/src/__tests__/createGatewayEventHandler.test.ts (modified, +21/-1)
  • ui-tui/src/app/createGatewayEventHandler.ts (modified, +6/-2)
  • ui-tui/src/components/appChrome.tsx (modified, +68/-1)
  • ui-tui/src/components/appLayout.tsx (modified, +1/-0)
  • ui-tui/src/gatewayTypes.ts (modified, +8/-2)
  • ui-tui/src/types.ts (modified, +21/-0)

PR #16652: feat: show account limits in CLI and TUI status bars

Description (problem / solution / changelog)

Summary

  • Shows active provider/account limits in the legacy CLI status bar.
  • Sends cached account-limit status through the TUI gateway and renders it in the TUI status bar.
  • Uses the same compact format for CLI and TUI, e.g. Codex main 5h 83% • weekly 37%.
  • Preserves the legacy HERMES_TOOL_PROGRESS_MODE override above built-in platform defaults so Slack progress can still be forced on for tests/operators.

PR consolidation

This PR is now the single combined CLI + TUI account-limit status PR.

It replaces the earlier split draft PRs:

  • #16644 — TUI-only draft, superseded by this combined PR.
  • #16652 — originally CLI-only, now updated to include both CLI and TUI work.

Test plan

  • HERMES_HOME=$(mktemp -d) venv/bin/python -m pytest tests/gateway/test_discord_attachment_download.py::TestHandleMessageUsesAuthenticatedRead::test_image_downloads_via_att_read_not_url tests/gateway/test_run_progress_topics.py::test_run_agent_progress_uses_event_message_id_for_slack_dm -vv --tb=short -o 'addopts=' — 2 passed.
  • HERMES_HOME=$(mktemp -d) venv/bin/python -m pytest tests/test_account_usage.py tests/cli/test_cli_status_bar.py tests/test_tui_gateway_server.py tests/gateway/test_run_progress_topics.py::test_run_agent_progress_uses_event_message_id_for_slack_dm tests/gateway/test_discord_attachment_download.py::TestHandleMessageUsesAuthenticatedRead::test_image_downloads_via_att_read_not_url tests/tools/test_dockerfile_pid1_reaping.py -q --tb=short -o 'addopts=' — 127 passed.
  • HERMES_HOME=$(mktemp -d) venv/bin/python -m pytest tests/gateway/test_discord_attachment_download.py::TestHandleMessageUsesAuthenticatedRead::test_image_downloads_via_att_read_not_url tests/gateway/test_run_progress_topics.py::test_run_agent_progress_uses_event_message_id_for_slack_dm tests/test_account_usage.py tests/cli/test_cli_status_bar.py tests/test_tui_gateway_server.py -q --tb=short -o 'addopts=' — 123 passed.
  • npm run --prefix ui-tui type-check — passed.
  • npm run --prefix ui-tui test -- src/__tests__/createGatewayEventHandler.test.ts — 23 passed.
  • env -u SSH_AUTH_SOCK -u SSH_AGENT_PID -u SSH_CONNECTION -u SSH_CLIENT -u SSH_TTY npm run --prefix ui-tui test — 389 passed.
  • npm exec --prefix ui-tui eslint -- src/__tests__/createGatewayEventHandler.test.ts src/app/createGatewayEventHandler.ts src/components/appChrome.tsx src/components/appLayout.tsx src/gatewayTypes.ts src/types.ts — passed.

Notes

A local full Python run with tests/ -n auto still reports unrelated baseline failures. I verified the same failing subset reproduces on clean origin/main, so they are not introduced by this PR.

Changed files

  • agent/account_usage.py (modified, +60/-15)
  • cli.py (modified, +251/-0)
  • gateway/run.py (modified, +26/-7)
  • hermes_cli/runtime_provider.py (modified, +4/-0)
  • run_agent.py (modified, +2/-0)
  • tests/cli/test_cli_status_bar.py (modified, +81/-1)
  • tests/hermes_cli/test_runtime_provider_resolution.py (modified, +4/-0)
  • tests/test_account_usage.py (modified, +72/-0)
  • tests/test_tui_gateway_server.py (modified, +122/-0)
  • tests/tui_gateway/test_make_agent_provider.py (modified, +44/-1)
  • tui_gateway/server.py (modified, +181/-2)
  • ui-tui/src/__tests__/createGatewayEventHandler.test.ts (modified, +41/-1)
  • ui-tui/src/app/createGatewayEventHandler.ts (modified, +8/-2)
  • ui-tui/src/components/appChrome.tsx (modified, +57/-1)
  • ui-tui/src/components/appLayout.tsx (modified, +1/-0)
  • ui-tui/src/gatewayTypes.ts (modified, +8/-2)
  • ui-tui/src/types.ts (modified, +20/-0)
RAW_BUFFERClick to expand / collapse

Feature description

Show provider account/subscription quota in the Ink TUI status bar so users can see when their current plan windows are getting close to exhaustion before requests start failing.

Motivation

Credential pool state (hermes auth list) only shows a credential after Hermes has already marked it exhausted or rate-limited. For providers with plan windows, users need a lightweight proactive signal in the TUI while they work.

Proposed solution

  • Add provider-specific account usage snapshots behind a provider-agnostic summary API.
  • For OpenAI Codex, fetch session/weekly usage windows from the Codex usage API using the active runtime credential.
  • Expose a cached compact account-limit payload through the TUI gateway session info and message.complete events.
  • Render a short status-bar segment, for example: Codex main 5h 98% • weekly 43%.
  • Use color to signal warn/critical levels and keep the text compact.

Notes

The UI should not expose token material. If it shows a pooled credential identifier, it should use only the safe credential label.

extent analysis

TL;DR

Implement a provider-agnostic summary API to fetch and display account usage snapshots in the Ink TUI status bar.

Guidance

  • Identify the relevant provider APIs (e.g., OpenAI Codex usage API) to fetch account usage data.
  • Design a compact account-limit payload to expose through the TUI gateway session info and message.complete events.
  • Develop a rendering mechanism for the status-bar segment, incorporating color signals for warn/critical levels.
  • Ensure the UI does not expose token material, using safe credential labels instead.

Example

No code snippet is provided due to the high-level nature of the issue.

Notes

The solution requires careful consideration of security and data exposure, as well as a robust design for the summary API and rendering mechanism.

Recommendation

Apply workaround by implementing the proposed solution, as it addresses the motivation and feature description by providing a proactive signal to users about their plan windows.

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 - ✅(Solved) Fix Show provider account limits in the TUI status bar [2 pull requests, 1 participants]