Skip to content

Releases

v1.23.2 — ask WhatsApp for the live client version (fixes the 2026-12-01 405 outage)

Choose a tag to compare

@crisandrews crisandrews released this 01 Dec 10:26

Changes

  • Connect/version: the plugin now announces the WhatsApp Web version WhatsApp is serving (fetchLatestWaWebVersion(), reads web.whatsapp.com/sw.js, 10 s timeout) instead of Baileys' fetchLatestBaileysVersion(), which only reads a constant from the Baileys repo and reports it as latest. When WhatsApp deprecated that constant (2.3000.1043857760, about 00:12 UTC on 2026-12-01), every login and reconnect was refused with 405.
  • Connect/fallbacks: if the live lookup fails, the repo constant is used, then Baileys' bundled default; system.log says which source was used (source=whatsapp, baileys-repo, or the bundled default with the reason).
  • Internal: version selection lives in the pure module wa-version.ts.
  • Docs: docs/troubleshooting.md explains how to read the version source when every attempt ends in 405.

No Baileys upgrade is needed: the live lookup already ships in the bundled 7.0.0-rc13. Upstream report: WhiskeySockets/Baileys#2943.

Full changelog: v1.23.1...v1.23.2

v1.23.1 — reconnect backs off for real; 1-3 min cadence, 1 min floor on WhatsApp refusals

Choose a tag to compare

@crisandrews crisandrews released this 01 Dec 01:15

