hermes - 💡(How to fix) Fix [Bug]: TUI Context Display shows exactly half of the actual context size (Regression) [2 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

This strongly suggests that the TUI logic is misinterpreting KV-pairs as Tokens, or there is a division error in the scaling logic within the TUI's display component.

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

Report       https://paste.rs/Fk6l5
  agent.log    https://paste.rs/AhlX2
  gateway.log  https://paste.rs/KBxDW

---
RAW_BUFFERClick to expand / collapse

Bug Description

A recent update seems to have introduced a regression in how the context usage is displayed in the Terminal User Interface (TUI). The displayed context limit is exactly half of the value passed via the -c parameter in llama-server.

Steps to Reproduce:
1. Start llama-server with a specific context size, e.g., -c 131072 (128k).
2. Observe the context indicator in the Hermes Agent TUI.

Expected Behavior:
The TUI should display the context limit as 128K (or the exact token count).

Actual Behavior:
The TUI displays 65.5K.

Technical Analysis:
The discrepancy is mathematically perfect: $131072 / 2 = 65536$ ($65.5\text{K}$).
This strongly suggests that the TUI logic is misinterpreting KV-pairs as Tokens, or there is a division error in the scaling logic within the TUI's display component.

The model's actual capacity is verified via the /v1/models endpoint, which confirms the model architecture supports much larger contexts (e.g., n_ctx_train: 262144), and the server is correctly allocating the requested $128\text{k}$ in RAM/VRAM.

Environment:
- OS: WSL (Windows Subsystem for Linux)
- Tool: Hermes Agent TUI

Steps to Reproduce

  1. Start llama-server with a specific context size using the -c flag (e.g., llama-server -m <model> -c 131072). 2. Launch the Hermes Agent TUI (e.g., via hermes chat). 3. Observe the context utilization indicator in the terminal status bar.

Expected Behavior

The indicator should display the full configured context size (e.g., 0/128K).

Actual Behavior

The indicator displays exactly half of the configured context size (e.g., 0/65.5K for a 128k config).

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/Fk6l5
  agent.log    https://paste.rs/AhlX2
  gateway.log  https://paste.rs/KBxDW

Operating System

Windows 11

Python Version

3.11.2

Hermes Version

v0.14.0 (2026.5.16)

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

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 [Bug]: TUI Context Display shows exactly half of the actual context size (Regression) [2 pull requests]