Skip to content

fix(imessage): honor disabled reply actions#93137

Merged
vincentkoc merged 1 commit into
mainfrom
fix/imessage-remove-split-send-coalescing
Jun 15, 2026
Merged

fix(imessage): honor disabled reply actions#93137
vincentkoc merged 1 commit into
mainfrom
fix/imessage-remove-split-send-coalescing

Conversation

@omarshahine

@omarshahine omarshahine commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #92142 by making the iMessage sender honor channels.imessage.actions.reply === false before preserving outbound reply metadata.

When reply actions are disabled, sendMessageIMessage now drops replyToId before it can become the imsg RPC reply_to parameter or send-attachment --reply-to. That lets final iMessage responses degrade to normal top-level sends on SIP-enabled macOS setups instead of entering the SIP-gated threaded reply path.

Root cause

Final delivery passes payload.replyToId into the iMessage sender for text and media replies. The sender previously sanitized and reused that value unconditionally, so actions.reply: false disabled advertised/private reply actions but not the lower-level final delivery metadata.

Changes

  • Gate resolved iMessage reply metadata with the existing createActionGate(account.config.actions)("reply") helper.
  • Add regression coverage for disabled reply actions on text sends and media attachment sends.

Verification

  • node scripts/run-vitest.mjs extensions/imessage/src/send.test.ts passed: 43 tests.
  • pnpm --silent exec oxfmt --check extensions/imessage/src/send.ts extensions/imessage/src/send.test.ts passed.
  • git diff --check -- extensions/imessage/src/send.ts extensions/imessage/src/send.test.ts passed.

Duplicate PRs

This maintainer PR supersedes #92170 and #92920. Both contributor PRs target the same issue and same sender line; this PR keeps the maintainer-owned fix while borrowing the stronger sender-boundary test shape.

@clawsweeper

clawsweeper Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 14, 2026, 11:22 PM ET / 03:22 UTC.

Summary
The PR imports the shared channel action gate, strips iMessage reply metadata when actions.reply is false, and adds text/media regression tests.

PR surface: Source +2, Tests +53. Total +55 across 2 files.

Reproducibility: yes. for source-level reproduction: current main forwards final-delivery replyToId into the iMessage sender, and the sender serializes it as reply_to without checking actions.reply. I did not run live SIP-enabled macOS/iMessage proof in this read-only review.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: vector/embedding metadata: extensions/imessage/src/send.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🌊 off-meta tidepool
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Risk before merge

  • [P1] I did not run a live SIP-enabled macOS/iMessage send in this read-only review; the positive verdict is based on source inspection, the existing docs/contract, PR-head diff, added tests, and current CI state.

Maintainer options:

  1. Decide the mitigation before merge
    Land this narrow send-boundary fix after maintainer handling, then let it close iMessage final replies fail under SIP because outbound delivery passes reply_to even when reply actions are disabled #92142 when merged.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] No ClawSweeper repair is needed; the current branch is a narrow clean patch and the remaining action is normal protected-label maintainer handling.

Security
Cleared: The diff only imports an existing SDK helper and changes iMessage send/test code; it does not touch dependencies, workflows, package metadata, secrets, or downloaded code execution.

Review details

Best possible solution:

Land this narrow send-boundary fix after maintainer handling, then let it close #92142 when merged.

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

Yes for source-level reproduction: current main forwards final-delivery replyToId into the iMessage sender, and the sender serializes it as reply_to without checking actions.reply. I did not run live SIP-enabled macOS/iMessage proof in this read-only review.

Is this the best way to solve the issue?

Yes. Gating at sendMessageIMessage is the narrow shared choke point for text, media, attached-result, and monitor final-delivery callers, and it reuses the existing actions.reply contract instead of adding a new config mode.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 50c82b302006.

Label changes

