hermes - 💡(How to fix) Fix [Bug]: Terminal escape sequences leaking into response output, causing first 1-3 characters to be cut

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

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Code Example

Report       https://paste.rs/Ycd9O
  agent.log    https://paste.rs/DBoIC
  gateway.log  https://paste.rs/P9tXf

---
RAW_BUFFERClick to expand / collapse

Bug Description

When running Hermes in interactive terminal mode, escape sequences are emitted at the start of the session before any response is rendered: ]11;rgb:0c0c/0c0c/0c0c This causes the first 1-3 characters of every response to be silently consumed, resulting in truncated output. The truncation is not consistent — sometimes 1 char, sometimes 2, sometimes 3. Affected platforms: Terminal (interactive) and Telegram gateway Steps to reproduce:

Run HERMES_HOME=/home/hermes/.hermes hermes as a non-root user Observe escape sequences emitted before any input is given Send any message (e.g. "hi") Observe that the first 1-3 characters of the response are missing

What was already tried:

streaming: enabled: false display.streaming: false final_response_markdown: strip transport: replace Adding environment_hint instructing the model not to emit leading characters Updating to v0.15.1

None of these resolved the issue. Environment:

Ubuntu 24, VPS Telegram gateway Model: deepseek/deepseek-v4-flash via OpenRouter

Steps to Reproduce

  1. Run Hermes as a non-root user: HERMES_HOME=/home/hermes/.hermes hermes
  2. Observe escape sequences emitted immediately before any input: ]11;rgb:0c0c/0c0c/0c0c
  3. Send any message (e.g. "hi")
  4. Observe that the first 1-3 characters of the response are missing in both terminal and Telegram gateway

Expected Behavior

Responses should start with the first character of the actual text, with no leading escape sequences or truncation.

Actual Behavior

Escape sequences ]11;rgb:0c0c/0c0c/0c0c are emitted at session start. The first 1-3 characters of every response are silently consumed, resulting in truncated messages. The truncation is inconsistent — sometimes 1 char, sometimes 2, sometimes 3. This happens in both interactive terminal mode and Telegram gateway.

Affected Component

Other

Messaging Platform (if gateway-related)

No response

Debug Report

Report       https://paste.rs/Ycd9O
  agent.log    https://paste.rs/DBoIC
  gateway.log  https://paste.rs/P9tXf

Operating System

Ubuntu 24.04, VPS (Contabo), non-root user

Python Version

No response

Hermes Version

0.15.1

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