openclaw - ✅(Solved) Fix Docs: iMessage cliPath wrappers must stream JSON-RPC stdio incrementally [1 pull requests, 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#84330Fetched 2026-05-20 03:41:26
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
1
Timeline (top)
labeled ×4commented ×1cross-referenced ×1

The iMessage docs explain that channels.imessage.cliPath can point to an SSH/custom wrapper, but they do not currently call out an important interoperability requirement: the wrapper/proxy must forward JSON-RPC stdin/stdout incrementally. It must not wait for EOF or a large fixed-size buffer before forwarding data.

A wrapper that reads with a large blocking read(N) can make small JSON-RPC messages such as chats.list sit indefinitely, producing symptoms like imsg rpc timeout (chats.list) even though imsg rpc itself is working.

Root Cause

The failure mode looks like an OpenClaw/iMessage channel outage (imsg rpc timeout), but the root cause is wrapper buffering. A short note would make custom remote iMessage deployments much easier to diagnose and avoid.

Fix Action

Fixed

PR fix notes

PR #84347: docs(imessage): warn that cliPath wrappers must stream JSON-RPC stdio (#84330)

Description (problem / solution / changelog)

Fixes #84330.

docs/channels/imessage.md documents that channels.imessage.cliPath can be pointed at an SSH/custom wrapper but doesn't call out a critical interoperability requirement: the wrapper must forward JSON-RPC stdin/stdout incrementally. The OpenClaw iMessage channel exchanges small newline-framed JSON-RPC frames over the wrapper's stdio for the channel's entire lifetime. A wrapper that reads with a large blocking read(N) or buffers stdin until EOF will make small frames like chats.list sit indefinitely, producing symptoms that look exactly like an iMessage outage (imsg rpc timeout (chats.list), repeated channel restarts) even though imsg rpc itself is fine.

Changes

  • docs/channels/imessage.md: add a <Warning> block inside the "Remote Mac over SSH" Tab listing the six interoperability requirements the issue calls out (forward stdin/stdout promptly, preserve newlines, don't wait for EOF, avoid fixed-size blocking reads, keep stderr separate). Cite the exact symptom phrasing the issue uses (imsg rpc timeout) so operators searching for that error find the warning. Note the practical pitfall that pipelines like ssh host imsg | grep ... need stdbuf -oL -eL on every stage to stay safe — line-buffered tools can still hold frames otherwise.

Diff stat: 1 file, +12 / -0. Documentation-only.

Real behavior proof

  • Behavior or issue addressed: Sanitized issue evidence — the issue describes that a custom stdio bridge wrapper using a large blocking read(N) produced imsg rpc timeout (chats.list) until the wrapper was changed to forward bytes/lines as soon as they were available. The fix documents this constraint at the spot operators actually look.

  • Real environment tested: Local Node 22.x. Probe at /tmp/probe_84330.mjs (a) verifies the <Warning> block was added to docs/channels/imessage.md and lives inside the "Remote Mac over SSH" Tab, (b) checks coverage against the issue's "Expected Documentation" list — all six bullets present (forward stdin/stdout promptly, preserve newlines, don't wait for EOF, avoid fixed-size blocking reads, keep stderr separate), (c) confirms the exact symptom phrasing imsg rpc timeout is cited so operators searching for that error find this section, (d) confirms surrounding sections (Tab intro + Requirements heading) are unchanged, (e) checks <Warning> open/close tags are balanced.

  • Exact steps or command run after this patch: node /tmp/probe_84330.mjs

  • Evidence after fix:

PASS: <Warning> block added that mentions cliPath wrapper
PASS: warning block lives inside the 'Remote Mac over SSH' Tab
PASS: all 6 required bullets from issue's "Expected Documentation" are covered
PASS: warning cites the exact symptom from the issue ('imsg rpc timeout')
PASS: surrounding sections (Tab intro + Requirements heading) are unchanged
PASS: <Warning> open/close tags balanced (4 pairs)

ALL CASES PASS
  • Observed result after fix: Operators following the "Remote Mac over SSH" Tab now see the streaming requirement directly under the wrapper-script example. The Warning calls out the visible symptom (imsg rpc timeout), the structural requirements, and a common pitfall (grep pipelines without stdbuf -oL) that produces the same failure mode.

  • What was not tested: No iMessage instance was actually run against a buffering wrapper to reproduce the symptom — this is a documentation-only change to an existing operator-facing manual page. The doc updates the section the issue explicitly suggests in "Suggested Location" (docs/channels/imessage.md near the Remote Mac over SSH wrapper section).

Audit (per CLAUDE rules — all 5 steps)

  • Existing-helper check: No code helper introduced — documentation block additive. The <Warning> Mintlify component is the established callout convention used throughout this doc and across the docs site. PASS
  • Shared-helper caller check: No code is being modified, so no caller-side contracts exist. PASS
  • Broader-fix rival scan: gh pr list --search '84330 in:title,body' and gh pr list --search 'iMessage cliPath wrapper' return no open PRs. Issue timeline shows zero cross-references. PASS
  • Recent-merge audit: git log --oneline -5 -- docs/channels/imessage.md shows no recent commits touching this file. PASS
  • Prototype-pollution scan: N/A — markdown.

Changed files

  • docs/channels/imessage.md (modified, +12/-0)
RAW_BUFFERClick to expand / collapse

Summary

The iMessage docs explain that channels.imessage.cliPath can point to an SSH/custom wrapper, but they do not currently call out an important interoperability requirement: the wrapper/proxy must forward JSON-RPC stdin/stdout incrementally. It must not wait for EOF or a large fixed-size buffer before forwarding data.

A wrapper that reads with a large blocking read(N) can make small JSON-RPC messages such as chats.list sit indefinitely, producing symptoms like imsg rpc timeout (chats.list) even though imsg rpc itself is working.

Observed Behavior

With a custom stdio bridge wrapper:

  • OpenClaw started imsg rpc successfully.
  • iMessage channel health could show as configured/running or repeatedly restart.
  • JSON-RPC requests such as chats.list timed out.
  • The underlying issue was the wrapper buffering small stdin/stdout frames until EOF or a large buffer filled.
  • Changing the wrapper to forward data as soon as bytes/lines were available fixed the RPC timeout.

Expected Documentation

The iMessage remote-wrapper docs should explicitly state that a cliPath wrapper must behave like a transparent stdio pipe for long-lived JSON-RPC:

  • forward each stdin chunk/line promptly
  • forward stdout chunks/lines promptly
  • preserve newlines
  • avoid waiting for EOF before forwarding
  • avoid fixed-size blocking reads that can starve small JSON-RPC frames
  • keep stderr separate from JSON-RPC stdout

Suggested Location

This likely belongs in docs/channels/imessage.md near the "Remote Mac over SSH" / custom cliPath wrapper section.

Why It Matters

The failure mode looks like an OpenClaw/iMessage channel outage (imsg rpc timeout), but the root cause is wrapper buffering. A short note would make custom remote iMessage deployments much easier to diagnose and avoid.

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…

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 - ✅(Solved) Fix Docs: iMessage cliPath wrappers must stream JSON-RPC stdio incrementally [1 pull requests, 1 comments, 2 participants]