[Bug] Telegram connection failure causes the entire OpenClaw service to fail on startup #29

Open
opened 2026-02-15 17:04:37 -05:00 by yindo · 0 comments
Owner

Originally created by @TorosFanny on GitHub (Feb 12, 2026).

Description:
When the Telegram channel is enabled, if the service is unable to establish a connection to the Telegram API (due to network issues, DNS failure, or API timeouts), the entire openclaw process terminates. This prevents other functional parts of the gateway (such as the web interface or other active channels) from starting.

Environment:

  • OS: NixOS / Home Manager
  • OpenClaw Version: (Current main branch)

Steps to Reproduce:

  1. Configure the Telegram channel in home.nix:
programs.openclaw = {
  channels = {
    telegram = {
      enabled = true; # Enabled here
      botToken = "YOUR_BOT_TOKEN";
      dmPolicy = "pairing";
      allowFrom = [ 5456577721 ];
      mediaMaxMb = 20;
      streamMode = "partial";
    };
  };
};

  1. Run the service in an environment where the Telegram API is unreachable (e.g., no internet, or blocked by a firewall/proxy).

Actual Behavior:
The service attempts to connect to Telegram, fails, and then the process exits with an error. Systemd marks the service as failed.

Note: This is particularly problematic in regions with strict network environments where Telegram might be intermittently blocked.

Expected Behavior:
The service should handle connection errors gracefully. If Telegram is unreachable:

  1. It should log a warning/error.
  2. It should continue to start the rest of the application (so other channels remain usable).
  3. It should ideally attempt to reconnect to the Telegram API in the background.

Impact:
A single channel's connectivity issue should not be a "fatal error" for the entire system. Currently, it reduces the overall availability of the OpenClaw gateway.

Originally created by @TorosFanny on GitHub (Feb 12, 2026). **Description:** When the Telegram channel is enabled, if the service is unable to establish a connection to the Telegram API (due to network issues, DNS failure, or API timeouts), the entire `openclaw` process terminates. This prevents other functional parts of the gateway (such as the web interface or other active channels) from starting. **Environment:** * **OS:** NixOS / Home Manager * **OpenClaw Version:** (Current main branch) **Steps to Reproduce:** 1. Configure the Telegram channel in `home.nix`: ```nix programs.openclaw = { channels = { telegram = { enabled = true; # Enabled here botToken = "YOUR_BOT_TOKEN"; dmPolicy = "pairing"; allowFrom = [ 5456577721 ]; mediaMaxMb = 20; streamMode = "partial"; }; }; }; ``` 2. Run the service in an environment where the Telegram API is unreachable (e.g., no internet, or blocked by a firewall/proxy). **Actual Behavior:** The service attempts to connect to Telegram, fails, and then the process exits with an error. Systemd marks the service as `failed`. > *Note: This is particularly problematic in regions with strict network environments where Telegram might be intermittently blocked.* **Expected Behavior:** The service should handle connection errors gracefully. If Telegram is unreachable: 1. It should log a warning/error. 2. It should continue to start the rest of the application (so other channels remain usable). 3. It should ideally attempt to reconnect to the Telegram API in the background. **Impact:** A single channel's connectivity issue should not be a "fatal error" for the entire system. Currently, it reduces the overall availability of the OpenClaw gateway.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/nix-openclaw#29