[codex] Add WhatsApp phone-code login#85866
Conversation
|
Codex review: found issues before merge. Reviewed July 11, 2026, 12:53 AM ET / 04:53 UTC. Summary PR surface: Source +343, Tests +229, Docs +26. Total +598 across 22 files. Reproducibility: yes. for the introduced retry defect from source: trigger the existing 408 timeout recovery after the initial phone code, and the replacement socket is installed without another Review metrics: 3 noteworthy metrics.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Consolidate on the typed login-method implementation, prepare every replacement socket for a fresh code, fail closed when detected partial auth cannot be safely cleared, and carry the contributor's physical-device proof onto the final canonical head. Do we have a high-confidence way to reproduce the issue? Yes for the introduced retry defect from source: trigger the existing 408 timeout recovery after the initial phone code, and the replacement socket is installed without another Is this the best way to solve the issue? No. The happy path is real-device proven, but the best solution uses the typed shared login-method contract, prepares every replacement socket, and stops rather than continuing when detected partial auth cannot be cleared safely. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6595d1756b1a. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +343, Tests +229, Docs +26. Total +598 across 22 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (1 earlier review cycle)
|
1d69ab0 to
1ffc9a0
Compare
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Clockwork Branchling Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
0546421 to
20670fe
Compare
20670fe to
518b110
Compare
This comment was marked as spam.
This comment was marked as spam.
c217d0e to
24f18c0
Compare
|
Whatsapp login |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: [codex] Add WhatsApp phone-code login This is item 1/1 in the current shard. Shard 10/22. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Summary
openclaw channels login --phone-number <number>to the generic channel auth adapter and CLIWhy
QR-based WhatsApp linking can be awkward or impossible in headless setups, and it can fail when the phone scanner does not pick up the terminal/dashboard QR. The phone-number pairing flow creates the same saved WhatsApp Web credentials after a one-time code entry on the phone, so the CLI can continue normally afterward.
Closes #85867.
Refs #15614, #85868.
Real behavior proof
Behavior addressed: WhatsApp linking when QR scanning is unavailable or unreliable from a headless gateway host.
Real environment tested: local OpenClaw source checkout running against a physical Android WhatsApp device and a named WhatsApp account, with private identifiers redacted.
Exact steps or command run after this patch: ran
openclaw channels login --channel whatsapp --account <account> --phone-number <country-code-and-number>, entered the printed pairing code on the phone under WhatsApp > Linked Devices > Link with phone number using an ADB-controlled phone UI, restarted the gateway during the nativeLogging in.../ 515 phase, then ranopenclaw channels status --channel whatsapp --account <account> --probe.Evidence after fix: OpenClaw printed a pairing code, the phone accepted it in the linked-device code flow, OpenClaw then logged
WhatsApp asked for a restart after pairing (code 515); waiting for creds to save…,WhatsApp Web connected., andLinked after restart; web session ready.Observed result after fix: final channel status was linked, healthy, running, and connected with no last error; the phone's Linked Devices screen showed an active web session.
What was not tested: a completely unattended flow with no reachable phone UI was not tested. The gateway/operator side can be headless when the phone UI is remotely controllable, such as Android over ADB or an iPhone via a simulator/remote-control path; this PR does not change broader 515 restart recovery behavior beyond documenting the observed sequence.
Verification
pnpm test extensions/whatsapp/src/login.test.ts extensions/whatsapp/src/login.coverage.test.ts extensions/whatsapp/src/login-qr.test.ts extensions/whatsapp/src/auth-store.test.ts extensions/whatsapp/src/accounts.whatsapp-auth.test.ts src/cli/channel-auth.test.tspnpm check:changedpnpm build