#6512

autocompact of heartbeat's session would "leak" "context compacted" message to the last updated channel

OpenDawn-Xu-helloworldopened 2d ago

Bug Description

It appears that after each heartbeat, the channel last used by the user is opened in an attempt to report the situation to the user However, the issue is that the "context compacted" notification produced by the autoCompact of the Heartbeat session is subsequently sent to the user through this channel. This causes the user to see the context compacted notification in the session they last used after each heartbeat, even if the heartbeat returns nothing.

Steps to Reproduce

  1. configure a non-websocket channel
  2. setup a heartbeat prompt that make LLM send nothing
  3. use this channel to speak some useless
  4. after a heartbeat, channel return "compressing context"and "context compacted"

Expected Behavior

"compressing context"and "context compacted" trigger by autoCompact wouldn't leak to any channel

Relevant Logs

undefined

nanobot Version

0.3.5

Python Version

3.14.9

Operating System

Linux gentoo

Channel / Platform

websocket& QQ bot

LLM Provider

opencode go

Model

No response

Browser

No response

Connection

No response

Configuration (Optional)

undefined

Additional Context

No response

Activity

0

No activity yet.