Skip to content

Critical: Slack Channel with Invalid Bot Causes Gateway Hang #32366

@joemcurry

Description

@joemcurry

GitHub Issue: Slack Channel with Invalid Bot Causes Gateway Hang

Priority: Critical/High

Summary

When a Slack bot is removed from a Slack workspace while still configured in OpenClaw channels, the gateway enters an infinite retry loop and becomes completely unresponsive. The entire gateway hangs and cannot be restarted until the invalid channel is manually removed via CLI.

Steps to Reproduce

  1. Configure a Slack channel with a bot (e.g., coder channel)
  2. Remove the bot from the Slack workspace (or deactivate the bot account)
  3. The OpenClaw config still has the channel configured
  4. Try to start or restart the gateway

Expected Behavior

  • Gateway should log the error once
  • Gateway should skip the invalid channel and continue running
  • Other channels should work normally
  • Invalid channel should be automatically disabled or flagged

Actual Behavior

  • Gateway retries the invalid channel every ~1.5 seconds indefinitely
  • Entire gateway becomes unresponsive
  • Cannot restart gateway
  • Must manually run openclaw channels remove <channel> to recover

Log Evidence

[slack] [coder] starting provider
Unhandled promise rejection: Error: An API error occurred: account_inactive
[slack] [coder] starting provider
Unhandled promise rejection: Error: An API error occurred: account_inactive
[ERROR] socket-mode:SocketModeClient:0 Failed to retrieve a new WSS URL (error: Error: An API error occurred: invalid_auth)
[slack] socket mode failed to start. retry 1/12 in 2s (An API error occurred: invalid_auth)
[slack] [coder] starting provider
Unhandled promise rejection: Error: An API error occurred: account_inactive
... (repeats indefinitely)

Environment

  • OpenClaw version: (fill in with openclaw --version)
  • OS: macOS (Darwin 25.3.0 arm64)
  • Slack channel type: bot user

Impact

  • Severity: High - Causes complete gateway outage
  • User Experience: Poor - Requires manual CLI intervention to recover
  • Workaround: Manual - Must run openclaw channels remove <channel> from CLI

Suggested Fixes

Short-term

  1. Catch account_inactive and invalid_auth errors specifically
  2. Log error once and skip the channel (don't retry)
  3. Continue gateway startup for other valid channels

Long-term

  1. Add auto-disable for invalid channels
  2. Add health check on startup to validate channels
  3. Add retry limit with exponential backoff (max 3 retries, then skip)
  4. Add CLI command to list invalid channels: openclaw channels validate

Workaround for Users

# List channels
openclaw channels list

# Remove invalid channel
openclaw channels remove <channel-name>

# Restart gateway
openclaw gateway restart

Related Files

  • Slack provider initialization code
  • Channel configuration validation
  • Error handling for Slack API errors

Date Reported

2026-03-02

Reported By

OpenClaw user (Joe Curry)

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