Skip to content

[Bug]: iMessage channel plugin fails to load: Cannot find package 'openclaw' #49806

Description

@DuanXiaoWen

Bug type

Regression (worked before, now fails)

Summary

iMessage channel plugin fails to load with "Cannot find package 'openclaw'" error, causing gateway crash loop when enabled.

Steps to reproduce

  1. Install OpenClaw from pnpm workspace (moltbot)
  2. Configure channels.imessage.enabled: true in ~/.openclaw/openclaw.json
  3. Restart gateway
  4. Observe iMessage channel fails to start with package resolution error

Expected behavior

iMessage channel should start successfully and be able to send/receive messages.

Actual behavior

Channel fails to start with error:

error gateway/channels/imessage [default] channel exited: Cannot find package 'openclaw' imported from /Users/duanxiaowen/AI_Projects/moltbot/extensions/imessage/src/channel.runtime.ts

Gateway enters crash loop with auto-restart attempts.

OpenClaw version

2026.3.14

Operating system

macOS 25.3.0 (arm64)

Install method

pnpm dev (moltbot workspace)

Model

friday/MiniMax-M2.5

Provider / routing chain

local moltbot workspace

Config file / key location

No response

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

Root Cause:
iMessage extension uses import ... from "openclaw/plugin-sdk/..." but cannot resolve the 'openclaw' package in pnpm workspace environment.

Suggested Fix:
Add self-reference to moltbot/package.json:

{
  "dependencies": {
    "openclaw": "workspace:*"
  }
}

Temporary Workaround:
Set channels.imessage.enabled: false to prevent crash loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingregressionBehavior that previously worked and now fails

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions