Repository navigation
Description
Summary
On OpenClaw 2026.6.5, iMessage inbound messages can be received and processed successfully, but final reply delivery can fail on macOS systems with System Integrity Protection enabled. The delivery layer attempts to send the final response as a threaded/native reply by passing reply_to/replyToId to the iMessage sender. The imsg bridge then refuses because threaded/private Messages.app injection requires SIP to be disabled.
This happens even when channels.imessage.actions.reply is configured as false.
Environment
- OpenClaw: 2026.6.5
- Platform: macOS, LaunchAgent gateway
- iMessage bridge:
imsg 0.9.0 - SIP: enabled
- iMessage private API probe: unavailable, but normal send RPC methods are listed
Observed Behaviour
An iMessage group message was ingested and processed. OpenClaw created iMessage reply-cache/catchup state for the inbound message, then final delivery failed with:
imessage final reply failed: OutboundDeliveryError: System Integrity Protection (SIP) is enabled. Refusing to inject into Messages.app. Disable SIP in Recovery mode before using `imsg launch`.
The channel config had:
{
"channels": {
"imessage": {
"actions": {
"reply": false
}
}
}
}The iMessage config schema rejects channels.imessage.replyToMode, so there does not appear to be a supported config-level way to force final responses to degrade to plain top-level sends.
Expected Behaviour
If iMessage private API support is unavailable, or channels.imessage.actions.reply is false, OpenClaw should not pass reply_to/replyToId into final iMessage delivery. It should send a normal top-level iMessage instead.
Alternatively, the iMessage schema should expose a supported replyToMode: "off" option if the common channel reply-threading resolver is going to default to reply threading.
Local Hotfix Tested
A local patch in dist/send-DpmbO1o_.js changed:
const resolvedReplyToId = sanitizeReplyToId(opts.replyToId);to:
const replyActionsEnabled = account.config.actions?.reply !== false;
const resolvedReplyToId = replyActionsEnabled ? sanitizeReplyToId(opts.replyToId) : void 0;A no-send fake-client check confirmed that when actions.reply === false, the generated send RPC params no longer contain reply_to.
Related
There is an older closed issue about inbound iMessage reply context:
This issue is separate: outbound final response delivery attempts a SIP-gated native/threaded reply even when normal top-level iMessage delivery should be sufficient.
Related TTS Schema Gap
While testing the workaround with openclaw message send --channel imessage --target chat_id:2, a separate iMessage-specific issue appeared: global messages.tts.auto = "always" caused OpenClaw to send a generated .caf voice attachment before the text message.
This is undesirable for iMessage, and in this workspace iMessage is explicitly meant to stay text-only. However:
messages.ttsschema in 2026.6.5 does not expose a per-channel override such aschannelOverrides.imessage.auto = "off".channels.imessageschema also does not expose a channel-levelttsobject.
Local hotfix tested:
if (params.channel === "imessage") return params.payload;inserted at the start of maybeApplyTtsToPayload in dist/tts-runtime-B6XTTTyB.js.
A direct runtime check confirmed that an iMessage payload remains text-only even when global TTS auto mode is always.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
clawsweeper commentedon Jun 11, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 11, 2026, 6:52 AM ET / 10:52 UTC.
Summary
Keep this open. Current main and v2026.6.5 still forward iMessage final-reply metadata into outbound send without honoring the existing iMessage reply action/private-API boundary, and no duplicate or merged fix was found.
Reproducibility: yes. for source reproduction: current main forwards payload.replyToId into iMessage final delivery, and sendMessageIMessage serializes it as reply_to without checking actions.reply. I did not establish a live SIP-enabled macOS repro in this runner.
Next step
The affected iMessage plugin files and regression tests are narrow enough for one focused repair PR; the separate iMessage TTS override request should stay out of that fix.
Review details
Best possible solution:
Strip or gate iMessage reply metadata at the plugin send/final-delivery boundary when threaded reply is disabled or unavailable, using existing action/private-API surfaces rather than adding a new config option first; handle the TTS schema note separately.
Do we have a high-confidence way to reproduce the issue?
Yes for source reproduction: current main forwards payload.replyToId into iMessage final delivery, and sendMessageIMessage serializes it as reply_to without checking actions.reply. I did not establish a live SIP-enabled macOS repro in this runner.
Is this the best way to solve the issue?
No: current main is not the best solved state because the existing iMessage action/private-API boundary is not honored by normal final delivery. The narrow maintainable fix is to strip or gate reply metadata at the iMessage delivery/send boundary, not to add a new replyToMode surface first.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against 60e818f563d8.
Label changes
Label justifications:
P2: This is a concrete channel-specific delivery bug with limited blast radius rather than a core-wide outage.impact:message-loss: The reported failure drops final iMessage replies after inbound processing succeeds.Evidence reviewed
Acceptance criteria:
What I checked:
extensions/imessage/src/monitor/deliver.ts:48, 60e818f563d8)extensions/imessage/src/send.ts:951, 60e818f563d8)src/config/zod-schema.providers-core.ts:1367, 60e818f563d8)extensions/imessage/src/monitor/deliver.test.ts:50, 60e818f563d8)docs/channels/imessage.md. (docs/channels/imessage.md:141, 60e818f563d8)extensions/imessage/src/send.ts:914, 5181e4f7c82b)Likely related people:
extensions/imessage/src/send.ts,extensions/imessage/src/monitor/deliver.ts,src/config/zod-schema.providers-core.ts)extensions/imessage/src/send.ts,docs/channels/imessage.md)extensions/imessage/src/send.ts)extensions/imessage/src/send.ts,extensions/imessage/src/monitor/deliver.ts)How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.fix(imessage): respect actions.reply=false in outbound delivery
test(imessage): add regression test for actions.reply=false replyToId…