Skip to content

[Feature] Auto-delete tool progress messages after completion #4882

@phj1081

Description

@phj1081

Problem

When display.tool_progress is set to new or all, progress messages (e.g. 🔧 terminal, 🔍 search_files) accumulate in the chat on messaging platforms (Discord, Telegram). These are useful while the agent is working, but once the final response is delivered, they become clutter.

Proposed Solution

Add a config option to automatically delete progress messages after the agent completes its response:

display:
  tool_progress: new
  auto_delete_progress: true   # delete progress messages after final response

Behavior

  • Progress messages appear as usual during agent execution (single updating message, one line per tool)
  • Once the final response is sent, the progress message is deleted
  • The final response itself remains
  • This keeps the chat clean while still providing real-time feedback during long operations

Current Workaround

Manually patching gateway/run.py to call adapter.delete_message() on the progress message ID after the agent loop completes. This works well but needs to be re-applied on every update.

Additional Context

  • The progress message ID is already tracked internally (progress_msg_id / _progress_msg_id_ref)
  • delete_message() is already implemented on Discord and Telegram adapters
  • This is essentially a few lines of cleanup code, but having it as a built-in config option would be much more maintainable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions