iMessage plugin: reply fails on macOS with 'any;-;' chat GUID format
Status Closed — not planned
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 2 comments · opened Apr 11, 2026 · closed May 22, 2026
Summary
The iMessage plugin's reply tool fails to send messages on newer macOS versions where chat.db stores DM chat GUIDs with the any;-; prefix instead of the traditional iMessage;-; or SMS;-; prefixes.
Environment
- macOS Tahoe (Darwin 25.4.0)
- iMessage plugin v0.1.0
Steps to Reproduce
- Receive a DM via the iMessage plugin channel
- The inbound message arrives with
chat_id="any;-;+81XXXXXXXXXX" - Attempt to reply using the
replytool with this chat_id
Observed Behavior
- Using
any;-;+81XXXXXXXXXX(as provided in the inbound message): passes the allowlist check, but Messages.app AppleScript rejects the GUID with error-1728("chat id を取り出すことはできません") - Using
iMessage;-;+81XXXXXXXXXX: fails the allowlist check because this GUID doesn't exist inchat.db - Using
SMS;-;+81XXXXXXXXXX: same allowlist failure
Root Cause
In server.ts, the sendText() function passes the chat GUID directly to AppleScript:
tell application "Messages" to send (item 1 of argv) to chat id (item 2 of argv)
The allowedChatGuids() function correctly queries chat.db and returns any;-; GUIDs, so the allowlist check passes. However, Messages.app's AppleScript API does not recognize the any;-; prefix.
Workaround
Sending via participant instead of chat id works:
tell application "Messages"
set theService to 1st account whose service type = iMessage
set theBuddy to participant "+81XXXXXXXXXX" of theService
send "message" to theBuddy
end tell
Suggested Fix
Either:
- Normalize
any;-;GUIDs to the appropriate service prefix (iMessage;-;orSMS;-;) before passing to AppleScript, or - Fall back to sending via
participantof a service whenchat idbased sending fails
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