Skip to content

Bot connects and syncs old messages, but silently ignores all new messages (no log output) #5819

@Schnurzel700

Description

@Schnurzel700

Bug Description

I am trying to set up the Hermes Agent with a matrix.org bot account. The bot successfully authenticates via password, connects, and automatically accepts room invites. Upon startup, it syncs old messages from the server.
However, when I send a new message to the bot (either in a DM or a newly created, unencrypted room), the bot does not respond. Furthermore, there is zero log output in the terminal running hermes gateway in the foreground, even with LOG_LEVEL=DEBUG and MATRIX_REQUIRE_MENTION=false. It seems the matrix-nio sync loop hangs after the initial sync or silently drops new live events.
Access Token method does also not work.

Steps to Reproduce

Configure ~/.hermes/.env with a Matrix account on matrix.org using MATRIX_PASSWORD (instead of an access token).

Set MATRIX_ALLOWED_USERS to your personal Matrix ID.

Set MATRIX_REQUIRE_MENTION=false, MATRIX_AUTO_THREAD=false, and LOG_LEVEL=DEBUG.

Delete the ~/.hermes/matrix/ directory to ensure a completely clean local state.

Start the gateway in the foreground: hermes gateway.

Create a completely new, unencrypted room in Element and invite the bot. (The bot successfully joins).

Send a message like Hello or /sethome in the room.

Observe the terminal.

Expected Behavior

With LOG_LEVEL=DEBUG active, the gateway should log the incoming matrix event. It should then process the message through the LLM pipeline (or handle the /sethome command) and send a response back to the room.

Actual Behavior

The bot silently ignores the message. There is absolutely no output in the terminal log when the new message is sent. The bot remains connected (it still accepts invites) but seems completely deaf to new text events.

Affected Component

Gateway (Telegram/Discord/Slack/WhatsApp)

Messaging Platform (if gateway-related)

No response

Operating System

Debian Linux

Python Version

Python 3.13.5

Hermes Version

Hermes Agent v0.7.0 (2026.4.3)

Relevant Logs / Traceback

┌─────────────────────────────────────────────────────────┐
│           ⚕ Hermes Gateway Starting...                 │
├─────────────────────────────────────────────────────────┤
│  Messaging platforms + cron scheduler                    │
│  Press Ctrl+C to stop                                   │
└─────────────────────────────────────────────────────────┘

# The bot successfully syncs old events on startup (showing expected decryption errors because ~/.hermes/matrix/ was wiped to ensure a clean E2EE state):
WARNING nio.crypto.log: Received a undecryptable Megolm event from a unknown device: @[USER]:matrix.org [DEVICE_ID]
WARNING nio.crypto.log: Error decrypting megolm event, no session found with session id [SESSION_ID] for room ![ROOM]:matrix.org
# ... [several similar warnings for old messages] ...

# After startup, when a new message is sent in a fresh unencrypted room, the log remains completely empty. No errors, no debug output.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions