hermes - 💡(How to fix) Fix [Bug]: Task completes silently — final message only sent after user interrupt [1 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

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Fix Action

Fixed

Code Example

Report       https://paste.rs/Zq5oj
  agent.log    https://dpaste.com/C2PY3LB6W
  gateway.log  https://dpaste.com/BX4LNGV4C

---
RAW_BUFFERClick to expand / collapse

Bug Description

Agent completes tasks successfully but doesn't send the final completion message until I interrupt to ask for status. The work is already done (files created, tools executed), but the turn never finishes on its own.

Steps to Reproduce

  1. Send long-running task request via Telegram (e.g., "convert report to audio")
  2. Agent starts work, sends status updates every 3 minutes
  3. Wait for completion (verify files created, check timestamps)
  4. Observe: no final "done" message sent
  5. Send interrupt: /status or "what's the status?"
  6. Observe: agent immediately responds "Done" with already-completed work

Expected Behavior

Agent should automatically send completion message when task finishes, without requiring user interrupt.

Actual Behavior

Example from May 7, 2026:

8:13 PM - User: "convert report to audio" 8:14 PM - Agent: "On it" [executes read_file ×7, text_to_speech ×13, ffmpeg] 8:16-8:28 PM - Agent sends status heartbeats every 3 min 8:28 PM - Last heartbeat: "15 min elapsed — receiving stream response" [silence - work is complete but no message sent] 8:29 PM - User: "What is status of audio file" 8:29 PM - Agent: "Done — full audio version is ready" [file already existed]

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

Telegram

Debug Report

Report       https://paste.rs/Zq5oj
  agent.log    https://dpaste.com/C2PY3LB6W
  gateway.log  https://dpaste.com/BX4LNGV4C

Operating System

macOS (Mac mini) 26.3.1

Python Version

No response

Hermes Version

v0.12.0

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

The bug is in gateway/run.py line 949. len(history) counts session_meta entries but agent_messages was built from filtered history, causing message retrieval to fail silently when the count mismatches. The completion message gets queued but never sent until user interrupt forces a flush.

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