Environment: hermes-agent 0.18.2, simplex-chat 6.4.10, SimpleX gateway DM (1:1) chat.
Symptom: The gateway connects to the simplex-chat daemon, receives inbound DMs, the agent generates a correct response, and the log shows Sending response (N chars) to <id> — but nothing is delivered to the contact. Group messages are unaffected.
Root cause: In plugins/platforms/simplex/adapter.py, send() builds the DM command as @{chat_id} {content}, where chat_id is the numeric contactId. simplex-chat parses @<arg> text as a display-name lookup, so @4 hello looks for a contact literally named "4", finds none, and returns chatCmdError. Because the DM send is fire-and-forget (_send_ws without awaiting a reply), the error is never inspected and the message is silently dropped. The group branch and all media branches already use the structured /_send #<id> json […] / /_send @<id> json […] form; only the plain-text DM branch was not migrated (its comment still claims @<id> text "has always worked in production").
Fix:
python composed = json.dumps([{"msgContent": {"type": "text", "text": content}}]) cmd_str = f"/_send @{chat_id} json {composed}"
This matches the group/media paths and also fixes newline/markdown escaping via json.dumps. Verified: @4 … → chatCmdError; /_send @4 json […] → newChatItems → delivered (sndRcvd).
Secondary (recommended): the DM send should at least log a non-newChatItems response. The failure was invisible purely because the error was swallowed; surfacing it would make this class of bug self-evident.
Environment: hermes-agent 0.18.2, simplex-chat 6.4.10, SimpleX gateway DM (1:1) chat.
Symptom: The gateway connects to the simplex-chat daemon, receives inbound DMs, the agent generates a correct response, and the log shows
Sending response (N chars) to <id>— but nothing is delivered to the contact. Group messages are unaffected.Root cause: In
plugins/platforms/simplex/adapter.py,send()builds the DM command as@{chat_id} {content}, wherechat_idis the numericcontactId. simplex-chat parses@<arg> textas a display-name lookup, so@4 hellolooks for a contact literally named "4", finds none, and returnschatCmdError. Because the DM send is fire-and-forget (_send_wswithout awaiting a reply), the error is never inspected and the message is silently dropped. The group branch and all media branches already use the structured/_send #<id> json […]//_send @<id> json […]form; only the plain-text DM branch was not migrated (its comment still claims@<id> text"has always worked in production").Fix:
python composed = json.dumps([{"msgContent": {"type": "text", "text": content}}]) cmd_str = f"/_send @{chat_id} json {composed}" This matches the group/media paths and also fixes newline/markdown escaping via
json.dumps. Verified:@4 …→chatCmdError;/_send @4 json […]→newChatItems→ delivered (sndRcvd).Secondary (recommended): the DM send should at least log a non-
newChatItemsresponse. The failure was invisible purely because the error was swallowed; surfacing it would make this class of bug self-evident.