Changes

  • Reconnect/backoff fix: a socket that keeps failing during setup now grows its delay instead of retrying every ~2 s forever. The failure streak only resets after a connection that actually reached open and stayed up ≥30 s (before, it reset against the last healthy connection, so every failure logged retry #1 in 2s; on 2026-11-30 that meant about 1,000 handshakes per number in 45 minutes during a WhatsApp-side 405 rejection).
  • Reconnect/cadence: ~2 s first retry, ~1 min by the 6th consecutive failure, capped at 3 min (was 5 min), with ±30% jitter.
  • Reconnect/refusals: when WhatsApp refuses the handshake (403, 405, 429), every retry waits at least 1 min, and system.log ends the line with (refused by WhatsApp: waiting at least 1 min).
  • Internal: the backoff policy lives in the pure module reconnect-backoff.ts; server.ts only calls it.
  • Docs: docs/operations.md (reconnection behavior) and docs/troubleshooting.md (the 405 case and the old retry #1 loop) updated.

Full changelog: v1.23.0...v1.23.1

v1.23.0 — owner-approved contact requests, reply quotes, no more lost voice notes

Choose a tag to compare

@crisandrews crisandrews released this 18 Nov 14:27

Changes

  • Access/contact requests: the owner can ask the agent to let a new person message it (new MCP tool request_contact_access with phone, label, reason and optional days); the plugin, not the agent, sends the owner an approval prompt on WhatsApp, so a one-off contact can be enabled without reaching a terminal.
  • Access/contact requests: the owner approves with 👍/✅ or denies with 👎/❌ on the plugin's prompt, or replies approve <id> / deny <id> (also aprobar / rechazar); only a decision from a live ownerJids sender in a 1:1 DM counts and it never reaches the agent, so the model stays out of the trust path.
  • Access/grants: an approved contact gets DM-only access recorded in the new access.json temporaryAllow list, with the duration capped by the owner's maxDays (default 14, hard cap 30), so access ends by itself and never turns anyone into an owner.
  • Access/expiry: expired grants stop being admitted immediately and are swept out of access.json at startup, on connect and every minute, and the agent receives a kind: "contact_request" system notification for each outcome, so it only tells someone they have access once the owner has really approved.
  • Access/revoke: new MCP tool revoke_contact_access removes a temporary grant or cancels a pending request for a number, so the agent can narrow access on request but never widen it.
  • Access/owner switch: /whatsapp:access contact-requests on|off|status|list|revoke <phone|all> [en|es] in the terminal, or !access contact-requests … from the owner's 1:1 DM, so the feature can be turned on and audited from the phone. It is opt-in and off by default.
  • Access/prompt integrity: react, edit_message and delete_message refuse the plugin's own contact prompts, so the number the owner is approving cannot be rewritten.
  • Access/schema: access.json gains the optional contactRequests { enabled, locale?, defaultDays?, maxDays? } and temporaryAllow[] keys, and /whatsapp:access preserves them, promotes a temporary contact to permanent on allow / pair and removes it on revoke, so existing configurations keep working unchanged.
  • Media/download_attachment: new message_id argument downloads the media of a stored message again, within the chats the caller can read, and transcribes voice notes when transcription is enabled, so a failed attachment can be recovered later.
  • Inbound/reply quotes: a message that replies to an earlier one now starts with [Replying to: "…"] and carries quoted_message_id, quoted_from and quoted_text in meta (media shown as a tag such as [image] or [voice note] plus the caption, and a transcribed voice note by its transcript), so the agent knows which message the sender is answering.

Fixes

  • Inbound media/download: a voice note or attachment whose download breaks mid-transfer (uncaught exception: TypeError: terminated in logs/system.log) is now retried up to 3 times with a 30-second stall timeout, an integrity check and a re-upload request for expired media, so a flaky connection no longer makes a message disappear.
  • Inbound media/delivery: when the download still fails, the message is stored in messages.db and delivered with download failed; use download_attachment to retry in the text and attachment_download_failed="true" in meta, so the agent knows something arrived and can fetch it again.
  • Inbound/batches: a message that fails while being processed no longer stops the rest of its batch, and uncaught exceptions are logged with their stack, so one bad message cannot take others down with it.
  • Calls/caller identity: an incoming call notification now carries the caller's user JID in chat_id and user_id instead of the calling device's (12345678901234:33@lid), while call_from keeps the JID as reported for reject_call, so an allowlisted caller is recognized and the agent can reply to them.

v1.22.0 — fix reply quoting, add @-mentions and contact-card numbers

Choose a tag to compare

@crisandrews crisandrews released this 15 Nov 14:06

Why this release matters

Quoted replies were broken: every reply with reply_to failed, because the quoted message handed to Baileys was a key-only stub with no message body. This release fixes quoting, lets the agent actually tag people in a reply, and removes two silent failure modes: shared contact cards that reached the agent without the phone number, and a message store that failed to open but looked exactly like an empty one.

Fixes

  • Reply/quote: reply_to no longer crashes. The quoted message is rebuilt from the cached raw message, scoped to the reply's own chat (text, or caption plus mimetype for media). (#9, by willwwh)
  • Message store: when messages.db cannot be opened, the startup log now states the reason instead of letting search_messages, export_chat and fetch_history silently return nothing. (#11)

Changes

  • Reply: new mentions argument (user JIDs, @s.whatsapp.net or @lid), so an @<number> in the text notifies the person. Applies to text messages and to image/document captions. (#9)
  • Groups: per-group imagesOnly filter in access.json — only messages that carry an image are delivered for that group, including ephemeral and view-once wrappers. (#9)
  • Inbound: shared contact cards (vCard) now surface their phone numbers in meta.contact_phones, preferring WhatsApp's waid parameter. The card is untrusted content: only digits and a sanitized, length-capped display name reach the agent. (#10)

v1.21.1 — resolve the live WhatsApp client version at connect time

Choose a tag to compare

@crisandrews crisandrews released this 29 Jul 04:25

Fixes

  • Connection/client version: the live WhatsApp Web client version is now resolved when the connection is established instead of relying on the build number frozen at install time, so an install no longer stops connecting once WhatsApp deprecates that build. If the lookup fails (offline, upstream unreachable) the bundled default is used, so a version check can never become a new reason not to connect. The resolved version is recorded in logs/system.log, so a 405 caused by a stale client is distinguishable from a credentials or network problem.

v1.21.0 — automatic single-instance takeover

Choose a tag to compare

@crisandrews crisandrews released this 09 Jun 22:40

Changes

  • Connection/lock: a session that finds the WhatsApp lock held no longer idles forever — it checks every 10 seconds and takes over automatically as soon as the holding session exits, so closing the duplicate session is all you need to do (no relaunch).
  • Connection/lock: a session that gets logged out from the phone hands the lock over immediately (after wiping its dead credentials), so a waiting session can re-link right away instead of staying muted behind it.
  • Connection/440: when another client using the same account credentials takes the socket, you now get a channel notice naming the cause and the fix — when first detected and at most every 6 hours while it persists — instead of silent reconnect flapping, so shared-creds setups stop being invisible.
  • Status contract: additive fields takeoverPollMs (on idle_other_instance) and lastDisconnectCode (on reconnecting), plus a new connect_error status, so doctors and companion plugins can tell a creds fight from network flapping.

Fixes

  • Server resilience: status writes are best-effort, connection attempts are single-flight with a self-healing retry chain, and no failure path (corrupt auth state, filesystem errors, first-connect rejection) can crash the MCP server or leave it wedged holding the lock, so tool calls keep working in every failure mode.

Full changelog: CHANGELOG.md

v1.20.2 — Fix inbound: stringify channel meta (host ZodError)

Choose a tag to compare

@crisandrews crisandrews released this 02 Jun 02:17

Fixes

  • channel-meta: inbound WhatsApp messages never reached the agent on 1.20.0 / 1.20.1. The host validates a channel notification's params.meta as Record<string,string>; the 1.20.0 identity refactor emitted is_group / is_owner as booleans (and display_name_unverified as null when there's no push name), so the host rejected every inbound notification with a ZodError and silently dropped it — the server logged the message and the "typing…" indicator fired, but nothing ever reached the agent (a total inbound outage for all 1.20.0/1.20.1 installs). buildChannelMeta now emits every meta value as a string ("true"/"false", "" for an absent display name) and defensively coerces/drops any non-string value from attachment metadata, so no current or future field can re-trip the host validator. The agent reads these as text attributes (is_owner="true"), so semantics are unchanged.

Full changelog: CHANGELOG.md

v1.20.1 — surface idle_other_instance lockout

Choose a tag to compare

@crisandrews crisandrews released this 31 May 04:35

Makes a "stops responding after an update" failure diagnosable instead of silent. WhatsApp Web allows only one connected device per credentials, so the plugin holds a single-instance lock — but when a second server instance lost that lock (commonly after an in-session /plugin update + /reload-plugins, or when an older/background/service session was still alive), the locked-out session went idle_other_instance and stayed mute: you saw the "typing…" indicator but got no reply, with no diagnostic.

Fixes

  • /whatsapp:configure now has an idle_other_instance branch — tells you inbound is NOT active, names the PID holding the lock, and gives the fix (one session + full relaunch; never /whatsapp:configure reset).
  • Enriched idle_other_instance status.json (inboundActive, thisPid, holderStartedAt, lockPath, remediation) so companion tooling (ClawCode /agent:channels) can surface it.
  • Update flow corrected: docs now recommend a full relaunch over /reload-plugins, and add a "you see 'typing…' but get no reply" troubleshooting entry.

Changes

  • Lock file is now PID-first JSON, deliberately back-compatible: older parseInt readers still read the owner PID from line 1.

Compatibility

  • No MCP tool-signature changes. status.json fields are additive and readable across 1.19.x / 1.20.0 / 1.20.1. Pairs with ClawCode 1.7.4.

v1.20.0 — Spoof-proof owner identity + owner-DM access commands

Choose a tag to compare

@crisandrews crisandrews released this 30 May 14:12

Changes

  • Inbound identity: every notifications/claude/channel now carries is_owner (JID-based), is_group, user_id, and display_name_unverified, so the agent knows who actually sent a message instead of trusting a spoofable WhatsApp display name.
  • Owner-DM access commands: the verified owner can run !access add-group <jid@g.us>, !access remove-group <jid@g.us>, and !access list from a 1:1 DM, so you can accept a group from your phone without the terminal. Off by default and opt-in — needs both the env var WHATSAPP_ALLOW_OWNER_DM_MUTATIONS=1 and /whatsapp:access dm-mutations on; the plugin handles it directly so it never relies on the agent, and widening/policy/ownership commands stay terminal-only.
  • Group create/join: create_group and join_group register a new group mention-only instead of open, so it isn't triggerable by every participant until you explicitly open it.

Fixes

  • Display names: search / list / analytics / message-context output, exports, and conversation logs show the sender JID with the display name marked "unverified", so a contact named like you can't be taken for you.
  • Permission relay: tool-permission prompts (e.g. "Claude wants to run Bash") are sent to and approvable by the owner only, not any allowlisted DM contact.

Security

  • Closes a display-name impersonation vector: a non-owner who set their WhatsApp name to the owner's could be treated as the owner. Owner identity is now strictly JID-based end to end.

Full changelog: CHANGELOG.md.

v1.19.1 — Bash-heredoc fix for /whatsapp:access and configure writes

Choose a tag to compare

@crisandrews crisandrews released this 19 May 16:55

Routes WhatsApp's pairing and configuration file writes through a hardened Bash heredoc pattern instead of MCP Write. ClawCode 1.6.0+ refuses file-tool writes to access.json, config.json, approved/<senderId>.json, and recent-groups.json when the channel state-dir resolves to the global fallback ~/.claude/channels/whatsapp/ (the entire ~/.claude/ tree is on its protected-paths list). Before this release, those writes silently failed with exec-gate: write to protected path refused (channel-access-json) or (claude-home) — /whatsapp:access pair <code> and /whatsapp:configure audio both surfaced as "doesn't work" with no diagnostic. Now the skill instructions tell the agent to write via Bash, which is not subject to the file-tool classifier. Independent fix — no schema changes, no cross-plugin coordination needed. Pairs with ClawCode 1.7.1, which routes its own side identically.

Fixes

  • Skills/access: all "Save access.json" instructions (plus the approved/<senderId>.json save in the pair flow and the recent-groups.json rewrite in add-group) route through a hardened heredoc pattern: rm -f tmp.$$ && umask 077 && cat > tmp.$$ << "JSON_EOF" && JSON.parse validate && chmod 600 && atomic mv || cleanup. Tightening over plain heredoc: pre-clears any stale tmp file (defends against symlink-plant on shared systems); per-invocation $$ PID-suffix; umask 077 so the freshly-created tmp starts at 0o600 immediately; explicit chmod 600 belt-and-suspenders; JSON.parse rejection BEFORE atomic mv so a truncated write can never clobber the existing file. After every save, the skill re-Reads access.json to surface the rare clobber-by-concurrent-server-write race to the user instead of silently pretending it succeeded.
  • Skills/configure: same hardened heredoc pattern for every "write it back" instruction (audio language, audio model, audio quality, audio provider, audio off, chunk-mode, reply-to, ack, document, pair, pair off).
  • Skills/access + skills/configure: Write removed from allowed-tools front-matter. Even with the explicit "NOT Write" sections in the skill body, leaving Write authorized was a footgun if the agent ever forgot the rule.
  • Docs/search-export: minor wording cleanup.

Compatibility

  • No schema changes, no MCP tool signature changes, no inbound notification payload changes. Existing access.json / config.json formats unchanged; the only thing different is the agent's path for writing them.
  • Standalone claude-whatsapp users (no ClawCode installed): file-tool writes still work as before because there's no protected-paths defense to refuse them. The hardened heredoc pattern is a no-op safety improvement (atomicity + perms + JSON validation) in that case.

Full changelog: CHANGELOG.md.

⌂ 换网址