Skip to content

[Bug]: Garbled ANSI codes from status printouts like \verbose and approaching compaction #2262

@smt923

Description

@smt923

Bug Description

things like using /verbose as well as the approaching compaction warning give some garbled ANSI like this:

?[33mTool progress: NEW?[0m — show each new tool ?[1m(?[0mskip repeats?[1m)?[0m.

?[36m◐ context ▰▰▰▰▰▰▰▰▰▰▰▰▱▱▱▱▱▱▱▱ 60% to compaction?[0m  ?[2m98k threshold (75%) · approaching compaction?[0m

I tried this on kitty, alacritty, ghostty and gnome console and it happens on all of them for me, all of the other ui, fancy characters and colors renders fine

Steps to Reproduce

  1. launch hermes
  2. trigger /verbose
  3. see the garbled characters

Expected Behavior

no garbled characters, properly output however it's designed to

Actual Behavior

I get the garbled characters

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

N/A (CLI only)

Operating System

Arch Linux (6.19.9-1-cachyos)

Python Version

3.11.15

Hermes Version

v0.4.0 (2026.3.18)

Relevant Logs / Traceback

?[33mTool progress: NEW?[0m — show each new tool ?[1m(?[0mskip repeats?[1m)?[0m.

?[36m◐ context ▰▰▰▰▰▰▰▰▰▰▰▰▱▱▱▱▱▱▱▱ 60% to compaction?[0m  ?[2m98k threshold (75%) · approaching compaction?[0m

Root Cause Analysis (optional)

I don't know the exact cause but the two lines in my example come from two different locations I believe, so there might be more cases of it/multiple causes of the garbling

hermes-agent/cli.py:

4198-                self.agent.reasoning_callback = None
4199-
4200-        labels = {
4201-            "off": "[dim]Tool progress: OFF[/] — silent mode, just the final response.",
4202:            "new": "[yellow]Tool progress: NEW[/] — show each new tool (skip repeats).",
4203-            "all": "[green]Tool progress: ALL[/] — show every tool call.",
4204-            "verbose": "[bold green]Tool progress: VERBOSE[/] — full args, results, think blocks, and debug logs.",
4205-        }
4206-        self.console.print(labels.get(self.tool_progress_mode, ""))

hermes-agent/agent/display.py:

678-    if compaction_progress >= 0.85:
679-        color = f"{_BOLD}{_YELLOW}"
680-        icon = "⚠"
681-        if compression_enabled:
682:            hint = "compaction imminent"
683-        else:
684-            hint = "no auto-compaction"
685-    else:
686-        color = _CYAN

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions