-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Gateway: account-scoped channel config changes restart the entire channel and can disrupt active traffic #43935
Copy link
Copy link
Open
BingqingLyu/openclaw
#517Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Summary
When a config change only affects
channels.<channel>.accounts.<accountId>.*, the gateway currently plans a full channel restart instead of an account-scoped restart.This is visible in the reload pipeline even though the lower-level channel lifecycle already supports
startChannel(channelId, accountId?)/stopChannel(channelId, accountId?).In practice, this creates a wider hot-reload disruption window than necessary and can interrupt in-flight channel activity.
Observed behavior
For account-scoped changes such as:
channels.telegram.accounts.bgworker_bot.*the reload flow currently resolves to a full channel restart:
reload?: { configPrefixes: string[]; noopPrefixes?: string[] })restartChannels: Set<ChannelKind>restart-channel:${plugin.id}await stopChannel(name)await startChannel(name)For Telegram, this was observed to restart the entire Telegram channel and produce a transient failure window during active traffic, including log lines like:
restarting telegram channeltelegram sendChatAction failed: Network request for 'sendChatAction' failed!Expected behavior
If a changed path is strictly account-scoped:
channels.<channel>.accounts.<accountId>.*the reload plan should restart only that account when the channel lifecycle supports account-scoped start/stop.
Channel-wide restarts should still be used for:
channels.telegram.replyToModeCode pointers
Current coarse behavior is driven by:
src/channels/plugins/types.plugin.tssrc/gateway/config-reload-plan.tssrc/gateway/server-reload-handlers.tsLower-level account-scoped lifecycle already exists in:
src/gateway/server-channels.tsWhy this matters
This looks like a gateway reload planning limitation rather than a Telegram-specific implementation detail.
Even when the underlying provider can restart a single account, the current reload framework widens the blast radius to the whole channel.
Scope
This issue is about reload granularity only.
It does not claim that every observed Telegram outage was definitively caused by this behavior, and it does not propose broader reply/typing lifecycle changes in the same fix.