Skip to content

Bug: gateway_restart_notification config setting silently ignored #24644

@b4lduin

Description

@b4lduin

Bug: gateway_restart_notification config setting has no effect

Problem

The PlatformConfig.gateway_restart_notification field exists on the dataclass (gateway/config.py line 281), is serialized by to_dict(), and is parsed by from_dict(). However, setting it in config.yaml has no effect — shutdown/restart notifications are always sent regardless of the setting.

Root Cause

The config loader in load_gateway_config() (lines 758–825) bridges specific keys from top-level platform sections (e.g. telegram:) in config.yaml into the internal platforms dict. The bridge list includes keys like require_mention, dm_policy, group_policy, etc., but gateway_restart_notification is missing from the bridge list.

This means:

  1. User sets gateway_restart_notification: false under telegram: in config.yaml
  2. The config loader never copies it into the platforms data
  3. PlatformConfig.from_dict() never sees it → defaults to True
  4. The suppression check at gateway/run.py line 2767 always evaluates to True (send notification)

Evidence

Gateway log shows notifications being sent despite gateway_restart_notification: false in config:

Sent shutdown notification to active chat telegram:xxx
Sent shutdown notification to home channel telegram:xxx

Fix

Add gateway_restart_notification to the bridge list in load_gateway_config() (after line 800 in gateway/config.py):

if "gateway_restart_notification" in platform_cfg:
    bridged["gateway_restart_notification"] = platform_cfg["gateway_restart_notification"]

Related Issues

Environment

  • Hermes Agent: v2026.5.12
  • Platform: Telegram gateway
  • OS: Proxmox LXC (Debian)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/configConfig system, migrations, profilescomp/gatewayGateway runner, session dispatch, deliveryplatform/telegramTelegram bot adaptersweeper:implemented-on-mainSweeper: behavior already present on current maintype/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