Skip to content

fix(imessage): respect actions.reply=false in outbound delivery#92170

Closed
fsdwen wants to merge 3 commits into
openclaw:mainfrom
fsdwen:fix/imessage-sip-reply-respect-actions
Closed

fix(imessage): respect actions.reply=false in outbound delivery#92170
fsdwen wants to merge 3 commits into
openclaw:mainfrom
fsdwen:fix/imessage-sip-reply-respect-actions

Conversation

@fsdwen

@fsdwen fsdwen commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

When channels.imessage.actions.reply is explicitly set to false, outbound delivery should not pass reply_to/replyToId to the imsg bridge. On macOS with SIP enabled, native reply injection fails, and the send should degrade to a plain top-level message.

Fix

In extensions/imessage/src/send.ts, the resolvedReplyToId now checks account.config.actions?.reply !== false before resolving the replyToId:

- const resolvedReplyToId = sanitizeReplyToId(opts.replyToId);
+ const resolvedReplyToId =
+   account.config.actions?.reply !== false ? sanitizeReplyToId(opts.replyToId) : undefined;

When actions.reply === false, the reply_to parameter is no longer passed to the imsg bridge, avoiding SIP-related failures.

Files changed

  • extensions/imessage/src/send.ts: +2/-1 lines
  • extensions/imessage/src/send.test.ts: +29 lines (regression test for actions.reply=false)

Related

Fixes #92142

Real behavior proof

  • Behavior addressed: iMessage outbound delivery passes reply_to even when channels.imessage.actions.reply is false, causing SIP-enabled macOS systems to fail with "System Integrity Protection (SIP) is enabled. Refusing to inject into Messages.app."
  • Real environment tested: Linux Node 24 — the RPC parameter suppression code path is validated via the iMessage send unit test suite. macOS/SIP integration validation requires a contributor with macOS hardware.
  • Exact steps or command run after this patch:
    $ node ./node_modules/vitest/vitest.mjs run extensions/imessage/src/send.test.ts
  • Evidence after fix:
    $ node ./node_modules/vitest/vitest.mjs run extensions/imessage/src/send.test.ts
    ✓ sendMessageIMessage > passes the default RPC send transport
    ✓ sendMessageIMessage > attaches a text receipt for native send ids
    ✓ sendMessageIMessage > preserves audioAsVoice media when replying to an iMessage thread
    ✓ sendMessageIMessage > does not pass replyToId to receipt when actions.reply is false (#92142)
    ... 42 tests passed (1 file)
  • Observed result after fix: When actions.reply === false, resolvedReplyToId is undefined, and replyToId does not appear in the receipt. The client RPC does not receive a reply_to parameter. When actions.reply is unset or true, behavior is unchanged. The new regression test verifies both the receipt output and the RPC suppression.
  • What was not tested: Real iMessage bridge with SIP enabled (requires macOS hardware with Messages.app and SIP active); integration test with actual imsg CLI bridge binary. The unit test covers the RPC parameter suppression path but cannot exercise the macOS-native SIP rejection. macOS validation from a contributor with the appropriate hardware is requested.

🤖 Generated with Claude Code

@fsdwen

fsdwen commented Jun 11, 2026

Copy link
Copy Markdown
Contributor Author

@vincentkoc would you mind reviewing this? Thanks!

@openclaw-barnacle openclaw-barnacle Bot added channel: imessage Channel integration: imessage size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 11, 2026
@clawsweeper

clawsweeper Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 12, 2026, 7:39 PM ET / 23:39 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

PR surface: Source +3, Tests +29. Total +32 across 2 files.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Merge readiness
Overall: 🌊 off-meta tidepool
Proof: 🌊 off-meta tidepool
Patch quality: 🌊 off-meta tidepool
Result: rating does not apply to this item.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

Do we have a high-confidence way to reproduce the issue?

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against 4809ac70fa5a.

Label changes

Label changes:

  • remove P2: Current review triage priority is none.

Label justifications:

  • rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
Evidence reviewed

PR surface:

Source +3, Tests +29. Total +32 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 4 1 +3
Tests 1 29 0 +29
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 33 1 +32

What I checked:

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jun 11, 2026
@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 11, 2026
When channels.imessage.actions.reply is explicitly set to false,
outbound delivery should not pass reply_to/replyToId to the
imsg bridge. On macOS with SIP enabled, native reply injection
fails, and the send should degrade to a plain top-level message.

Previously, the replyToId was always resolved regardless of the
actions.reply setting, causing SIP-enabled systems to fail with:
"System Integrity Protection (SIP) is enabled. Refusing to inject
into Messages.app."

Fixes openclaw#92142

Co-Authored-By: Claude Fable 5 <[email protected]>
@fsdwen
fsdwen force-pushed the fix/imessage-sip-reply-respect-actions branch from 771668e to 2f5dbec Compare June 11, 2026 12:58
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jun 11, 2026
… suppression

Verify that replyToId is undefined in the receipt and not passed
to the client RPC when channels.imessage.actions.reply is false.

Issue openclaw#92142

Co-Authored-By: Claude Fable 5 <[email protected]>
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 12, 2026
@fsdwen

fsdwen commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@fsdwen

fsdwen commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@vincentkoc would you mind reviewing this? Thanks!

@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 12, 2026
@fsdwen

fsdwen commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@fsdwen

fsdwen commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

Copy link
Copy Markdown
Contributor

Thanks for sending this fix. I’m closing this as superseded by maintainer PR #93137.

That PR carries the same #92142 fix at the iMessage sender boundary, keeps the maintainer-owned branch authoritative, and includes regression coverage that checks the actual outbound send RPC params plus the media attachment path. The issue remains tracked through #93137.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: imessage Channel integration: imessage P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

iMessage final replies fail under SIP because outbound delivery passes reply_to even when reply actions are disabled

2 participants