openclaw-weixin
Bring OpenClaw into WeChat
A community-maintained OpenClaw WeChat channel plugin available from npm and ClawHub. This plugin requires OpenClaw >=2026.6.1. See the compatibility matrix for pinned OpenClaw 2026.9.1 / 2026.9.2 / 2026.9.4 coverage and runtime/platform CI targets.
Choose an installation method
Copy the prompt or Run a command
Let OpenClaw complete the installation
Paste this prompt into an OpenClaw chat and send it:
Use the official OpenClaw CLI to install/update the community-maintained WeChat plugin to the latest version in the background, non-interactively: update existing installations from their current source without reusing an old version number; for new installations, prefer clawhub:openclaw-wechat and use npm:openclaw-weixin only if that source is unavailable.
Preserve configuration and login state, handle confirmations in chat, and verify the version at the end.Run a command directly
Community plugin previously installed with one of the ClawHub or npm commands below: run openclaw plugins update openclaw-weixin.
First installation, replacing Tencent's official package, or an existing plugin installed from another source: choose one installation command below; do not uninstall first. When replacing an existing plugin, add --force to the chosen installation command. Configuration and login state are preserved.
ClawHub: openclaw-wechat
openclaw plugins install clawhub:openclaw-wechatnpm: openclaw-weixin
openclaw plugins install npm:openclaw-weixinIf this OpenClaw instance already has a WeChat login, you usually only need to confirm the connection after installation. For a new installation, open the full check and scan the QR code. Use it as well when installation fails, the connection does not return automatically, or you need to confirm the intended account.
Full check, QR login, and recovery
The install command reports an incompatible version
Check only when installation reports an incompatible version:
openclaw --versionThe plugin requires OpenClaw >=2026.6.1. If the host is too old or Nix mode disables installation, do not uninstall the existing plugin. Follow the installation limitations and troubleshooting.
The connection does not return after installation
Installation can automatically reload a managed Gateway with configuration reload enabled. If it remains disconnected, restart the service, container, or pod that actually runs OpenClaw, then run:
openclaw plugins list
openclaw channels status --probeYou are connected when all of these are true:
openclaw plugins listshows the plugin enabled with no load error.openclaw channels status --probesucceeds for the intended WeChat account.- With multiple accounts, the result belongs to the alias or account ID you intend to use.
| Result | Next action |
|---|---|
| Plugin is disabled | Run openclaw plugins enable openclaw-weixin, reload the Gateway, then probe again |
| Plugin has no load error and the intended account passes the probe | You are done |
| Account is not logged in | Continue to QR login below |
Channel shows OK but does not connect | Follow connection troubleshooting to reload the actual runtime |
The status reports no login
Run this only when the probe reports that the intended account is not logged in:
openclaw plugins enable openclaw-weixin
openclaw channels login --channel openclaw-weixinThe login command displays a QR code in the terminal. Scan it, wait for login to finish, then run:
openclaw channels status --probeMultiple accounts
Before using multiple WeChat accounts, consider isolating direct-message context by account + channel + sender:
openclaw config set session.dmScope per-account-channel-peerThis is a global OpenClaw session setting that affects every channel. It does not change account login; it controls how subsequent direct messages are assigned to sessions.
Run the login command again to bind another WeChat account. Prefer a stable alias per number so openclaw.json / bindings can use a readable accountId instead of only the server hash:
openclaw channels login --channel openclaw-weixin --account alice
openclaw channels login --channel openclaw-weixin --account bobAccount IDs and state files
A successful login writes:
openclaw-weixin/accounts/<normalized ilink_bot_id>.json(credential + state namespace;listAccountIds/ monitors use only this id)openclaw-weixin/account-aliases.json(1:1alias → hashmap for bindings / outbound resolution; aliases never start a second transport)
Without --account (the host passes its default sentinel), only the server bot id is indexed; a default account file is never created. Re-running login --account <alias> against an already-bound hash-only install records an alias mapping when unambiguous, without an online rename or state-namespace move.
Credentials, account IDs, and context tokens are sensitive. Do not share state files from ~/.openclaw/openclaw-weixin/.
Proactive and scheduled sends
The WeChat backend requires every outbound message to carry an account-scoped context token issued by an inbound message from that recipient. The plugin stores the token under the receiving account:
- If the recipient has not messaged the bot or the token is missing, the plugin refuses delivery instead of returning a local success result.
- A stored token can still become stale. If a send fails after a long idle period, ask the recipient to message the corresponding bot once to refresh the token, then retry.
Scheduled jobs in multi-account deployments should explicitly set both delivery.to and delivery.accountId. Without accountId, delivery proceeds only when account-scoped context selects exactly one account; missing or ambiguous context fails. Context tokens are sensitive: never copy them between accounts or put them in job configuration.
Documentation and support
- Detailed guide: install behavior, optional settings, proactive-send constraints, uninstall, and troubleshooting
- Community and Tencent distributions
- Backend API protocol
- Architecture
- Contributing and agent workflows: open issues, fix bugs, and develop features
- Coding agent guide
- Changelog
- Security policy
- Issue tracker
- llms.txt: machine-readable documentation index