openclaw - 💡(How to fix) Fix [Bug]: 2026.5.18 iMessage RPC client starts `imsg rpc` without `--json`

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…

The bundled iMessage client starts imsg rpc without --json, while this install only runs reliably with the RPC process started in JSON mode.

Error Message

throw new Error("Refusing to start imsg rpc in test environment; mock iMessage RPC client");

Root Cause

The bundled iMessage client starts imsg rpc without --json, while this install only runs reliably with the RPC process started in JSON mode.

Fix Action

Fix / Workaround

  1. Install OpenClaw from the source checkout at v2026.5.18.
  2. Configure the bundled imessage channel with cliPath=/opt/homebrew/bin/imsg.
  3. Start the Gateway and probe the iMessage channel.
  4. Compare the command OpenClaw starts with the locally patched command.

OpenClaw starts imsg rpc without --json. On this install, we have to patch the iMessage client to start imsg rpc --json.

The local checkout is still carrying that patch after upgrading to v2026.5.18:

Code Example

channels.imessage.cliPath=/opt/homebrew/bin/imsg
channels.imessage.dbPath=/Users/<user>/Library/Messages/chat.db

---

diff --git a/extensions/imessage/src/client.ts b/extensions/imessage/src/client.ts
index 323bba23e7..463a043151 100644
--- a/extensions/imessage/src/client.ts
+++ b/extensions/imessage/src/client.ts
@@ -88,7 +88,7 @@ export class IMessageRpcClient {
     if (isTestEnv()) {
       throw new Error("Refusing to start imsg rpc in test environment; mock iMessage RPC client");
     }
-    const args = ["rpc"];
+    const args = ["rpc", "--json"];
     if (this.dbPath) {
       args.push("--db", this.dbPath);
     }

---

$ git -C openclaw-src status --short
 M extensions/imessage/src/client.ts

$ openclaw --version
OpenClaw 2026.5.18 (50a2481)

$ openclaw channels status --probe --channel imessage
Gateway reachable.
- iMessage default: enabled, configured, running, works
RAW_BUFFERClick to expand / collapse

Existing issue check:

  • Related open issue: https://github.com/openclaw/openclaw/issues/81940
  • I did not find an exact open issue for the narrower imsg rpc --json command-line mismatch.
  • This may be better as a comment on #81940 if maintainers consider it part of the same iMessage RPC startup surface.

Bug type

Behavior bug.

Beta release blocker

No.

Summary

The bundled iMessage client starts imsg rpc without --json, while this install only runs reliably with the RPC process started in JSON mode.

Steps to reproduce

  1. Install OpenClaw from the source checkout at v2026.5.18.
  2. Configure the bundled imessage channel with cliPath=/opt/homebrew/bin/imsg.
  3. Start the Gateway and probe the iMessage channel.
  4. Compare the command OpenClaw starts with the locally patched command.

Expected behavior

OpenClaw should start imsg rpc in the mode that returns JSON-RPC responses consistently.

Actual behavior

OpenClaw starts imsg rpc without --json. On this install, we have to patch the iMessage client to start imsg rpc --json.

OpenClaw version

2026.5.18 (50a2481)

Operating system

macOS 26.3.1

Install method

Source checkout with pnpm build. Gateway runs from the built source checkout.

Model

N/A. This happens during iMessage channel startup before any model request.

Provider / routing chain

Gateway -> bundled imessage channel -> /opt/homebrew/bin/imsg rpc -> local Messages database.

Additional provider/model setup details

imsg is installed from steipete/tap.

iMessage channel configuration uses:

channels.imessage.cliPath=/opt/homebrew/bin/imsg
channels.imessage.dbPath=/Users/<user>/Library/Messages/chat.db

Logs, screenshots, and evidence

Current upstream source at v2026.5.18 starts RPC without --json:

diff --git a/extensions/imessage/src/client.ts b/extensions/imessage/src/client.ts
index 323bba23e7..463a043151 100644
--- a/extensions/imessage/src/client.ts
+++ b/extensions/imessage/src/client.ts
@@ -88,7 +88,7 @@ export class IMessageRpcClient {
     if (isTestEnv()) {
       throw new Error("Refusing to start imsg rpc in test environment; mock iMessage RPC client");
     }
-    const args = ["rpc"];
+    const args = ["rpc", "--json"];
     if (this.dbPath) {
       args.push("--db", this.dbPath);
     }

The local checkout is still carrying that patch after upgrading to v2026.5.18:

$ git -C openclaw-src status --short
 M extensions/imessage/src/client.ts

$ openclaw --version
OpenClaw 2026.5.18 (50a2481)

$ openclaw channels status --probe --channel imessage
Gateway reachable.
- iMessage default: enabled, configured, running, works

This is adjacent to #81940, where the launchd-managed Gateway can hang before the first chats.list response. The --json patch does not by itself fix the launchd hang, but it is still part of the local patch set required for the current iMessage deployment.

Impact and severity

Medium. Users who install a current imsg build that expects explicit JSON output can end up with an iMessage provider that is more fragile than it needs to be. On this install, the iMessage channel is only kept in service by carrying a local source patch across releases.

Additional information

This report is intentionally narrow. The launchd hang and stuck child process are already tracked in #81940. This report is about the command OpenClaw uses when it starts the RPC process.

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

OpenClaw should start imsg rpc in the mode that returns JSON-RPC responses consistently.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: 2026.5.18 iMessage RPC client starts `imsg rpc` without `--json`