Skip to content

[Bug]: Progress messages stop coalescing after approval — each trajectory becomes a separate message #9136

@yeepchen

Description

@yeepchen

Bug Description

Bug Description:

After an approval card is sent, subsequent tool progress messages are no longer coalesced via edit_message. Each progress update becomes a standalone message. In Feishu topic-mode groups, each creates a new topic (compounded by the routing bug in Issue #6969).

Steps to Reproduce

  1. Enable display.tool_progress_command: true
  2. Trigger a command that requires approval (e.g. a dangerous shell command)
  3. Observe: before approval, progress updates are coalesced into one message ✅
  4. After approval, each new progress update is a separate message ❌

Expected Behavior

Progress messages continue to be coalesced into a single message edited in-place throughout the entire task.

Actual Behavior

After approval, can_edit becomes permanently False. All subsequent progress messages are sent as individual messages.

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

No response

Operating System

Ubuntu 24.04

Python Version

3.11.15

Hermes Version

0.8.0

Relevant Logs / Traceback

Root Cause Analysis (optional)

Two issues compound:

  1. The approval card is sent outside the thread (Issue 1), breaking the edit target — the bot can no longer edit_message on a message it can't find in the thread context
  2. can_edit is permanently disabled on failure (run.py:7086) and never recovers

Proposed Fix (optional)

Primary fix is Issue 1 (root cause). Defensive hardening: on can_edit failure, reset progress_msg_id=None so the next iteration creates a fresh coalescing message and resumes editing.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions