Description
Compression count warning is lost in TUI mode. When a session is compressed 2+ times, the accuracy degradation warning should be shown to the user, but in TUI it is silently swallowed.
Root Cause
agent/conversation_compression.py line 569-576 uses agent._vprint() to output the warning:
if _cc >= 2:
agent._vprint(
f"{agent.log_prefix}⚠️ Session compressed {_cc} times — "
f"accuracy may degrade. Consider /new to start fresh.",
force=True,
)
_vprint() writes to stdout, which works fine in CLI mode (hermes chat). In TUI mode, the Ink UI does not consume stdout, so the warning never reaches the user.
The correct channel for TUI delivery is agent._compression_warning + agent._emit_status() / status_callback, which is used elsewhere (e.g. aux model unavailable). The compression count warning skips this path.
Impact
- TUI users compress 2+ times with zero feedback about degrading accuracy.
- CLI users see the warning normally.
Reproduction
hermes --tui
- Run a long enough conversation to trigger compression (or use
/compress twice).
- No warning appears in the TUI interface.
- Check
~/.hermes/logs/agent.log — the warning is absent there too (it went to stdout).
Suggested Fix
Route the compression count warning through agent._compression_warning + agent._emit_status() instead of _vprint(). This ensures delivery via status_callback to all platforms (TUI, Telegram, Discord, etc.).
Related
Description
Compression count warning is lost in TUI mode. When a session is compressed 2+ times, the accuracy degradation warning should be shown to the user, but in TUI it is silently swallowed.
Root Cause
agent/conversation_compression.pyline 569-576 usesagent._vprint()to output the warning:_vprint()writes to stdout, which works fine in CLI mode (hermes chat). In TUI mode, the Ink UI does not consume stdout, so the warning never reaches the user.The correct channel for TUI delivery is
agent._compression_warning+agent._emit_status()/status_callback, which is used elsewhere (e.g. aux model unavailable). The compression count warning skips this path.Impact
Reproduction
hermes --tui/compresstwice).~/.hermes/logs/agent.log— the warning is absent there too (it went to stdout).Suggested Fix
Route the compression count warning through
agent._compression_warning+agent._emit_status()instead of_vprint(). This ensures delivery viastatus_callbackto all platforms (TUI, Telegram, Discord, etc.).Related