openclaw - 💡(How to fix) Fix [Bug]: openclaw-weixin outbound rejects every target (including filehelper) — host resolver requires directory or messagingTarget hook plugin doesn't expose [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#75771Fetched 2026-05-02 05:30:26
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

On 2026.4.29, openclaw message send --channel openclaw-weixin --target <any> rejects every target form with Unknown target "<value>" for openclaw-weixin. The plugin (@tencent-weixin/[email protected]) is loaded and the channel runtime is running; the failure is in the host's outbound target resolver, not the plugin's sendMessage API (which accepts arbitrary to_user_id strings).

Error Message

$ openclaw message send --channel openclaw-weixin --account <id> --target filehelper --message "x" --dry-run Error: Unknown target "filehelper" for openclaw-weixin.

Root Cause

  1. Directory lookup (getDirectoryEntries) — empty for this channel; this is also affected by the install-prompt regression filed separately, so populating the directory is currently not possible without clobbering the install.
  2. Plugin-side fallback maybeResolvePluginMessagingTarget — returns null because the plugin does not register a messagingTarget hook. From ~/.openclaw/extensions/openclaw-weixin/index.ts the plugin only calls api.registerChannel({ plugin: weixinPlugin }).
  3. Throws unknownTargetError.

Code Example

openclaw message send --channel openclaw-weixin --account <id> --target someuser           --message "x" --dry-run
openclaw message send --channel openclaw-weixin --account <id> --target wxid_someuser      --message "x" --dry-run
openclaw message send --channel openclaw-weixin --account <id> --target @someuser          --message "x" --dry-run
openclaw message send --channel openclaw-weixin --account <id> --target user:someuser      --message "x" --dry-run
openclaw message send --channel openclaw-weixin --account <id> --target filehelper         --message "x" --dry-run

---

$ openclaw message send --channel openclaw-weixin --account <id> --target filehelper --message "x" --dry-run
Error: Unknown target "filehelper" for openclaw-weixin.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On 2026.4.29, openclaw message send --channel openclaw-weixin --target <any> rejects every target form with Unknown target "<value>" for openclaw-weixin. The plugin (@tencent-weixin/[email protected]) is loaded and the channel runtime is running; the failure is in the host's outbound target resolver, not the plugin's sendMessage API (which accepts arbitrary to_user_id strings).

Steps to reproduce

  1. OpenClaw 2026.4.29 (a448042) with @tencent-weixin/[email protected] installed and channel running (confirmed via channels status).
  2. Try any of the following (all --dry-run, all fail at validation before reaching the plugin):
openclaw message send --channel openclaw-weixin --account <id> --target someuser           --message "x" --dry-run
openclaw message send --channel openclaw-weixin --account <id> --target wxid_someuser      --message "x" --dry-run
openclaw message send --channel openclaw-weixin --account <id> --target @someuser          --message "x" --dry-run
openclaw message send --channel openclaw-weixin --account <id> --target user:someuser      --message "x" --dry-run
openclaw message send --channel openclaw-weixin --account <id> --target filehelper         --message "x" --dry-run
  1. Observe Error: Unknown target "<value>" for openclaw-weixin. in every case, including filehelper (WeChat's built-in universal self-target which exists on every account by definition).

Expected behavior

Outbound resolution should reach the plugin's sendMessage for at least the universal-target case (filehelper), and ideally pass through arbitrary opaque strings when the channel plugin (a) is loaded, (b) has no cached directory contents yet, and (c) does not register a messagingTarget resolver hook — letting the plugin do its own validation of the to_user_id.

Actual behavior

Resolver fails before invoking the plugin. From dist/target-resolver-DtKf-C6e.js (lines 280–326):

  1. Directory lookup (getDirectoryEntries) — empty for this channel; this is also affected by the install-prompt regression filed separately, so populating the directory is currently not possible without clobbering the install.
  2. Plugin-side fallback maybeResolvePluginMessagingTarget — returns null because the plugin does not register a messagingTarget hook. From ~/.openclaw/extensions/openclaw-weixin/index.ts the plugin only calls api.registerChannel({ plugin: weixinPlugin }).
  3. Throws unknownTargetError.

The plugin's to_user_id field is an opaque string (verified at ~/.openclaw/extensions/openclaw-weixin/src/messaging/send.ts lines 17–39 — to_user_id: to, no validation), so the host's pre-validation is the only blocker.

OpenClaw version

2026.4.29 (a448042)

Operating system

Ubuntu 24.04 (Linux 6.8.0)

Install method

npm global

Model

openai-codex/gpt-5.5 (not relevant to this defect)

Provider / routing chain

openclaw -> openai-codex (not relevant to this defect)

Additional provider/model setup details

NOT_ENOUGH_INFO

Logs, screenshots, and evidence

$ openclaw message send --channel openclaw-weixin --account <id> --target filehelper --message "x" --dry-run
Error: Unknown target "filehelper" for openclaw-weixin.

Same error for vanity, wxid_*, @-prefixed, and user:-prefixed forms.

Impact and severity

Blocks all CLI-driven outbound on this channel (including legitimate self-tests via filehelper). The session-bound reply path used by the inbound→agent-reply flow is unaffected, since it does not traverse this resolver — runtime production traffic continues to work.

Additional information

Related but distinct: #55338 (closed 2026-04-25). That issue addressed unknownTargetError when the requested channel plugin was missing from the active registry (host-side bootstrap fix in channel-resolution.ts + target-resolver.ts). Our case differs — the plugin is in the active registry and the channel is running; the failure is downstream of plugin resolution, in the directory + maybeResolvePluginMessagingTarget fallback layer.

NOT_ENOUGH_INFO on whether earlier 2026.4.x releases passed filehelper through (was not exercised on 2026.4.26 prior to upgrade).

extent analysis

TL;DR

The issue can be resolved by modifying the host's target resolver to bypass validation for the openclaw-weixin channel when the plugin is loaded and does not register a messagingTarget hook.

Guidance

  • The root cause of the issue is the host's pre-validation of the target, which fails before invoking the plugin's sendMessage API.
  • To verify the issue, try sending a message with the --dry-run flag and observe the Unknown target error.
  • To mitigate the issue, consider modifying the target-resolver-DtKf-C6e.js file to bypass validation for the openclaw-weixin channel when the plugin is loaded and does not register a messagingTarget hook.
  • Investigate why the plugin does not register a messagingTarget hook and consider adding it to handle target resolution.

Example

No code example is provided as the issue requires modifications to the OpenClaw host code.

Notes

The issue is specific to the openclaw-weixin channel and the openclaw version 2026.4.29. Earlier versions may not be affected.

Recommendation

Apply a workaround by modifying the host's target resolver to bypass validation for the openclaw-weixin channel when the plugin is loaded and does not register a messagingTarget hook, as this will allow the plugin's sendMessage API to handle target resolution.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Outbound resolution should reach the plugin's sendMessage for at least the universal-target case (filehelper), and ideally pass through arbitrary opaque strings when the channel plugin (a) is loaded, (b) has no cached directory contents yet, and (c) does not register a messagingTarget resolver hook — letting the plugin do its own validation of the to_user_id.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING