{"record":{"id":"dd6a0ef290ea93a5","repo":"openclaw/openclaw","slug":"clickclack-discussions-require-exactly-one-enabled","errorCode":null,"errorMessage":"ClickClack discussions require exactly one enabled discussion account","messagePattern":"ClickClack discussions require exactly one enabled discussion account","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"extensions/clickclack/src/discussions/service.ts","lineNumber":187,"sourceCode":"          return { state: \"none\" };\n        }\n        this.#finalizePendingBinding(sessionKey, existing);\n        await this.#reconcileBinding(sessionKey, existing, resolved.account);\n        const current = this.#store.get(sessionKey);\n        if (!current) {\n          return { state: this.hasEnabledAccount() ? \"available\" : \"none\" };\n        }\n        return discussionInfoForBinding(current, resolved.account);\n      }\n      return { state: \"available\" };\n    });\n  }\n\n  async open(sessionKey: string): Promise<SessionDiscussionInfo> {\n    return await this.#withSessionLock(sessionKey, async () => {\n      const accounts = discussionAccounts(this.#currentConfig());\n      if (accounts.length > 1) {\n        throw new Error(\"ClickClack discussions require exactly one enabled discussion account\");\n      }\n      const account = accounts[0];\n      if (!account) {\n        return { state: \"none\" };\n      }\n      const existing = this.#store.get(sessionKey);\n      if (existing) {\n        const resolved = await this.#resolveBindingForUse(existing);\n        if (resolved.state === \"retargeted\") {\n          this.#revokeAndDeleteBinding(sessionKey, existing);\n        } else if (resolved.state === \"stale\") {\n          await this.#releaseStaleBinding(sessionKey, existing);\n        } else if (resolved.state === \"active\") {\n          this.#finalizePendingBinding(sessionKey, existing);\n          await this.#reconcileBinding(sessionKey, existing, resolved.account);\n          const current = this.#store.get(sessionKey);\n          if (current) {\n            return discussionInfoForBinding(current, resolved.account);","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/openclaw/openclaw/blob/01804a75319da4b69c9ab98ceaa30477e22b8c0b/extensions/clickclack/src/discussions/service.ts#L169-L205","documentation":"Thrown by DiscussionService.open when discussionAccounts(config) returns more than one enabled ClickClack account. The discussion subsystem supports exactly one enabled discussion account at a time to avoid ambiguity in channel binding ownership.","triggerScenarios":"Calling DiscussionService.open when the ClickClaw config has two or more accounts with discussions enabled (enabled: true). Each account would produce a different binding destination, so the service refuses to pick.","commonSituations":"Operator adds a second ClickClaw account for testing or migration but forgets to disable the old one; config merge or environment override accidentally enables a second account; multi-account config intended for gateway use but discussions only supports one.","solutions":["Edit openclaw config to set enabled: true on exactly one ClickClack account that owns discussions.","Disable or remove the extra ClickClaw account entries from config.","Run openclaw configure to interactively select the single discussion account.","Run openclaw doctor --fix to detect and report the multi-account discussion conflict."],"exampleFix":"// before: two accounts enabled\n{\n  \"clickclack\": {\n    \"accounts\": [\n      { \"accountId\": \"prod\", \"enabled\": true, \"discussions\": { \"enabled\": true } },\n      { \"accountId\": \"staging\", \"enabled\": true, \"discussions\": { \"enabled\": true } }\n    ]\n  }\n}\n// after: exactly one discussion account\n{\n  \"clickclack\": {\n    \"accounts\": [\n      { \"accountId\": \"prod\", \"enabled\": true, \"discussions\": { \"enabled\": true } },\n      { \"accountId\": \"staging\", \"enabled\": false }\n    ]\n  }\n}","handlingStrategy":"validation","validationCode":"import { discussionAccounts } from \"./discussions/eligibility.js\";\n\nfunction validateSingleDiscussionAccount(cfg: CoreConfig): void {\n  const accounts = discussionAccounts(cfg);\n  if (accounts.length > 1) {\n    throw new Error(\n      `Expected exactly one enabled ClickClack discussion account, found ${accounts.length}: ${accounts.map((a) => a.accountId).join(\", \")}`,\n    );\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Before calling DiscussionService.open, validate that exactly one ClickClack account has discussions enabled.","Use openclaw configure to manage accounts interactively and avoid accidental multi-enable.","Run openclaw doctor to detect multi-account discussion configuration conflicts."],"tags":["discussions","config","multi-account","validation"],"backgroundTag":null,"analyzedSha":"01804a75319da4b69c9ab98ceaa30477e22b8c0b","analyzedAt":"2026-08-12T04:37:58.197Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}