Skip to content

Sends and recovery

A send can fail in an awkward way: WeChat accepts the message, but the reply never comes back. Sending again would duplicate it. So every send carries an idempotency key, and an unknown outcome is reported as unknown instead of being retried.

WeChat accepted WeChat refused no answer cancelled queued submitting accepted failed needs_review cancelled
StateMeaningWhat to do
acceptedWeChat took the messageNothing. (It doesn’t confirm the recipient’s phone got it.)
failedWeChat refused itFix the cause and send again with a new key
needs_reviewUnknown: it may or may not have gone outCheck the chat. Don’t resend automatically.
cancelledStopped before it was submittedNothing

Same key, same send

The CLI saves a receipt with the key before it sends anything. If the connection drops, look the send up instead of sending again:

Terminal window
wx messages sends lookup --idempotency-key order-1234-confirmation
wx jobs get JOB_ID

Sending again with the same key and the same content returns the original send. The same key with different content is rejected.

After a restart

Queued sends, downloads, read notices, the event log and the login all survive a restart. Work that was mid-flight when the daemon stopped comes back as needs_review rather than being repeated.

Stopping the daemon (or disconnecting) keeps the saved login. Use wx auth logout to sign out, or wx auth logout --local to skip the request to WeChat. Both forms stop automatic reconnection until you sign in again.