Label changes:

  • add P2: The PR fixes a concrete iMessage message-delivery failure with channel-specific blast radius rather than a core-wide outage.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The live PR is labeled maintainer, so the external contributor proof gate is not applied; the PR body still records focused test, formatter, and diff-check verification.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: The PR fixes a concrete iMessage message-delivery failure with channel-specific blast radius rather than a core-wide outage.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The live PR is labeled maintainer, so the external contributor proof gate is not applied; the PR body still records focused test, formatter, and diff-check verification.
Evidence reviewed

PR surface:

Source +2, Tests +53. Total +55 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 1 +2
Tests 1 53 0 +53
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 56 1 +55

What I checked:

Likely related people:

  • steipete: Git history shows the largest share of recent iMessage sender/channel touches, plus media-send work and iMessage private-API documentation near this boundary. (role: feature introducer and adjacent owner; confidence: high; commits: 3bb02d333865, d85b2a0e8148, 63cbc097b5ca; files: extensions/imessage/src/send.ts, extensions/imessage/src/channel.ts, docs/channels/imessage.md)
  • mvanhorn: git log identifies commit e0972db7a292 as prior iMessage outbound reply-tag work in the same sender module. (role: reply metadata contributor; confidence: medium; commits: e0972db7a292; files: extensions/imessage/src/send.ts)
  • scoootscooob: Commit 0ce23dc62d37 moved the iMessage channel into extensions/imessage, carrying the current plugin-owned send and final-delivery paths. (role: delivery path refactor contributor; confidence: medium; commits: 0ce23dc62d37; files: extensions/imessage/src/send.ts, extensions/imessage/src/monitor/deliver.ts)
  • vincentkoc: Commit 049bb37c6296 lazy-loaded iMessage channel runtime paths adjacent to the outbound send boundary, and current release snapshots also carry the active files. (role: recent runtime routing contributor; confidence: medium; commits: 049bb37c6296, 8c802aa68351; files: extensions/imessage/src/channel.runtime.ts, extensions/imessage/src/send.ts)
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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: L and removed size: S labels Jun 15, 2026
@omarshahine
omarshahine force-pushed the fix/imessage-remove-split-send-coalescing branch from 5c1db7e to eddf034 Compare June 15, 2026 03:11
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed docs Improvements or additions to documentation size: L labels Jun 15, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Jun 15, 2026
@vincentkoc vincentkoc self-assigned this Jun 15, 2026
@vincentkoc

Copy link
Copy Markdown
Member

Maintainer verification: land-ready.

  • Reviewed the sender boundary, action-gate contract, text/media callers, and focused regressions. This is the best fix: it prevents disabled reply metadata from reaching both iMessage send paths while preserving the default-enabled behavior.
  • node scripts/run-vitest.mjs extensions/imessage/src/send.test.ts — passed, 43 tests.
  • node scripts/run-oxlint.mjs extensions/imessage/src/send.ts extensions/imessage/src/send.test.ts — passed.
  • node_modules/.bin/oxfmt --check extensions/imessage/src/send.ts extensions/imessage/src/send.test.ts — passed.
  • node scripts/check-src-extension-import-boundary.mjs --json — passed ([]).
  • .agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main — clean, no accepted/actionable findings; patch correct at 0.96 confidence.

The existing check-lint failure is unrelated to this PR: it reports extensions/memory-core/src/memory/manager-embedding-ops.ts:313, while this PR changes only extensions/imessage/src/send.ts and its test.

Known proof gap: no live SIP-enabled macOS round-trip was run in this closeout; the sender-boundary regression covers the exact outgoing RPC/attachment parameters.

@vincentkoc
vincentkoc merged commit cc95479 into main Jun 15, 2026
375 of 397 checks passed
@vincentkoc
vincentkoc deleted the fix/imessage-remove-split-send-coalescing branch June 15, 2026 03:53
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 15, 2026
wangmiao0668000666 pushed a commit to wangmiao0668000666/openclaw that referenced this pull request Jun 17, 2026
crh-code pushed a commit to crh-code/openclaw that referenced this pull request Jun 18, 2026
badgerbees pushed a commit to badgerbees/openclaw that referenced this pull request Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: imessage Channel integration: imessage maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

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