Skip to content

[Bug]: doctor rejects agentId on telegram topic config despite runtime support #50574

@jescalan

Description

@jescalan

Bug type

Behavior bug (incorrect output/state without crash)

Summary

The openclaw doctor command flags agentId on per-topic Telegram config as an unrecognized key and strips it, even though the runtime correctly reads and routes based on topicConfig.agentId.

Example config:

channels: {
  telegram: {
    groups: {
      "-1003806191278": {
        topics: {
          "214": { agentId: "test" },
          // ...
        }
      }
    }
  }
}

This does work, but is flagged by openclaw doctor as invalid as such:

Config invalid
● channels.telegram.groups.-1003806191278.topics.214: Unrecognized key: "agentId"
...

Running openclaw doctor --fix strips all agentId values from topics, breaking per-topic agent routing.

The feature was shipped in #33647 and works at runtime — topicAgentId: topicConfig?.agentId is present in the routing code. The issue is the TypeBox config schema used by doctor for validation has additionalProperties: false on the topic config object but doesn't include agentId in the property list.

Same class of bug as #35498 (which added editMessage and createForumTopic to the Telegram actions schema). Happy to submit a small PR to patch this if that sounds ok.

Steps to reproduce

  1. Add agentId to telegram topics config
  2. Run openclaw doctor, note the error

Expected behavior

openclaw doctor does not error for the agentId key, which is valid, and works

Actual behavior

it does error

OpenClaw version

2026.3.13

Operating system

Ubuntu

Install method

pnpm

Model

opus-4.6

Provider / routing chain

loopback

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions