openclaw/openclaw · error · Error

Buzz bot no longer has the Bot role in room ${channelId}

Error message

Buzz bot no longer has the Bot role in room ${channelId}

What it means

Thrown after a successful membership refresh reveals the bot's role is no longer 'bot' or the bot is no longer in the members set. The room is added to blockedRooms and the error propagates, signaling the bot has been demoted or kicked from the Buzz room.

Source

Thrown at extensions/buzz/src/room-membership-tracker.ts:200

      const pending = pendingMemberships.get(channelId);
      const pendingMatches =
        !pending ||
        [...pending].every(
          ([publicKey, expected]) => refreshed.members.has(publicKey) === (expected === "present"),
        );
      const botMembershipChanged = pending?.has(params.botPublicKey) === true;
      if (
        !pendingMatches ||
        (botMembershipChanged && !isNewerBuzzRoomMembership(refreshed, baseline))
      ) {
        continue;
      }
      if (
        refreshed.roles.get(params.botPublicKey) !== "bot" ||
        !refreshed.members.has(params.botPublicKey)
      ) {
        blockedRooms.add(channelId);
        throw new Error(`Buzz bot no longer has the Bot role in room ${channelId}`);
      }
      memberships.set(channelId, refreshed);
      pendingMemberships.delete(channelId);
      deniedMembers.delete(channelId);
      blockedRooms.delete(channelId);
      params.onMembershipsChanged?.(effectiveMemberships());
      return;
    }
    if (state.generation !== state.lastAttemptedGeneration) {
      return;
    }
    blockedRooms.add(channelId);
    throw new Error(`Could not refresh Buzz room membership for ${channelId}`);
  };

  const refreshMembershipOnce = (channelId: string): Promise<void> => {
    const current = refreshes.get(channelId);
    if (current) {

View on GitHub (pinned to 01804a7531)

Solutions

  1. Re-grant the Bot role to the bot public key in the affected Buzz room.
  2. Re-add the bot account to the room membership if it was removed.
  3. Remove the affected channelId from the OpenClaw Buzz configuration if the room is no longer intended for the bot.
  4. Audit room admin actions to identify who revoked the role.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  await refreshMembership(channelId, state);
} catch (error) {
  if (/Buzz bot no longer has the Bot role/.test(String(error))) {
    // surface to operator: re-grant role or remove room from config
    notifyOperator(`Bot lost Bot role in ${channelId}`);
    return;
  }
  throw error;
}

Prevention

When it happens

Trigger: An administrator changed the bot's role away from 'bot', removed the bot from the room, or the membership refresh fetched a state where the bot lost privileges. Only thrown when the refreshed membership is newer/valid (passes pendingMatches and recency checks).

Common situations: Manual admin action revoking bot permissions, a competing reconfiguration, or an organizational policy change removing the bot from the room.

Related errors


AI-assisted analysis of openclaw/openclaw@01804a7531 (2026-08-12). Data as JSON: /api/errors/92bcea96e56e9324. Report an issue: GitHub.