Goal
Configure Telegram multi-account routing so a specific account (for example luna) is bound to an independent agent, without breaking the main bot.
Hard Rules
- Never claim success based only on config write or restart.
- Always distinguish:
- config write success
- service restart success
- routing/deployment success
- Validate against current installed version behavior, not assumed docs.
- On OpenClaw 2026.3.2, do not place routing under
agents.bindings. - Preserve main bot availability.
- Prefer supported CLI workflows over speculative manual JSON edits.
Trigger Conditions
- The user wants to add a child/sub agent to Telegram with its own bot account.
- A Telegram account is healthy in status/health but still routes to
agent:main:*. - The user wants one OpenClaw gateway to host multiple Telegram bots mapped to different agents.
- A previous attempt used the wrong config layer and broke routing.
Execution Procedure
- Baseline checks:
openclaw config validate
openclaw status --deep
openclaw health --json
- If config is invalid due to misplaced routing config such as
agents.bindings, remove the invalid key and revalidate. - Backup config file:
cp ~/.openclaw/openclaw.json ~/.openclaw/openclaw.json.bak_$(date +%Y%m%d-%H%M%S)
- Confirm the target agent exists:
openclaw agents list --json
- If needed, create or prepare the target Telegram account under
channels.telegram.accounts.<accountId>. - Create routing via the supported CLI:
openclaw agents bind --agent <agentId> --bind telegram:<accountId> --json
- Verify the binding persisted:
openclaw agents bindings --json
openclaw agents list --bindings --json
- Restart gateway:
openclaw gateway restart
- Re-check service health:
openclaw status
openclaw health --json
- Verify outbound delivery from the target Telegram account:
openclaw message send --channel telegram --account <accountId> --target <chatId> --message "<probe>" --json
- Verify inbound routing proof:
- Ask the user to reply to the probe text from Telegram.
- Inspect sessions/logs and prove the session key lands under
agent:<agentId>:rather thanagent:main:.
Evidence Checklist
The final report must include all of the following:
- Binding object exists (
channel=telegram,accountId=<id>,agentId=<agent>). - Config validates.
- Gateway restarted successfully.
- Outbound message from the target account succeeded.
- Inbound message routed to the target agent session key.
- Main bot still healthy.
Failure Modes and Handling
- If
agents.bindingsappears on OpenClaw 2026.3.2: remove it and switch to the supported CLI routing workflow. - If docs conflict with runtime: trust installed runtime + CLI behavior.
- If route proof is unavailable because the user has not replied yet: mark the setup as
pending external inbound verification; do not claim fully complete.
Output Contract
Always output:
- Root cause or setup objective.
- Exact commands executed.
- What changed in config or routing state.
- Verification evidence with concrete outputs.
- Remaining blocker (if any).